text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-903297de"],{"0c12":function(t,e,s){"use strict";s.d(e,"b",(function(){return i})),s.d(e,"a",(function(){return a})),s.d(e,"d",(function(){return r})),s.d(e,"c",(function(){return l})),s.d(e,"e",(function(){return c}));var o=s("b775");function i(t){return Object(o["a"])({url:"/merchantCategoryTypeMini",method:"get",params:t})}function a(t){return Object(o["a"])({url:"/merchantGoodsCityGroup",method:"get",params:t})}function r(){return"/api/web/index.php/merchantGoodsVideo"}function l(t){return Object(o["a"])({url:"/merchantGoods",method:"post",data:t})}function c(t){return Object(o["a"])({url:"/shopCircleGoods",method:"post",data:t})}},"20d6":function(t,e,s){"use strict";var o=s("5ca1"),i=s("0a49")(6),a="findIndex",r=!0;a in[]&&Array(1)[a]((function(){r=!1})),o(o.P+o.F*r,"Array",{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),s("9c6c")(a)},"34b8":function(t,e,s){"use strict";s.d(e,"e",(function(){return i})),s.d(e,"a",(function(){return a})),s.d(e,"f",(function(){return r})),s.d(e,"c",(function(){return l})),s.d(e,"d",(function(){return c})),s.d(e,"b",(function(){return n})),s.d(e,"g",(function(){return d}));var o=s("b775");function i(t){return Object(o["a"])({url:"/pictureGroup",method:"get",params:t})}function a(t){return Object(o["a"])({url:"/pictureGroup",method:"post",data:t})}function r(t){return Object(o["a"])({url:"/pictureGroup/"+t.id,method:"put",data:t})}function l(t){return Object(o["a"])({url:"/pictureGroup/"+t.id,method:"delete",data:t})}function c(t){return Object(o["a"])({url:"/picture/"+t.id,method:"get",params:t})}function n(t){return Object(o["a"])({url:"/merchantGoodsPicture/"+t.id,method:"delete",data:t})}function d(t){return Object(o["a"])({url:"/merchantGoodsPicture",method:"post",data:t})}},"386b":function(t,e,s){var o=s("5ca1"),i=s("79e5"),a=s("be13"),r=/"/g,l=function(t,e,s,o){var i=String(a(t)),l="<"+e;return""!==s&&(l+=" "+s+'="'+String(o).replace(r,"&quot;")+'"'),l+">"+i+"</"+e+">"};t.exports=function(t,e){var s={};s[t]=e(l),o(o.P+o.F*i((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3})),"String",s)}},"3c13":function(t,e,s){},"40c8":function(t,e,s){},"5b66":function(t,e,s){"use strict";var o=s("40c8"),i=s.n(o);i.a},"5f23":function(t,e,s){"use strict";s.r(e);var o=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"goods-add-container"},[s("div",{staticClass:"type-container"},[s("div",{staticStyle:{"margin-bottom":"100px"}},[1===t.type?s("entity",{attrs:{goods:t.goods,isAdd:t.isAdd}}):s("virtual",{attrs:{goods:t.goods,isAdd:t.isAdd}})],1)])])},i=[],a=(s("8e6e"),s("ac6a"),s("456d"),s("bd86")),r=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("el-form",{ref:"goodsform",staticClass:"goods-form",attrs:{model:t.goods,rules:t.rules,"label-position":"right","label-width":"100px"}},[s("div",{staticClass:"goods-title"},[t._v("基本信息")]),t._v(" "),s("div",[s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"商品标题",prop:"name"}},[s("el-input",{staticClass:"goods-form-item-input",attrs:{placeholder:"请输入",size:"small"},model:{value:t.goods.name,callback:function(e){t.$set(t.goods,"name",e)},expression:"goods.name"}}),t._v(" "),s("div",{staticClass:"goods-form-item-text"},[t._v("限30个字，60个字符内")])],1),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"短标题",prop:"short_name"}},[s("el-input",{staticClass:"goods-form-item-input",attrs:{placeholder:"请输入",size:"small"},model:{value:t.goods.short_name,callback:function(e){t.$set(t.goods,"short_name",e)},expression:"goods.short_name"}}),t._v(" "),s("div",{staticClass:"goods-form-item-text"},[t._v("限12个字")])],1),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"简单说明",prop:"simple_info"}},[s("el-input",{staticClass:"goods-form-item-input",attrs:{type:"textarea",rows:1,placeholder:"请输入",size:"small"},model:{value:t.goods.simple_info,callback:function(e){t.$set(t.goods,"simple_info",e)},expression:"goods.simple_info"}}),t._v(" "),s("div",{staticClass:"goods-form-item-text"},[t._v("在商品详情页标题下面展示卖点信息，200字以内")])],1),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"商品货号"}},[s("el-input",{staticClass:"goods-form-item-input",attrs:{placeholder:"请输入",size:"small"},model:{value:t.goods.code,callback:function(e){t.$set(t.goods,"code",e)},expression:"goods.code"}})],1),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"分类"}},[s("div",{staticStyle:{width:"50%"}},[s("el-select",{staticStyle:{width:"calc(50% - 8px)"},attrs:{placeholder:"选择一级分类",size:"small"},on:{change:t.selectGoodsGroup},model:{value:t.firstGroupId,callback:function(e){t.firstGroupId=e},expression:"firstGroupId"}},t._l(t.goodGroupList,(function(t){return s("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1),t._v(" "),t.firstGroup.length>0?s("el-select",{staticStyle:{width:"calc(50% - 8px)","margin-left":"10px"},attrs:{placeholder:"选择二级分类",size:"small"},model:{value:t.goods.category_id,callback:function(e){t.$set(t.goods,"category_id",e)},expression:"goods.category_id"}},t._l(t.firstGroup,(function(t){return s("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1):t._e()],1)]),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"增值服务"}},[s("div",{staticStyle:{width:"50%",display:"inline-flex"}},t._l(t.labels,(function(e,o){return s("el-input",{key:o,style:{flex:1,"margin-left":0===o?"0":"15px"},attrs:{placeholder:"请输入",size:"small"},model:{value:t.labels[o],callback:function(e){t.$set(t.labels,o,e)},expression:"labels[index]"}})})),1),t._v(" "),s("div",{staticClass:"goods-form-item-text"},[t._v("显示在店铺信息下方，最多4个，每个最多4个字")])]),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"商品主图",prop:"pic_urls"}},[s("el-button",{attrs:{type:"primary",plain:"",size:"small"},on:{click:t.openMainPicPanel}},[t._v("选择图片")]),t._v(" "),s("div",{staticClass:"goods-form-item-text",staticStyle:{width:"calc(100% - 150px)"}},[t._v("建议尺寸：750×750，最多上传5张，支持png、jpg、jpeg格式，大小不超过500KB")])],1),t._v(" "),t.mainPicList.length>0?s("el-form-item",{staticClass:"goods-form-item"},t._l(t.mainPicList,(function(e,o){return s("l-pic",{key:o,attrs:{picurl:e,pickey:o,picdata:e,picmargin:"-20px 10px 10px 10px",size:{width:80,height:80},piclist:t.mainPicList},on:{delPic:t.delMainPic}})})),1):t._e()],1),t._v(" "),s("div",{staticClass:"goods-title"},[t._v("商品详情")]),t._v(" "),s("div",{staticStyle:{padding:"10px 20px"}},[s("tinymce",{attrs:{height:300,width:"100%"},model:{value:t.goods.detail_info,callback:function(e){t.$set(t.goods,"detail_info",e)},expression:"goods.detail_info"}})],1),t._v(" "),s("div",{staticClass:"goods-title"},[t._v("价格规格库存")]),t._v(" "),s("div",[s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"商品积分",prop:"score"}},[s("el-input",{staticClass:"goods-form-item-input",staticStyle:{width:"20%"},attrs:{placeholder:"请输入",size:"small"},model:{value:t.goods.score,callback:function(e){t.$set(t.goods,"score",e)},expression:"goods.score"}})],1),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"库存",prop:"stocks"}},[s("el-input",{staticClass:"goods-form-item-input",staticStyle:{width:"20%"},attrs:{placeholder:"请输入",size:"small"},model:{value:t.goods.stocks,callback:function(e){t.$set(t.goods,"stocks",e)},expression:"goods.stocks"}})],1)],1),t._v(" "),s("div",{staticClass:"goods-title"},[t._v("其他信息")]),t._v(" "),s("div",[s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"首页展示"}},[s("el-switch",{attrs:{"active-color":"#13ce66","active-value":"1","inactive-value":"0"},model:{value:t.goods.is_top,callback:function(e){t.$set(t.goods,"is_top",e)},expression:"goods.is_top"}})],1),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"排序"}},[s("el-input",{staticClass:"goods-form-item-input",staticStyle:{width:"20%"},attrs:{placeholder:"请输入",size:"small"},model:{value:t.goods.sort,callback:function(e){t.$set(t.goods,"sort",e)},expression:"goods.sort"}})],1)],1)]),t._v(" "),s("div",{staticStyle:{"text-align":"center","margin-top":"50px"}},[s("el-button",{staticStyle:{padding:"10px 30px","font-weight":"600"},attrs:{type:"primary"},on:{click:t.submit}},[t._v("提 交")])],1),t._v(" "),s("Modal",{attrs:{width:"1128","footer-hide":!0},model:{value:t.disPicPanel,callback:function(e){t.disPicPanel=e},expression:"disPicPanel"}},[t.disPicPanel?s("photo-album",{attrs:{maxcount:t.maxPicCount},on:{selectPicData:t.getPicData}}):t._e()],1)],1)},l=[],c=(s("20d6"),s("7514"),s("28a5"),s("55dd"),s("7f7f"),{type:1,name:"",short_name:"",code:"",category_id:"",label:"微信支付,",pic_urls:"",simple_info:"",detail_info:"",stocks:"",sort:"",is_top:"",score:""}),n={name:[{required:!0,message:"请输入商品标题",trigger:"blur"},{max:60,message:"长度在60个字符内",trigger:"blur"}],short_name:[{max:12,message:"短标题限12个字内",trigger:"blur"}],simple_info:[{max:20,message:"短标题限200个字内",trigger:"blur"}],unit:[{required:!0,message:"请输入商品单位",trigger:"blur"}],score:[{required:!0,message:"请输入商品积分",trigger:"blur"}],stocks:[{required:!0,message:"请输入商品库存",trigger:"blur"}],pic_urls:[{required:!0,message:"请选择商品主图",trigger:"blur"}]};function d(t){return{id:t.id,type:t.type,name:t.name,short_name:t.short_name,code:t.code,category_id:t.category_id,label:t.label,pic_urls:t.pic_urls,simple_info:t.simple_info,detail_info:t.detail_info,score:t.score,stocks:t.stocks,sort:t.sort,is_top:t.is_top}}var u=s("8757"),m=s("a436"),p=s("334a"),f=s("8256");function g(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),s.push.apply(s,o)}return s}function v(t){for(var e=1;e<arguments.length;e++){var s=null!=arguments[e]?arguments[e]:{};e%2?g(Object(s),!0).forEach((function(e){Object(a["a"])(t,e,s[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):g(Object(s)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(s,e))}))}return t}var _={name:"Entity",components:{PhotoAlbum:m["a"],LPic:p["a"],Tinymce:f["a"]},props:{goods:{type:Object,required:!0},isAdd:{type:Boolean,required:!0}},data:function(){return{rules:n,goodGroupList:[],firstGroup:[],firstGroupId:"",goodsAreaList:[],labels:["","","",""],disPicPanel:!1,maxPicCount:5,mainPicList:this.goods.pic_urls.split(",").filter((function(t){return""!==t})),groupTypeList:[{assemble_number:"",assemble_group_discount:"",discount:""}],other:"1"}},watch:{goodGroupList:function(t){t.length>0&&(this.firstGroupId=t[0].id,this.selectGoodsGroup())},labels:function(t){var e=this;this.goods.label="",t.forEach((function(t,s){""!==t.trim()&&(e.goods.label+=s<3?t+",":t)}))},mainPicList:function(t){var e=this;0===t.length?this.goods.pic_urls="":t.forEach((function(t,s){e.goods.pic_urls+=s<4?t+",":t}))}},mounted:function(){var t=this;this.getGoodGroup(),this.labels=this.goods.label.split(",");for(var e=this.labels.length;e<4;e++)this.labels[e]="";this.mainPicList=[],this.goods.pic_urls.split(",").forEach((function(e){""!==e&&null!==e&&void 0!==e&&(t.mainPicList.push(e),t.maxPicCount--)}))},methods:{submit:function(){var t=this;this.$refs.goodsform.validate((function(e){if(e)if(t.isAdd)Object(u["j"])(t.goods).then((function(e){200===e.status?(t.$message.success("添加成功！"),t.$router.push("/score/list")):t.$message.error(e.message)}));else{var s=v({key:t.$store.state.app.activeApp.saa_key},d(t.goods));Object(u["m"])(s).then((function(e){200===e.status?(t.$message.success("修改成功！"),t.$router.back()):t.$message.error(e.message)}))}else t.$message.error("请根据提示，完善商品信息！")}))},getGoodGroup:function(){var t=this;Object(u["h"])({key:this.$store.state.app.activeApp.saa_key}).then((function(e){200===e.status?t.goodGroupList=e.data:204===e.status?t.goodGroupList=[]:t.$message.error(e.message)}))},selectGoodsGroup:function(){var t=this,e=this.goodGroupList.find((function(e){return e.id===t.firstGroupId}));this.firstGroup=void 0===e?[]:e.data,this.firstGroup.length>0?this.goods.category_id=this.firstGroup[0].id:this.goods.category_id=this.firstGroupId},openMainPicPanel:function(){this.maxPicCount>0?this.disPicPanel=!0:this.$message.warning("最多可选择5张图片，已选择".concat(5-this.maxPicCount,"张,不可选择"))},getPicData:function(t){var e=this;this.disPicPanel=!1,t.forEach((function(t){if(!(e.maxPicCount>0))return e.$message.warning("最多可选择5张图片，已选择".concat(5-e.maxPicCount,"张")),!1;e.mainPicList.push(t.pic_url),e.maxPicCount--}))},delMainPic:function(t){this.mainPicList.splice(this.mainPicList.findIndex((function(e){return e===t})),1),this.maxPicCount++},showPropInput:function(t){var e=this;this.isPropInput=!0,this.propEditIndex=t,this.$nextTick((function(){e.$refs.savePropInput[0].$refs.input.focus()}))}}},h=_,b=(s("f018"),s("2877")),y=Object(b["a"])(h,r,l,!1,null,"72170a23",null),x=y.exports,P=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("el-form",{ref:"goodsform",staticClass:"goods-form",attrs:{model:t.goods,rules:t.rules,"label-position":"right","label-width":"100px"}},[s("div",{staticClass:"goods-title"},[t._v("基本信息")]),t._v(" "),s("div",[s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"是否自动发货"}},[s("el-switch",{attrs:{"active-color":"#13ce66","active-value":"1","inactive-value":"0"},model:{value:t.goods.service_goods_is_ship,callback:function(e){t.$set(t.goods,"service_goods_is_ship",e)},expression:"goods.service_goods_is_ship"}})],1),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"商品标题",prop:"name"}},[s("el-input",{staticClass:"goods-form-item-input",attrs:{placeholder:"请输入",size:"small"},model:{value:t.goods.name,callback:function(e){t.$set(t.goods,"name",e)},expression:"goods.name"}}),t._v(" "),s("div",{staticClass:"goods-form-item-text"},[t._v("限30个字，60个字符内")])],1),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"短标题",prop:"short_name"}},[s("el-input",{staticClass:"goods-form-item-input",attrs:{placeholder:"请输入",size:"small"},model:{value:t.goods.short_name,callback:function(e){t.$set(t.goods,"short_name",e)},expression:"goods.short_name"}}),t._v(" "),s("div",{staticClass:"goods-form-item-text"},[t._v("限12个字")])],1),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"简单说明",prop:"simple_info"}},[s("el-input",{staticClass:"goods-form-item-input",attrs:{type:"textarea",rows:1,placeholder:"请输入",size:"small"},model:{value:t.goods.simple_info,callback:function(e){t.$set(t.goods,"simple_info",e)},expression:"goods.simple_info"}}),t._v(" "),s("div",{staticClass:"goods-form-item-text"},[t._v("在商品详情页标题下面展示卖点信息，200字以内")])],1),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"商品货号"}},[s("el-input",{staticClass:"goods-form-item-input",attrs:{placeholder:"请输入",size:"small"},model:{value:t.goods.code,callback:function(e){t.$set(t.goods,"code",e)},expression:"goods.code"}})],1),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"商品单位",prop:"unit"}},[s("el-input",{staticClass:"goods-form-item-input",attrs:{placeholder:"请输入",size:"small"},model:{value:t.goods.unit,callback:function(e){t.$set(t.goods,"unit",e)},expression:"goods.unit"}}),t._v(" "),s("div",{staticClass:"goods-form-item-text"},[t._v("如：件、份、箱")])],1),t._v(" "),t._l(t.goods.attribute,(function(e,o){return s("el-form-item",{key:o,staticClass:"goods-form-item",attrs:{label:0===o?"商品属性":""}},[s("el-input",{staticClass:"goods-form-item-input",attrs:{placeholder:"请输入",size:"small"},model:{value:t.goods.attribute[o],callback:function(e){t.$set(t.goods.attribute,o,e)},expression:"goods.attribute[index]"}}),t._v(" "),0===o?s("el-button",{staticClass:"goods-form-item-button",attrs:{type:"primary",plain:"",size:"small"},on:{click:function(e){return t.goods.attribute.push("")}}},[t._v("添加")]):s("el-button",{staticClass:"goods-form-item-button",attrs:{type:"danger",plain:"",size:"small"},on:{click:function(e){return t.goods.attribute.splice(o,1)}}},[t._v("删除")]),t._v(" "),0===o?s("div",{staticClass:"goods-form-item-text"},[t._v("如：品牌、保质期等。在商品详情顶部，以表格的形式显示，最多6条")]):t._e()],1)})),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"分类"}},[s("div",{staticStyle:{width:"50%"}},[s("el-select",{staticStyle:{width:"calc(50% - 8px)"},attrs:{placeholder:"选择一级分类",size:"small"},on:{change:t.selectGoodsGroup},model:{value:t.firstGroupId,callback:function(e){t.firstGroupId=e},expression:"firstGroupId"}},t._l(t.goodGroupList,(function(t){return s("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1),t._v(" "),t.firstGroup.length>0?s("el-select",{staticStyle:{width:"calc(50% - 8px)","margin-left":"10px"},attrs:{placeholder:"选择二级分类",size:"small"},model:{value:t.goods.m_category_id,callback:function(e){t.$set(t.goods,"m_category_id",e)},expression:"goods.m_category_id"}},t._l(t.firstGroup,(function(t){return s("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1):t._e()],1)]),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"销售区域"}},[s("el-select",{staticClass:"goods-form-item-input",attrs:{placeholder:"选择销售区域",size:"small"},model:{value:t.goods.city_group_id,callback:function(e){t.$set(t.goods,"city_group_id",e)},expression:"goods.city_group_id"}},[s("el-option",{attrs:{label:"全国",value:""}}),t._v(" "),t._l(t.goodsAreaList,(function(t){return s("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})}))],2),t._v(" "),s("div",{staticClass:"goods-form-item-text"},[t._v("选择后代表这个商品只能在这个区域显示销售，不选择则是全国销售")])],1),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"增值服务"}},[s("div",{staticStyle:{width:"50%",display:"inline-flex"}},t._l(t.labels,(function(e,o){return s("el-input",{key:o,style:{flex:1,"margin-left":0===o?"0":"15px"},attrs:{placeholder:"请输入",size:"small"},model:{value:t.labels[o],callback:function(e){t.$set(t.labels,o,e)},expression:"labels[index]"}})})),1),t._v(" "),s("div",{staticClass:"goods-form-item-text"},[t._v("显示在店铺信息下方，最多4个，每个最多4个字")])]),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"商品主图",prop:"pic_urls"}},[s("el-button",{attrs:{type:"primary",plain:"",size:"small"},on:{click:t.openMainPicPanel}},[t._v("选择图片")]),t._v(" "),s("div",{staticClass:"goods-form-item-text",staticStyle:{width:"calc(100% - 150px)"}},[t._v("建议尺寸：750×750，最多上传5张，支持png、jpg、jpeg格式，大小不超过500KB")])],1),t._v(" "),t.mainPicList.length>0?s("el-form-item",{staticClass:"goods-form-item"},t._l(t.mainPicList,(function(e,o){return s("l-pic",{key:o,attrs:{picurl:e,pickey:o,picdata:e,picmargin:"-20px 10px 10px 10px",size:{width:80,height:80},piclist:t.mainPicList},on:{delPic:t.delMainPic}})})),1):t._e(),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"主图缩略图"}},[s("el-button",{attrs:{type:"primary",plain:"",size:"small"},on:{click:t.openBriefPicPanel}},[t._v("选择图片")]),t._v(" "),s("div",{staticClass:"goods-form-item-text",staticStyle:{width:"calc(100% - 150px)"}},[t._v("缩略图用于显示在首页，选择大图模式，建议上传600×350，最多上传一张，支持png、jpg、jpeg格式，大小不超过500KB")])],1),t._v(" "),t.briefPicList.length>0?s("el-form-item",{staticClass:"goods-form-item"},t._l(t.briefPicList,(function(e,o){return s("l-pic",{key:o,attrs:{picurl:e,pickey:o,picdata:e,picmargin:"-20px 10px 10px 10px",size:{width:80,height:80},piclist:t.briefPicList},on:{delPic:t.delBriefMainPic}})})),1):t._e(),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"主视频"}},[s("div",{staticStyle:{width:"50%",display:"inline-block"}},[s("span",{staticStyle:{padding:"0 10px 0 20px"}},[t._v("视频链接")]),t._v(" "),s("el-input",{staticClass:"goods-form-item-input",staticStyle:{width:"calc(100% - 180px)"},attrs:{placeholder:"请输入",size:"small"},model:{value:t.goods.video_url,callback:function(e){t.$set(t.goods,"video_url",e)},expression:"goods.video_url"}})],1),t._v(" "),s("div",{staticClass:"goods-form-item-text"},[t._v("缩略图用于显示在首页，选择大图模式，建议上传600×350，最多上传一张，支持png、jpg、jpeg格式，大小不超过500KB")])]),t._v(" "),""!==t.goods.video_url?s("el-form-item",{staticClass:"goods-form-item",staticStyle:{height:"150px"}},[s("video",{staticClass:"goods-form-item-video",attrs:{src:t.goods.video_url,controls:"controls"}},[t._v("\n          您的浏览器不支持 video 标签。\n        ")])]):t._e()],2),t._v(" "),s("div",{staticClass:"goods-title"},[t._v("商品详情")]),t._v(" "),s("div",{staticStyle:{padding:"10px 20px"}},[s("tinymce",{attrs:{height:300,width:"100%"},model:{value:t.goods.detail_info,callback:function(e){t.$set(t.goods,"detail_info",e)},expression:"goods.detail_info"}})],1),t._v(" "),s("div",{staticClass:"goods-title"},[t._v("拼团设置")]),t._v(" "),s("div",[s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"开启拼团"}},[s("el-switch",{attrs:{"active-color":"#13ce66","active-value":"1","inactive-value":"0"},model:{value:t.goods.is_open_assemble,callback:function(e){t.$set(t.goods,"is_open_assemble",e)},expression:"goods.is_open_assemble"}}),t._v(" "),s("div",{staticClass:"goods-form-item-button-text"},[t._v("开启后，该商品进入拼团模式，类似拼多多最低2人以上才能成交。注：同一商品不能同时开启秒杀、拼团、砍价，只能开启其中一种营销模式")])],1),t._v(" "),s("transition",{attrs:{name:"el-zoom-in-top"}},["1"===t.goods.is_open_assemble?s("div",[s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"单独购买"}},[s("el-switch",{attrs:{"active-color":"#13ce66","active-value":"1","inactive-value":"0"},model:{value:t.goods.is_self,callback:function(e){t.$set(t.goods,"is_self",e)},expression:"goods.is_self"}}),t._v(" "),s("div",{staticClass:"goods-form-item-button-text"},[t._v("是否允许该商品以原价单独购买")])],1),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"虚拟成团"}},[s("el-switch",{attrs:{"active-color":"#13ce66","active-value":"1","inactive-value":"0"},model:{value:t.goods.is_automatic,callback:function(e){t.$set(t.goods,"is_automatic",e)},expression:"goods.is_automatic"}}),t._v(" "),s("div",{staticClass:"goods-form-item-button-text"},[t._v("开启后，未成团的团会在最后五分钟虚拟成团，以便成交订单")])],1),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"老带新"}},[s("el-switch",{attrs:{"active-color":"#13ce66","active-value":"1","inactive-value":"0"},model:{value:t.goods.older_with_newer,callback:function(e){t.$set(t.goods,"older_with_newer",e)},expression:"goods.older_with_newer"}}),t._v(" "),s("div",{staticClass:"goods-form-item-button-text"},[t._v("开启后，该拼团仅能老客户分享给新客户下单")])],1),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"开团人优惠"}},[s("el-switch",{attrs:{"active-color":"#13ce66","active-value":"1","inactive-value":"0"},model:{value:t.goods.is_leader_discount,callback:function(e){t.$set(t.goods,"is_leader_discount",e)},expression:"goods.is_leader_discount"}}),t._v(" "),s("div",{staticClass:"goods-form-item-button-text"},[t._v("开启后，可以设置给开团的团长优惠多少比例")])],1),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"显示团长优惠"}},[s("el-switch",{attrs:{"active-color":"#13ce66","active-value":"1","inactive-value":"0"},model:{value:t.goods.is_show,callback:function(e){t.$set(t.goods,"is_show",e)},expression:"goods.is_show"}}),t._v(" "),s("div",{staticClass:"goods-form-item-button-text"},[t._v("开启后，将把团长的优惠显示在前端")])],1),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"拼团类型"}},[s("el-radio-group",{attrs:{size:"small"},on:{change:t.tuanTypeChange},model:{value:t.goods.tuan_type,callback:function(e){t.$set(t.goods,"tuan_type",e)},expression:"goods.tuan_type"}},[s("el-radio",{attrs:{label:"1",border:""}},[t._v("多人团")]),t._v(" "),s("el-radio",{attrs:{label:"2",border:""}},[t._v("阶级团")])],1)],1),t._v(" "),t._l(t.groupTypeList,(function(e,o){return s("el-form-item",{key:o,staticClass:"goods-form-item"},[s("div",{staticClass:"group-type"},[s("div",[s("div",[s("span",{staticClass:"group-type-title"},[t._v("成团人数")]),t._v(" "),s("el-input",{staticClass:"group-type-input",attrs:{placeholder:"请输入",size:"small"},model:{value:e.assemble_number,callback:function(s){t.$set(e,"assemble_number",s)},expression:"item.assemble_number"}})],1),t._v(" "),0===o?s("div",{staticClass:"group-type-text"},[t._v("该团最终成团人数，最低2人")]):t._e()]),t._v(" "),s("div",[s("div",[s("span",{staticClass:"group-type-title",staticStyle:{width:"100px"}},[t._v("开团优惠比例")]),t._v(" "),s("el-input",{staticClass:"group-type-input",staticStyle:{width:"calc(100% - 145px)"},attrs:{placeholder:"请输入",size:"small"},model:{value:e.assemble_group_discount,callback:function(s){t.$set(e,"assemble_group_discount",s)},expression:"item.assemble_group_discount"}}),t._v(" "),s("span",{staticStyle:{"padding-left":"5px",color:"#90939"}},[t._v("%")])],1),t._v(" "),0===o?s("div",{staticClass:"group-type-text"},[t._v("给开团人的优惠比例，如填10，即10元减1元")]):t._e()]),t._v(" "),s("div",[s("div",[s("span",{staticClass:"group-type-title",staticStyle:{width:"110px"}},[t._v("阶梯团优惠比例")]),t._v(" "),s("el-input",{staticClass:"group-type-input",staticStyle:{width:"calc(100% - 155px)"},attrs:{placeholder:"请输入",size:"small"},model:{value:e.discount,callback:function(s){t.$set(e,"discount",s)},expression:"item.discount"}}),t._v(" "),s("span",{staticStyle:{"padding-left":"5px",color:"#90939"}},[t._v("%")])],1),t._v(" "),0===o?s("div",{staticClass:"group-type-text"},[t._v("以规格里的拼团价为基准，每个阶梯团优惠多少钱")]):t._e()])]),t._v(" "),"2"===t.goods.tuan_type?s("div",{staticStyle:{display:"inline-block"}},[0===o?s("el-button",{staticClass:"goods-form-item-button",attrs:{type:"primary",plain:"",size:"small"},on:{click:function(e){return t.groupTypeList.push({assemble_number:"",assemble_group_discount:"",discount:""})}}},[t._v("添加")]):s("el-button",{staticClass:"goods-form-item-button",attrs:{type:"danger",plain:"",size:"small"},on:{click:function(e){return t.groupTypeList.splice(o,1)}}},[t._v("删除")])],1):t._e()])}))],2):t._e()])],1),t._v(" "),s("div",{staticClass:"goods-title",staticStyle:{"margin-top":"50px"}},[t._v("砍价设置")]),t._v(" "),s("div",[s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"开启砍价"}},[s("el-switch",{attrs:{"active-color":"#13ce66","active-value":"1","inactive-value":"0"},model:{value:t.cutPrice.isOpen,callback:function(e){t.$set(t.cutPrice,"isOpen",e)},expression:"cutPrice.isOpen"}}),t._v(" "),s("div",{staticClass:"goods-form-item-button-text"},[t._v("开启后，该商品进入砍价模式，参与人越多，优惠越多，以最终砍到的价格成交。注：同一商品不能同时开启秒杀、拼团、砍价，只能开启其中一种营销模式")])],1),t._v(" "),s("transition",{attrs:{name:"el-zoom-in-top"}},["1"===t.cutPrice.isOpen?s("div",[s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"活动时间"}},[s("el-date-picker",{staticClass:"goods-form-item-input",attrs:{type:"datetimerange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期",size:"small"},model:{value:t.cutPrice.activeTime,callback:function(e){t.$set(t.cutPrice,"activeTime",e)},expression:"cutPrice.activeTime"}})],1),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"单独购买"}},[s("el-switch",{attrs:{"active-color":"#13ce66","active-value":"1","inactive-value":"0"},model:{value:t.cutPrice.isSelf,callback:function(e){t.$set(t.cutPrice,"isSelf",e)},expression:"cutPrice.isSelf"}}),t._v(" "),s("div",{staticClass:"goods-form-item-text"},[t._v("开启后，该商品支持原价格直接购买")])],1),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"虚拟砍价数"}},[s("el-input",{staticClass:"goods-form-item-input",staticStyle:{width:"20%"},attrs:{placeholder:"请输入",size:"small"},model:{value:t.cutPrice.virtualCount,callback:function(e){t.$set(t.cutPrice,"virtualCount",e)},expression:"cutPrice.virtualCount"}})],1),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"虚拟帮砍人数"}},[s("el-input",{staticClass:"goods-form-item-input",staticStyle:{width:"20%"},attrs:{placeholder:"请输入",size:"small"},model:{value:t.cutPrice.virtualPeopCount,callback:function(e){t.$set(t.cutPrice,"virtualPeopCount",e)},expression:"cutPrice.virtualPeopCount"}})],1),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"最终底价"}},[s("el-input",{staticClass:"goods-form-item-input",staticStyle:{width:"20%"},attrs:{placeholder:"请输入",size:"small"},model:{value:t.cutPrice.floorPrice,callback:function(e){t.$set(t.cutPrice,"floorPrice",e)},expression:"cutPrice.floorPrice"}}),t._v(" "),s("div",{staticClass:"goods-form-item-text",staticStyle:{width:"calc(80% - 100px)"}},[t._v("开启后，该商品支持原价格直接购买")])],1),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"好友帮砍次数"}},[s("el-input",{staticClass:"goods-form-item-input",staticStyle:{width:"20%"},attrs:{placeholder:"请输入",size:"small"},model:{value:t.cutPrice.friendCutCount,callback:function(e){t.$set(t.cutPrice,"friendCutCount",e)},expression:"cutPrice.friendCutCount"}}),t._v(" "),s("div",{staticClass:"goods-form-item-text",staticStyle:{width:"calc(80% - 100px)"}},[t._v("同一个人在该商品发起的砍价最多能砍多少次。注：一个发起砍价活动里，一个人在砍一次")])],1),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"砍价时间限制"}},[s("el-input",{staticClass:"goods-form-item-input",staticStyle:{width:"20%"},attrs:{placeholder:"请输入",size:"small"},model:{value:t.cutPrice.cutTime,callback:function(e){t.$set(t.cutPrice,"cutTime",e)},expression:"cutPrice.cutTime"}}),t._v(" "),s("div",{staticClass:"goods-form-item-text",staticStyle:{width:"calc(80% - 100px)"}},[t._v("默认24小时，超过这个时间，该发起的砍价将失败")])],1),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"砍价规则"}},[s("el-button",{attrs:{type:"primary",plain:"",size:"small"},on:{click:function(e){return t.cutPrice.cutRules.push({price:"",start:"",end:""})}}},[t._v("添 加")]),t._v(" "),s("div",{staticClass:"goods-form-item-button-text"},[t._v("例如设置了大于100元，每次砍价5—10元，则在此区间每次都会在5-10之间随机抽取一个数字砍掉减去。价格砍到哪个区间，就触发哪个规则")])],1),t._v(" "),t._l(t.cutPrice.cutRules,(function(e,o){return s("el-form-item",{key:o,staticClass:"goods-form-item"},[s("el-row",{attrs:{gutter:20}},[s("el-col",{staticClass:"cutprice-col",attrs:{span:6}},[s("span",{staticClass:"cutprice-title"},[t._v("金额大于")]),t._v(" "),s("el-input",{staticStyle:{width:"calc(100% - 90px)","margin-right":"15px"},attrs:{placeholder:"请输入",size:"small"},model:{value:e.price,callback:function(s){t.$set(e,"price",s)},expression:"item.price"}})],1),t._v(" "),s("el-col",{attrs:{span:8}},[s("span",{staticClass:"cutprice-title"},[t._v("活动时间")]),t._v(" "),s("el-input",{staticStyle:{width:"calc(50% - 60px)"},attrs:{placeholder:"请输入",size:"small"},model:{value:e.start,callback:function(s){t.$set(e,"start",s)},expression:"item.start"}}),t._v(" "),s("span",{staticStyle:{padding:"0 7px",color:"#909399"}},[t._v("至")]),t._v(" "),s("el-input",{staticStyle:{width:"calc(50% - 60px)"},attrs:{placeholder:"请输入",size:"small"},model:{value:e.end,callback:function(s){t.$set(e,"end",s)},expression:"item.end"}})],1),t._v(" "),s("el-col",{attrs:{span:2}},[o>0?s("el-button",{staticClass:"goods-form-item-button",attrs:{type:"danger",plain:"",size:"small"},on:{click:function(e){return t.cutPrice.cutRules.splice(o,1)}}},[t._v("删除")]):t._e()],1),t._v(" "),s("el-col",{attrs:{span:8}})],1)],1)}))],2):t._e()])],1),t._v(" "),s("div",{staticClass:"goods-title"},[t._v("价格规格库存")]),t._v(" "),s("div",[s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"规格设置"}},[s("el-radio-group",{attrs:{size:"small"},on:{change:t.goodsPropChange},model:{value:t.goods.stock_type,callback:function(e){t.$set(t.goods,"stock_type",e)},expression:"goods.stock_type"}},[s("el-radio",{attrs:{label:"1",border:""}},[t._v("单规格")]),t._v(" "),s("el-radio",{attrs:{label:"2",border:""}},[t._v("双规格")])],1)],1),t._v(" "),t._l(t.property,(function(e,o){return s("div",{key:o},[s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"规格名称"}},[s("el-input",{staticClass:"goods-form-item-input",staticStyle:{width:"20%"},attrs:{placeholder:"请输入",size:"small"},model:{value:e.name,callback:function(s){t.$set(e,"name",s)},expression:"item.name"}})],1),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"规格值"}},[t._l(e.value,(function(e,i){return s("el-tag",{key:i,staticStyle:{"margin-right":"10px"},attrs:{closable:"","disable-transitions":!1},on:{close:function(e){return t.property[o].value.splice(i,1)}}},[t._v(t._s(e.name))])})),t._v(" "),t.isPropInput&&t.propEditIndex===o?s("el-input",{ref:"savePropInput",refInFor:!0,staticClass:"input-new-tag",attrs:{size:"small"},on:{blur:function(e){return t.setPropValue(o)}},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.setPropValue(o)}},model:{value:t.propValue,callback:function(e){t.propValue=e},expression:"propValue"}}):s("el-button",{staticClass:"button-new-tag",attrs:{size:"small"},on:{click:function(e){return t.showPropInput(o)}}},[t._v("+ 规格值")])],2)],1)})),t._v(" "),s("el-divider",{attrs:{"content-position":"left"}},[t._v("规格明细")]),t._v(" "),t._l(t.property,(function(e,o){return s("div",{key:o+200,staticStyle:{padding:"10px 0"}},[s("div",{staticClass:"prop-table"},[s("el-row",{staticClass:"prop-table-header"},[s("el-col",{attrs:{span:2}},[t._v("图片")]),t._v(" "),s("el-col",{attrs:{span:2}},[t._v("名称")]),t._v(" "),s("el-col",{attrs:{span:2}},[t._v("规格")]),t._v(" "),s("el-col",{attrs:{span:3}},[t._v("现价(元)")]),t._v(" "),s("el-col",{attrs:{span:3}},[t._v("划线价(元)")]),t._v(" "),s("el-col",{attrs:{span:3}},[t._v("库存")]),t._v(" "),s("el-col",{attrs:{span:3}},[t._v("货号")]),t._v(" "),s("el-col",{attrs:{span:3}},[t._v("成本价")]),t._v(" "),s("el-col",{attrs:{span:3}},[t._v("拼团价")])],1),t._v(" "),0===e.value.length?s("div",{staticStyle:{padding:"15px 0"}},[t._v("暂无规格值数据")]):t._l(e.value,(function(i,a){return s("el-row",{key:a,staticClass:"prop-table-row"},[s("el-col",{staticClass:"prop-table-row-col",attrs:{span:2}},[""===i.img?s("div",{staticClass:"img-box-button",on:{click:function(e){t.disPropPicPanel=!0,t.propImgIndex=o,t.propImgKey=a}}},[s("i",{staticClass:"el-icon-plus",staticStyle:{position:"relative",bottom:"4px","font-size":"24px","font-weight":"600",color:"#999"}})]):s("l-pic",{attrs:{picurl:i.img,size:{width:50,height:50},picmargin:"5px auto"},on:{delPic:function(t){i.img=""}}})],1),t._v(" "),s("el-col",{staticClass:"prop-table-row-col",attrs:{span:2}},[t._v(t._s(e.name))]),t._v(" "),s("el-col",{staticClass:"prop-table-row-col",attrs:{span:2}},[t._v(t._s(i.name))]),t._v(" "),s("el-col",{staticClass:"prop-table-row-col",attrs:{span:3}},[s("el-input",{staticStyle:{width:"80%"},attrs:{size:"small"},model:{value:i.price,callback:function(e){t.$set(i,"price",e)},expression:"value.price"}})],1),t._v(" "),s("el-col",{staticClass:"prop-table-row-col",attrs:{span:3}},[s("el-input",{staticStyle:{width:"80%"},attrs:{size:"small"},model:{value:i.floorPrice,callback:function(e){t.$set(i,"floorPrice",e)},expression:"value.floorPrice"}})],1),t._v(" "),s("el-col",{staticClass:"prop-table-row-col",attrs:{span:3}},[s("el-input",{staticStyle:{width:"80%"},attrs:{size:"small"},model:{value:i.number,callback:function(e){t.$set(i,"number",e)},expression:"value.number"}})],1),t._v(" "),s("el-col",{staticClass:"prop-table-row-col",attrs:{span:3}},[s("el-input",{staticStyle:{width:"80%"},attrs:{size:"small"},model:{value:i.code,callback:function(e){t.$set(i,"code",e)},expression:"value.code"}})],1),t._v(" "),s("el-col",{staticClass:"prop-table-row-col",attrs:{span:3}},[s("el-input",{staticStyle:{width:"80%"},attrs:{size:"small"},model:{value:i.cost_price,callback:function(e){t.$set(i,"cost_price",e)},expression:"value.cost_price"}})],1),t._v(" "),s("el-col",{staticClass:"prop-table-row-col",attrs:{span:3}},[s("el-input",{staticStyle:{width:"80%"},attrs:{size:"small"},model:{value:i.assemble_price,callback:function(e){t.$set(i,"assemble_price",e)},expression:"value.assemble_price"}})],1)],1)}))],2)])})),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"商品价格",prop:"price"}},[s("el-input",{staticClass:"goods-form-item-input",staticStyle:{width:"20%"},attrs:{placeholder:"请输入",size:"small"},model:{value:t.goods.price,callback:function(e){t.$set(t.goods,"price",e)},expression:"goods.price"}}),t._v(" "),s("div",{staticClass:"goods-form-item-text",staticStyle:{width:"calc(80% - 100px)"}},[t._v("商品销售的价格")])],1),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"划线价"}},[s("el-input",{staticClass:"goods-form-item-input",staticStyle:{width:"20%"},attrs:{placeholder:"请输入",size:"small"},model:{value:t.goods.line_price,callback:function(e){t.$set(t.goods,"line_price",e)},expression:"goods.line_price"}})],1),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"库存",prop:"stocks"}},[s("el-input",{staticClass:"goods-form-item-input",staticStyle:{width:"20%"},attrs:{placeholder:"请输入",size:"small"},model:{value:t.goods.stocks,callback:function(e){t.$set(t.goods,"stocks",e)},expression:"goods.stocks"}}),t._v(" "),s("div",{staticClass:"goods-form-item-text",staticStyle:{width:"calc(80% - 100px)"}},[t._v("库存为0时，会放到[已售罄]的商品列表里，保存后，买家看到的商品可售库存同步更新")])],1),t._v(" "),s("el-form-item",{staticClass:"goods-form-item"},[s("el-switch",{attrs:{"active-color":"#13ce66","active-value":"1","inactive-value":"0"},model:{value:t.cutPrice.isOpen,callback:function(e){t.$set(t.cutPrice,"isOpen",e)},expression:"cutPrice.isOpen"}}),t._v(" "),s("div",{staticClass:"goods-form-item-text",staticStyle:{width:"calc(80% - 100px)"}},[t._v("库存为0时，是否自动下架，如不开启，库存为0，商品还会在首页正常显示，显示已售完")])],1),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"虚拟销量"}},[s("el-input",{staticClass:"goods-form-item-input",staticStyle:{width:"20%"},attrs:{placeholder:"请输入",size:"small"},model:{value:t.goods.sales_number,callback:function(e){t.$set(t.goods,"sales_number",e)},expression:"goods.sales_number"}}),t._v(" "),s("div",{staticClass:"goods-form-item-text",staticStyle:{width:"calc(80% - 100px)"}},[t._v("前端显示的虚拟销量，增加商品热度")])],1),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"限量"}},[s("el-switch",{attrs:{"active-color":"#13ce66","active-value":"1","inactive-value":"0"},model:{value:t.goods.is_limit,callback:function(e){t.$set(t.goods,"is_limit",e)},expression:"goods.is_limit"}}),t._v(" "),s("el-input",{staticClass:"goods-form-item-input",staticStyle:{width:"20%"},attrs:{placeholder:"请输入",size:"small"},model:{value:t.goods.limit_number,callback:function(e){t.$set(t.goods,"limit_number",e)},expression:"goods.limit_number"}}),t._v(" "),s("div",{staticClass:"goods-form-item-text",staticStyle:{width:"calc(80% - 100px)"}},[t._v("限制单个用户最多购买数")])],1),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"绑定自提点"}},[s("el-select",{staticStyle:{width:"20%"},attrs:{value:"1",size:"small"}},[s("el-option",{attrs:{label:"未选择",value:"1"}})],1),t._v(" "),s("div",{staticClass:"goods-form-item-text",staticStyle:{width:"calc(80% - 100px)"}},[t._v("绑定自提点后，该商品只能由该自提点的微信核销，适合服务商品，或者特殊指定自提点的商品")])],1)],2),t._v(" "),s("div",{staticClass:"goods-title"},[t._v("佣金设置")]),t._v(" "),s("div",[s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"开启单独设置"}},[s("el-switch",{attrs:{"active-color":"#13ce66","active-value":"1","inactive-value":"0"},model:{value:t.other,callback:function(e){t.other=e},expression:"other"}}),t._v(" "),s("div",{staticClass:"goods-form-item-text",staticStyle:{width:"calc(80% - 100px)"}},[t._v("开启后，佣金设置将按照此处设置的比例计算，如不开启，将走总设置")])],1),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"团长佣金"}},[s("el-input",{staticClass:"goods-form-item-input",staticStyle:{width:"20%"},attrs:{placeholder:"请输入",size:"small"},model:{value:t.goods.commission_selfleader_ratio,callback:function(e){t.$set(t.goods,"commission_selfleader_ratio",e)},expression:"goods.commission_selfleader_ratio"}}),t._v(" "),s("div",{staticClass:"goods-form-item-text",staticStyle:{width:"calc(80% - 100px)"}},[t._v("%")])],1),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"自提点佣金"}},[s("el-input",{staticClass:"goods-form-item-input",staticStyle:{width:"20%"},attrs:{placeholder:"请输入",size:"small"},model:{value:t.goods.commission_leader_ratio,callback:function(e){t.$set(t.goods,"commission_leader_ratio",e)},expression:"goods.commission_leader_ratio"}}),t._v(" "),s("div",{staticClass:"goods-form-item-text",staticStyle:{width:"calc(80% - 100px)"}},[t._v("%")])],1)],1),t._v(" "),s("div",{staticClass:"goods-title"},[t._v("其他信息")]),t._v(" "),s("div",[s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"上架时间"}},[s("el-radio",{attrs:{label:"0"},model:{value:t.goods.start_type,callback:function(e){t.$set(t.goods,"start_type",e)},expression:"goods.start_type"}},[t._v("立即上架")])],1),t._v(" "),s("el-form-item",{staticClass:"goods-form-item"},[s("el-radio",{attrs:{label:"1"},model:{value:t.goods.start_type,callback:function(e){t.$set(t.goods,"start_type",e)},expression:"goods.start_type"}},[t._v("自定义上架")]),t._v(" "),s("el-date-picker",{attrs:{type:"datetime",placeholder:"选择上架时间",size:"small"},model:{value:t.goods.start_time,callback:function(e){t.$set(t.goods,"start_time",e)},expression:"goods.start_time"}})],1),t._v(" "),s("el-form-item",{staticClass:"goods-form-item"},[s("el-radio",{attrs:{label:"2"},model:{value:t.goods.start_type,callback:function(e){t.$set(t.goods,"start_type",e)},expression:"goods.start_type"}},[t._v("放入仓库，暂不售卖")])],1),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"下架时间"}},[s("el-date-picker",{attrs:{type:"datetime",placeholder:"选择下架时间",size:"small"},model:{value:t.goods.end_time,callback:function(e){t.$set(t.goods,"end_time",e)},expression:"goods.end_time"}})],1),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"提货时间"}},[s("el-date-picker",{attrs:{type:"datetime",placeholder:"选择提货时间",size:"small"},model:{value:t.goods.take_goods_time,callback:function(e){t.$set(t.goods,"take_goods_time",e)},expression:"goods.take_goods_time"}})],1),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"团长专属"}},[s("el-switch",{attrs:{"active-color":"#13ce66","active-value":"1","inactive-value":"0"},model:{value:t.goods.regimental_only,callback:function(e){t.$set(t.goods,"regimental_only",e)},expression:"goods.regimental_only"}}),t._v(" "),s("div",{staticClass:"goods-form-item-text",staticStyle:{width:"calc(80% - 100px)"}},[t._v("开启后，该商品只有团长才能购买，未启用团购模式，无需开启")])],1),t._v(" "),s("el-form-item",{staticClass:"goods-form-item",attrs:{label:"排序"}},[s("el-input",{staticClass:"goods-form-item-input",staticStyle:{width:"20%"},attrs:{placeholder:"请输入",size:"small"},model:{value:t.goods.sort,callback:function(e){t.$set(t.goods,"sort",e)},expression:"goods.sort"}})],1)],1)]),t._v(" "),s("div",{staticStyle:{"text-align":"center","margin-top":"50px"}},[s("el-button",{staticStyle:{padding:"10px 30px","font-weight":"600"},attrs:{type:"primary"},on:{click:t.submit}},[t._v("提 交")])],1),t._v(" "),s("Modal",{attrs:{width:"1128","footer-hide":!0},model:{value:t.disPicPanel,callback:function(e){t.disPicPanel=e},expression:"disPicPanel"}},[t.disPicPanel?s("photo-album",{attrs:{maxcount:t.maxPicCount},on:{selectPicData:t.getPicData}}):t._e()],1),t._v(" "),s("Modal",{attrs:{width:"1128","footer-hide":!0},model:{value:t.disBriefPicPanel,callback:function(e){t.disBriefPicPanel=e},expression:"disBriefPicPanel"}},[t.disBriefPicPanel?s("photo-album",{attrs:{maxcount:t.maxBriefPicCount},on:{selectPicData:t.getBriefPicData}}):t._e()],1),t._v(" "),s("Modal",{attrs:{width:"1128","footer-hide":!0},model:{value:t.disPropPicPanel,callback:function(e){t.disPropPicPanel=e},expression:"disPropPicPanel"}},[t.disPropPicPanel?s("photo-album",{attrs:{maxcount:1},on:{selectPicData:t.getPropPicData}}):t._e()],1)],1)},C=[],k=(s("673e"),s("0c12")),w=s("c40e"),O=s("5f87"),$={name:"Virtual",components:{PhotoAlbum:m["a"],LPic:p["a"],Tinymce:f["a"]},props:{goods:{type:Object,required:!0},isAdd:{type:Boolean,required:!0}},data:function(){return{rules:n,goodGroupList:[],firstGroup:[],firstGroupId:"",goodsAreaList:[],labels:["","","",""],disPicPanel:!1,maxPicCount:5,mainPicList:[],disBriefPicPanel:!1,maxBriefPicCount:1,briefPicList:[],videoUrl:Object(k["d"])(),token:Object(O["d"])(),groupTypeList:[{assemble_number:"",assemble_group_discount:"",discount:""}],cutPrice:void 0,property:void 0,isPropInput:!1,propEditIndex:0,propValue:"",disPropPicPanel:!1,propImgIndex:0,propImgKey:0,other:"1"}},watch:{goodGroupList:function(t){t.length>0&&(this.firstGroupId=t[0].id,this.selectGoodsGroup())},labels:function(t){var e=this;this.goods.label="",t.forEach((function(t,s){""!==t.trim()&&(e.goods.label+=s<3?t+",":t)}))},mainPicList:function(t){var e=this;0===t.length?this.goods.pic_urls="":t.forEach((function(t,s){e.goods.pic_urls+=s<4?t+",":t}))},groupTypeList:function(t){"1"===this.goods.tuan_type&&(this.goods.assemble_number=t[0].assemble_number,this.goods.assemble_group_discount=t[0].assemble_group_discount)}},mounted:function(){var t=this;this.getGoodGroup(),this.getGoodsArea(),this.labels=this.goods.label.split(",");for(var e=this.labels.length;e<4;e++)this.labels[e]="";this.mainPicList=[],this.goods.pic_urls.split(",").forEach((function(e){""!==e&&null!==e&&void 0!==e&&(t.mainPicList.push(e),t.maxPicCount--)})),this.goodsPropChange()},methods:{submit:function(){var t=this;this.$refs.goodsform.validate((function(e){e?t.isAdd?Object(k["c"])(t.goods).then((function(e){200===e.status?(t.$message.success("添加成功！"),t.$router.push("/goods/list")):t.$message.error(e.message)})):Object(w["r"])(t.goods).then((function(e){200===e.status?(t.$message.success("修改成功！"),t.$router.push("/goods/list")):t.$message.error(e.message)})):t.$message.error("请根据提示，完善商品信息！")}))},getGoodGroup:function(){var t=this;Object(k["b"])({key:this.$store.state.app.activeApp.saa_key}).then((function(e){200===e.status?t.goodGroupList=e.data:204===e.status?t.goodGroupList=[]:t.$message.error(e.message)}))},getGoodsArea:function(){var t=this;Object(k["a"])({key:this.$store.state.app.activeApp.saa_key,status:1}).then((function(e){200===e.status?t.goodsAreaList=e.data:204===e.status?t.goodsAreaList=[]:t.$message.error(e.message)}))},selectGoodsGroup:function(){var t=this,e=this.goodGroupList.find((function(e){return e.id===t.firstGroupId}));this.firstGroup=void 0===e?[]:e.sub,this.firstGroup.length>0?this.goods.m_category_id=this.firstGroup[0].id:this.goods.m_category_id=this.firstGroupId},openMainPicPanel:function(){this.maxPicCount>0?this.disPicPanel=!0:this.$message.warning("最多可选择5张图片，已选择".concat(5-this.maxPicCount,"张,不可选择"))},getPicData:function(t){var e=this;this.disPicPanel=!1,t.forEach((function(t){if(!(e.maxPicCount>0))return e.$message.warning("最多可选择5张图片，已选择".concat(5-e.maxPicCount,"张")),!1;e.mainPicList.push(t.pic_url),e.maxPicCount--}))},delMainPic:function(t){this.mainPicList.splice(this.mainPicList.findIndex((function(e){return e===t})),1),this.maxPicCount++},openBriefPicPanel:function(){this.maxBriefPicCount>0?this.disBriefPicPanel=!0:this.$message.warning("最多可选择1张图片，已选择1张,不可选择")},getBriefPicData:function(t){var e=this;this.disBriefPicPanel=!1,t.forEach((function(t){if(!(e.maxBriefPicCount>0))return e.$message.warning("最多可选择1张图片，已选择1张"),!1;e.briefPicList.push(t.pic_url),e.maxBriefPicCount--}))},delBriefMainPic:function(t){this.briefPicList.splice(this.briefPicList.findIndex((function(e){return e===t})),1),this.maxBriefPicCount++},videoSuccess:function(t){200===t.status?(this.$message.success("上传成功！"),this.goods.video_id=t.data.video_id,this.goods.video_pic_url=t.data.video_pic_url,this.goods.video_url=t.data.video_url):this.$message.error(t.message)},tuanTypeChange:function(){"1"===this.goods.tuan_type&&this.groupTypeList.length>=2&&this.groupTypeList.splice(1,this.groupTypeList.length-1)},goodsPropChange:function(){"1"===this.goods.stock_type?this.property.length>1&&this.property.splice(1,this.property.length-1):1===this.property.length&&this.property.push({name:"",value:[]})},showPropInput:function(t){var e=this;this.isPropInput=!0,this.propEditIndex=t,this.$nextTick((function(){e.$refs.savePropInput[0].$refs.input.focus()}))},setPropValue:function(t){var e=this.propValue;e&&this.property[t].value.push({name:e,price:"",floorPrice:"",cost_price:"",assemble_price:"",number:"",code:"",img:""}),this.isPropInput=!1,this.propValue=""},getPropPicData:function(t){this.disPropPicPanel=!1,this.property[this.propImgIndex].value[this.propImgKey].img=t[0].pic_url}}},S=$,j=(s("5b66"),Object(b["a"])(S,P,C,!1,null,"a63ce75e",null)),G=j.exports;function z(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),s.push.apply(s,o)}return s}function L(t){for(var e=1;e<arguments.length;e++){var s=null!=arguments[e]?arguments[e]:{};e%2?z(Object(s),!0).forEach((function(e){Object(a["a"])(t,e,s[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):z(Object(s)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(s,e))}))}return t}var I={name:"add",components:{Entity:x,Virtual:G},data:function(){return{goods:L({key:this.$store.state.app.activeApp.saa_key},c),isEntity:!0,type:1,id:this.$route.query.id,isAdd:!0}},watch:{type:function(t){this.goods.type=t}},mounted:function(){this.id&&(this.getGoods(),this.isAdd=!1)},methods:{switchType:function(t){this.type=t},getGoods:function(){var t=this,e={key:this.$store.state.app.activeApp.saa_key,id:this.id};Object(u["e"])(e).then((function(e){200===e.status?t.goods=e.data:204===e.status?t.$message.warning("未查询到该商品数据"):t.$message.error(e.message)}))}}},T=I,E=(s("78cf"),Object(b["a"])(T,o,i,!1,null,"12138182",null));e["default"]=E.exports},"673e":function(t,e,s){"use strict";s("386b")("sub",(function(t){return function(){return t(this,"sub","","")}}))},"78cf":function(t,e,s){"use strict";var o=s("eeae"),i=s.n(o);i.a},8757:function(t,e,s){"use strict";s.d(e,"h",(function(){return i})),s.d(e,"k",(function(){return a})),s.d(e,"o",(function(){return r})),s.d(e,"c",(function(){return l})),s.d(e,"f",(function(){return c})),s.d(e,"e",(function(){return n})),s.d(e,"j",(function(){return d})),s.d(e,"m",(function(){return u})),s.d(e,"b",(function(){return m})),s.d(e,"g",(function(){return p})),s.d(e,"n",(function(){return f})),s.d(e,"d",(function(){return g})),s.d(e,"i",(function(){return v})),s.d(e,"l",(function(){return _})),s.d(e,"a",(function(){return h}));var o=s("b775");function i(t){return Object(o["a"])({url:"/merchantScoreCategory",method:"get",params:t})}function a(t){return Object(o["a"])({url:"/merchantScoreCategory",method:"post",data:t})}function r(t){var e=t.id;return delete t.id,Object(o["a"])({url:"/merchantScoreCategory/"+e,method:"put",data:t})}function l(t){var e=t.id;return delete t.id,Object(o["a"])({url:"/merchantScoreCategory/"+e,method:"delete",data:t})}function c(t){return Object(o["a"])({url:"/merchantScoreGoods",method:"get",params:t})}function n(t){var e=t.id;return delete t.id,Object(o["a"])({url:"/merchantScoreGoods/"+e,method:"get",params:t})}function d(t){return Object(o["a"])({url:"/merchantScoreGoods",method:"post",data:t})}function u(t){var e=t.id;return delete t.id,Object(o["a"])({url:"/merchantScoreGoods/"+e,method:"put",data:t})}function m(t){var e=t.id;return delete t.id,Object(o["a"])({url:"/merchantScoreGoods/"+e,method:"delete",data:t})}function p(t){return Object(o["a"])({url:"/merchantScoreOrder",method:"get",params:t})}function f(t){console.log("putOrderStatus");var e=t.id;return delete t.id,Object(o["a"])({url:"/merchantScoreOrder/"+e,method:"put",data:t})}function g(t){return Object(o["a"])({url:"/merchantScoreBanner",method:"get",params:t})}function v(t){return Object(o["a"])({url:"/merchantScoreBanner",method:"post",data:t})}function _(t){var e=t.id;return delete t.id,Object(o["a"])({url:"/merchantScoreBanner/"+e,method:"put",data:t})}function h(t){var e=t.id;return delete t.id,Object(o["a"])({url:"/merchantScoreBanner/"+e,method:"delete",data:t})}},c40e:function(t,e,s){"use strict";s.d(e,"f",(function(){return i})),s.d(e,"o",(function(){return a})),s.d(e,"t",(function(){return r})),s.d(e,"v",(function(){return l})),s.d(e,"b",(function(){return c})),s.d(e,"h",(function(){return n})),s.d(e,"g",(function(){return d})),s.d(e,"p",(function(){return u})),s.d(e,"u",(function(){return m})),s.d(e,"c",(function(){return p})),s.d(e,"j",(function(){return f})),s.d(e,"k",(function(){return g})),s.d(e,"e",(function(){return v})),s.d(e,"l",(function(){return _})),s.d(e,"s",(function(){return h})),s.d(e,"r",(function(){return b})),s.d(e,"a",(function(){return y})),s.d(e,"x",(function(){return x})),s.d(e,"m",(function(){return P})),s.d(e,"i",(function(){return C})),s.d(e,"q",(function(){return k})),s.d(e,"w",(function(){return w})),s.d(e,"d",(function(){return O})),s.d(e,"n",(function(){return $})),s.d(e,"y",(function(){return S}));var o=s("b775");function i(t){return Object(o["a"])({url:"/merchantCategory",method:"get",params:t})}function a(t){return Object(o["a"])({url:"/merchantCategory",method:"POST",data:t})}function r(t){return Object(o["a"])({url:"/merchantCategory/"+t.id,method:"PUT",data:t})}function l(t){return Object(o["a"])({url:"/merchantCategoryStatus/"+t.id,method:"PUT",data:t})}function c(t){return Object(o["a"])({url:"/merchantCategory/"+t.id,method:"DELETE",data:t})}function n(t){return Object(o["a"])({url:"/merchantCategoryParent",method:"get",params:t})}function d(t){return Object(o["a"])({url:"/merchantGrouping",method:"get",params:t})}function u(t){return Object(o["a"])({url:"/merchantGrouping",method:"POST",data:t})}function m(t){return Object(o["a"])({url:"/merchantGrouping/"+t.id,method:"PUT",data:t})}function p(t){return Object(o["a"])({url:"/merchantGrouping/"+t.id,method:"DELETE",data:t})}function f(t){return Object(o["a"])({url:"/merchantGoods",method:"get",params:t})}function g(t){return Object(o["a"])({url:"/merchantGoodsName",method:"get",params:t})}function v(t){var e=t.id;return delete t.id,Object(o["a"])({url:"/merchantGoods/"+e,method:"get",params:t})}function _(t){var e=t.id;return delete t.id,Object(o["a"])({url:"/merchantGoodsQCode/"+e,method:"get",params:t})}function h(t){var e=t.id;return delete t.id,Object(o["a"])({url:"/merchantIsUpdate/"+e,method:"get",params:t})}function b(t){var e=t.id;return delete t.id,Object(o["a"])({url:"/merchantGoods/"+e,method:"put",data:t})}function y(t){var e=t.id;return delete t.id,Object(o["a"])({url:"/merchantGoods/"+e,method:"delete",data:t})}function x(t){var e=t.id;return delete t.id,Object(o["a"])({url:"/merchantGood/"+e,method:"put",data:t})}function P(t){return Object(o["a"])({url:"/merchantCategoryTypeSub",method:"get",params:t})}function C(t){return Object(o["a"])({url:"/merchantGoodsLabel",method:"get",params:t})}function k(t){return Object(o["a"])({url:"/merchantGoodsLabel",method:"POST",data:t})}function w(t){return Object(o["a"])({url:"/merchantGoodsLabel/"+t.id,method:"PUT",data:t})}function O(t){return Object(o["a"])({url:"/merchantGoodsLabel/"+t.id,method:"DELETE",data:t})}function $(t){return Object(o["a"])({url:"/merchantGoodsRecycle",method:"get",params:t})}function S(t){var e=t.id;return delete t.id,Object(o["a"])({url:"/merchantGoodReduction/"+e,method:"PUT",data:t})}},ed08:function(t,e,s){"use strict";s.d(e,"a",(function(){return i}));s("28a5"),s("a481"),s("6b54");var o=s("7618");function i(t,e){if(0===arguments.length)return null;var s,i=e||"{y}-{m}-{d} {h}:{i}:{s}";"object"===Object(o["a"])(t)?s=t:("string"===typeof t&&/^[0-9]+$/.test(t)&&(t=parseInt(t)),"number"===typeof t&&10===t.toString().length&&(t*=1e3),s=new Date(t));var a={y:s.getFullYear(),m:s.getMonth()+1,d:s.getDate(),h:s.getHours(),i:s.getMinutes(),s:s.getSeconds(),a:s.getDay()},r=i.replace(/{(y|m|d|h|i|s|a)+}/g,(function(t,e){var s=a[e];return"a"===e?["日","一","二","三","四","五","六"][s]:(t.length>0&&s<10&&(s="0"+s),s||0)}));return r}},eeae:function(t,e,s){},f018:function(t,e,s){"use strict";var o=s("3c13"),i=s.n(o);i.a}}]);