(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0b5ce6d1"],{1292:function(t,e,a){},2851:function(t,e,a){"use strict";var i=function(){var t=this,e=t._self._c;return e("el-card",{staticClass:"form-container",attrs:{shadow:"never"}},[e("el-steps",{attrs:{active:t.active,"finish-status":"success","align-center":""}},[e("el-step",{attrs:{title:"商品息信"}}),e("el-step",{attrs:{title:"商品展示"}}),e("el-step",{attrs:{title:"图片及详情"}})],1),e("product-info-detail",{directives:[{name:"show",rawName:"v-show",value:t.showStatus[0],expression:"showStatus[0]"}],attrs:{"is-edit":t.isEdit},on:{nextStep:t.nextStep},model:{value:t.productParam,callback:function(e){t.productParam=e},expression:"productParam"}}),e("product-sale-detail",{directives:[{name:"show",rawName:"v-show",value:t.showStatus[1],expression:"showStatus[1]"}],attrs:{"is-edit":t.isEdit},on:{nextStep:t.nextStep,prevStep:t.prevStep},model:{value:t.productParam,callback:function(e){t.productParam=e},expression:"productParam"}}),e("product-attr-detail",{directives:[{name:"show",rawName:"v-show",value:t.showStatus[2],expression:"showStatus[2]"}],attrs:{"is-edit":t.isEdit},on:{finishCommit:t.finishCommit,nextStep:t.nextStep,prevStep:t.prevStep},model:{value:t.productParam,callback:function(e){t.productParam=e},expression:"productParam"}})],1)},r=[],n=function(){var t=this,e=t._self._c;return e("div",{staticStyle:{"margin-top":"50px"}},[e("el-form",{ref:"productInfoForm",staticStyle:{width:"600px"},attrs:{model:t.value,rules:t.rules,"label-width":"120px",size:"small"}},[e("el-form-item",{attrs:{label:"商品分类:",prop:"productCategoryId"}},[e("el-cascader",{attrs:{"change-on-select":"",options:t.productCateOptions},model:{value:t.selectProductCateValue,callback:function(e){t.selectProductCateValue=e},expression:"selectProductCateValue"}})],1),e("el-form-item",{attrs:{label:"商品名称:",prop:"name"}},[e("el-input",{model:{value:t.value.name,callback:function(e){t.$set(t.value,"name",e)},expression:"value.name"}})],1),e("el-form-item",{attrs:{label:"副标题:",prop:"subTitle"}},[e("el-input",{model:{value:t.value.subTitle,callback:function(e){t.$set(t.value,"subTitle",e)},expression:"value.subTitle"}})],1),e("el-form-item",{attrs:{label:"商品品牌:",prop:"brandId"}},[e("el-select",{attrs:{placeholder:"请选择品牌"},on:{change:t.handleBrandChange},model:{value:t.value.brandId,callback:function(e){t.$set(t.value,"brandId",e)},expression:"value.brandId"}},t._l(t.brandOptions,(function(t){return e("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),e("el-form-item",{attrs:{label:"商品介绍:"}},[e("el-input",{attrs:{"auto-size":!0,type:"textarea",placeholder:"请输入内容"},model:{value:t.value.description,callback:function(e){t.$set(t.value,"description",e)},expression:"value.description"}})],1),e("el-form-item",{attrs:{label:"商品货号:"}},[e("el-input",{model:{value:t.value.productSn,callback:function(e){t.$set(t.value,"productSn",e)},expression:"value.productSn"}})],1),e("el-form-item",{attrs:{label:"商品售价:"}},[e("el-input",{model:{value:t.value.price,callback:function(e){t.$set(t.value,"price",e)},expression:"value.price"}})],1),e("el-form-item",{attrs:{label:"惠农价:"}},[e("el-input",{model:{value:t.value.originalPrice,callback:function(e){t.$set(t.value,"originalPrice",e)},expression:"value.originalPrice"}})],1),e("el-form-item",{attrs:{label:"商品库存:"}},[e("el-input",{model:{value:t.value.stock,callback:function(e){t.$set(t.value,"stock",e)},expression:"value.stock"}})],1),e("el-form-item",{attrs:{label:"计量单位:"}},[e("el-select",{attrs:{placeholder:"请选择计量单位"},model:{value:t.value.unit,callback:function(e){t.$set(t.value,"unit",e)},expression:"value.unit"}},t._l(t.unitOptions,(function(t){return e("el-option",{key:t.id,attrs:{label:t.id,value:t.id}})})),1)],1),e("el-form-item",{attrs:{label:"商品重量:"}},[e("el-input",{staticStyle:{width:"300px"},model:{value:t.value.weight,callback:function(e){t.$set(t.value,"weight",e)},expression:"value.weight"}}),e("span",{staticStyle:{"margin-left":"20px"}},[t._v("千克")])],1),e("el-form-item",{attrs:{label:"排序"}},[e("el-input",{model:{value:t.value.sort,callback:function(e){t.$set(t.value,"sort",e)},expression:"value.sort"}})],1),e("el-form-item",{staticStyle:{"text-align":"center"}},[e("el-button",{attrs:{type:"primary",size:"medium"},on:{click:function(e){return t.handleNext("productInfoForm")}}},[t._v("下一步")])],1)],1)],1)},o=[],l=a("d1f3"),s=a("b775");function u(t){return Object(s["a"])({url:"/sys/SysArea/"+t,method:"get"})}function c(t){return Object(s["a"])({url:"/sys/SysArea/list/withChildren",method:"get",params:t})}function d(t){return Object(s["a"])({url:"/ums/UmsMemberTag/list",method:"get",params:t})}var p=a("9add");function h(t){return Object(s["a"])({url:"/sys/sysStoreClass/list",method:"get",params:t})}function m(t){return Object(s["a"])({url:"/pms/PmsFeightTemplate/list",method:"get",params:t})}var f=a("c4c8"),v=[],g={name:"ProductInfoDetail",props:{value:Object,isEdit:{type:Boolean,default:!1}},data:function(){return{hasEditCreated:!1,selectProductCateValue:[],productCateOptions:[],selectAreaValue:[],areaOptions:[],brandOptions:[],storeClassOptions:[],area:null,TagList:[],areaList:[],feightTemplateOptions:[],unitOptions:[{id:"个",name:"个"},{id:"袋",name:"袋"},{id:"箱",name:"箱"},{id:"条",name:"条"},{id:"盒",name:"盒"},{id:"包",name:"包"},{id:"斤",name:"斤"},{id:"两",name:"两"},{id:"件",name:"件"},{id:"瓶",name:"瓶"},{id:"千克",name:"千克"}],rules:{name:[{required:!0,message:"请输入商品名称",trigger:"blur"},{min:2,max:140,message:"长度在 2 到 140 个字符",trigger:"blur"}],subTitle:[{required:!0,message:"请输入商品副标题",trigger:"blur"}],productCategoryId:[{required:!0,message:"请选择商品分类",trigger:"blur"}],brandId:[{required:!0,message:"请选择商品品牌",trigger:"blur"}],description:[{required:!0,message:"请输入商品介绍",trigger:"blur"}],requiredProp:[{required:!0,message:"该项为必填项",trigger:"blur"}]}}},computed:{productId:function(){return this.value.id}},watch:{productId:function(t){this.isEdit&&(this.hasEditCreated||(console.log(t),void 0!==t&&null!=t&&0!==t&&this.handleEditCreated()))},selectProductCateValue:function(t){null!=t?(this.value.productCategoryId=t[t.length-1>0?t.length-1:0],this.value.productCategoryName=this.getCateNameById(this.value.productCategoryId)):(this.value.productCategoryId=null,this.value.productCategoryName=null)},selectAreaValue:function(t){var e=this;null!=t?(console.log(t),this.value.areaId=t[t.length-1>0?t.length-1:0],u(this.value.areaId).then((function(t){e.value.areaName=t.data.name}))):(this.value.areaId=null,this.value.areaName=null)}},created:function(){this.getProductCateList(),this.getBrandList()},methods:{changeRole:function(t){v=[],t.forEach((function(t,e){var a={id:t};v.push(a)}))},deleteTag:function(t){v.forEach((function(e,a){e.id===t&&v.splice(a,t)}))},afterErrorMethod:function(t){var e=[];v.forEach((function(t,a){e.push(t.id)})),this.value.tagList=e},handleEditCreated:function(){var t=this;if(console.log(this.value),null!=this.value.productCategoryId){var e=[];e.push(this.value.cateParentId),e.push(this.value.productCategoryId),this.selectProductCateValue=e}null!=this.value.areaId&&u(this.value.areaId).then((function(e){t.selectAreaValue.push(e.data.pid),t.selectAreaValue.push(t.value.areaId)})),console.log(this.selectAreaValue),v=[];var a=[];this.value.tagList.forEach((function(t,e){a.push(t.id);var i={id:t.id};v.push(i)})),console.log(this.value.tagList),this.value.tagList=a,this.hasEditCreated=!0},getAreaList:function(){var t=this;c().then((function(e){var a=e.data;t.areaList=a,t.areaOptions=[];for(var i=0;i0)for(var n=0;n0)for(var n=0;n0){for(var a=0;a0?this.toolbar:tt,menubar:!1,plugins:Q,end_container_on_empty_block:!0,powerpaste_word_import:"clean",code_dialog_height:450,code_dialog_width:1e3,advlist_bullet_styles:"square",advlist_number_styles:"default",imagetools_cors_hosts:["www.tinymce.com","codepen.io"],default_link_target:"_blank",link_title:!1,init_instance_callback:function(a){e.value&&a.setContent(e.value),e.hasInit=!0,a.on("NodeChange Change KeyUp SetContent",(function(){t.hasChange=!0,t.$emit("input",a.getContent())}))}})},destroyTinymce:function(){window.tinymce.get(this.tinymceId)&&window.tinymce.get(this.tinymceId).destroy()},setContent:function(t){window.tinymce.get(this.tinymceId).setContent(t)},getContent:function(){window.tinymce.get(this.tinymceId).getContent()},imageSuccessCBK:function(t){var e=this;t.forEach((function(t){window.tinymce.get(e.tinymceId).insertContent(''))}))}}},at=et,it=(a("3f4f"),Object(P["a"])(at,q,M,!1,null,"4b130a7e",null)),rt=it.exports,nt={name:"ProductAttrDetail",components:{SingleUpload:_["a"],MultiUpload:U,Tinymce:rt},props:{value:Object,isEdit:{type:Boolean,default:!1}},data:function(){return{hasEditCreated:!1,productAttributeCategoryOptions:[],selectProductAttr:[],selectProductParam:[],selectProductAttrPics:[],addProductAttrValue:"",activeHtmlName:"mobile"}},computed:{hasAttrPic:function(){return!(this.selectProductAttrPics.length<1)},productId:function(){return this.value.id},selectProductPics:{get:function(){var t=[];if(void 0===this.value.pic||null==this.value.pic||""===this.value.pic)return t;if(t.push(this.value.pic),void 0===this.value.albumPics||null==this.value.albumPics||""===this.value.albumPics)return t;for(var e=this.value.albumPics.split(","),a=0;a1)for(var e=1;e0)for(var e=t.value.skuStockList[0].price,a=0;a=1)for(var t=this.selectProductAttr[0].values,e=0;e0&&this.value.productAttributeValueList.push({productAttributeId:e.id,name:e.name,type:1,value:this.getOptionStr(e.options)})}for(var a=0;a0&&this.active