12 |
- webpackJsonp([2],{"/IgP":function(t,e){},Cdx3:function(t,e,a){var i=a("sB3e"),l=a("lktj");a("uqUo")("keys",function(){return function(t){return l(i(t))}})},ChAR:function(t,e){},CmKi:function(t,e,a){"use strict";var i=a("woOf"),l=a.n(i),r=a("mRsl"),s=a("s/Rn"),n=a("UgCr"),o={name:"ProductInfoDetail",props:{value:Object,isEdit:{type:Boolean,default:!1}},data:function(){return{hasEditCreated:!1,selectProductCateValue:[],productCateOptions:[],brandOptions:[],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"}]}}},created:function(){this.getProductCateList(),this.getBrandList()},computed:{productId:function(){return this.value.id}},watch:{productId:function(t){this.isEdit&&(this.hasEditCreated||void 0!==t&&null!=t&&0!==t&&this.handleEditCreated())},selectProductCateValue:function(t){null!=t&&2===t.length?(this.value.productCategoryId=t[1],this.value.productCategoryName=this.getCateNameById(this.value.productCategoryId)):(this.value.productCategoryId=null,this.value.productCategoryName=null)}},methods:{handleEditCreated:function(){null!=this.value.productCategoryId&&(this.selectProductCateValue.push(this.value.cateParentId),this.selectProductCateValue.push(this.value.productCategoryId)),this.hasEditCreated=!0},getProductCateList:function(){var t=this;Object(r.d)().then(function(e){var a=e.data;t.productCateOptions=[];for(var i=0;i<a.length;i++){var l=[];if(null!=a[i].children&&a[i].children.length>0)for(var r=0;r<a[i].children.length;r++)l.push({label:a[i].children[r].name,value:a[i].children[r].id});t.productCateOptions.push({label:a[i].name,value:a[i].id,children:l})}})},getBrandList:function(){var t=this;Object(s.c)({pageNum:1,pageSize:100}).then(function(e){t.brandOptions=[];for(var a=e.data.list,i=0;i<a.length;i++)t.brandOptions.push({label:a[i].name,value:a[i].id})})},getCateNameById:function(t){for(var e=null,a=0;a<this.productCateOptions.length;a++)for(var i=0;i<this.productCateOptions[a].children.length;i++)if(this.productCateOptions[a].children[i].value===t)return e=this.productCateOptions[a].children[i].label;return e},handleNext:function(t){var e=this;this.$refs[t].validate(function(t){if(!t)return e.$message({message:"验证失败",type:"error",duration:1e3}),!1;e.$emit("nextStep")})},handleBrandChange:function(t){for(var e="",a=0;a<this.brandOptions.length;a++)if(this.brandOptions[a].value===t){e=this.brandOptions[a].label;break}this.value.brandName=e}}},u={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticStyle:{"margin-top":"50px"}},[a("el-form",{ref:"productInfoForm",staticStyle:{width:"600px"},attrs:{model:t.value,rules:t.rules,"label-width":"120px",size:"small"}},[a("el-form-item",{attrs:{label:"商品分类:",prop:"productCategoryId"}},[a("el-cascader",{attrs:{options:t.productCateOptions},model:{value:t.selectProductCateValue,callback:function(e){t.selectProductCateValue=e},expression:"selectProductCateValue"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"商品名称:",prop:"name"}},[a("el-input",{model:{value:t.value.name,callback:function(e){t.$set(t.value,"name",e)},expression:"value.name"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"副标题:",prop:"subTitle"}},[a("el-input",{model:{value:t.value.subTitle,callback:function(e){t.$set(t.value,"subTitle",e)},expression:"value.subTitle"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"商品品牌:",prop:"brandId"}},[a("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 a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})}))],1),t._v(" "),a("el-form-item",{attrs:{label:"商品介绍:"}},[a("el-input",{attrs:{autoSize:!0,type:"textarea",placeholder:"请输入内容"},model:{value:t.value.description,callback:function(e){t.$set(t.value,"description",e)},expression:"value.description"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"商品货号:"}},[a("el-input",{model:{value:t.value.productSn,callback:function(e){t.$set(t.value,"productSn",e)},expression:"value.productSn"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"商品售价:"}},[a("el-input",{model:{value:t.value.price,callback:function(e){t.$set(t.value,"price",e)},expression:"value.price"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"市场价:"}},[a("el-input",{model:{value:t.value.originalPrice,callback:function(e){t.$set(t.value,"originalPrice",e)},expression:"value.originalPrice"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"商品库存:"}},[a("el-input",{model:{value:t.value.stock,callback:function(e){t.$set(t.value,"stock",e)},expression:"value.stock"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"计量单位:"}},[a("el-input",{model:{value:t.value.unit,callback:function(e){t.$set(t.value,"unit",e)},expression:"value.unit"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"商品重量:"}},[a("el-input",{staticStyle:{width:"300px"},model:{value:t.value.weight,callback:function(e){t.$set(t.value,"weight",e)},expression:"value.weight"}}),t._v(" "),a("span",{staticStyle:{"margin-left":"20px"}},[t._v("克")])],1),t._v(" "),a("el-form-item",{attrs:{label:"排序"}},[a("el-input",{model:{value:t.value.sort,callback:function(e){t.$set(t.value,"sort",e)},expression:"value.sort"}})],1),t._v(" "),a("el-form-item",{staticStyle:{"text-align":"center"}},[a("el-button",{attrs:{type:"primary",size:"medium"},on:{click:function(e){t.handleNext("productInfoForm")}}},[t._v("下一步,填写商品促销")])],1)],1)],1)},staticRenderFns:[]};var c=a("VU/8")(o,u,!1,function(t){a("/IgP")},"data-v-adc76164",null).exports,d=a("vLgD");var p={name:"ProductSaleDetail",props:{value:Object,isEdit:{type:Boolean,default:!1}},data:function(){return{pickerOptions1:{disabledDate:function(t){return t.getTime()<Date.now()}}}},created:function(){var t,e=this;this.isEdit||(t={defaultStatus:0},Object(d.a)({url:"/memberLevel/list",method:"get",params:t})).then(function(t){for(var a=[],i=0;i<t.data.length;i++){var l=t.data[i];a.push({memberLevelId:l.id,memberLevelName:l.name})}e.value.memberPriceList=a})},computed:{selectServiceList:{get:function(){var t=[];if(void 0===this.value.serviceIds||null==this.value.serviceIds||""===this.value.serviceIds)return t;for(var e=this.value.serviceIds.split(","),a=0;a<e.length;a++)t.push(Number(e[a]));return t},set:function(t){var e="";if(null!=t&&t.length>0){for(var a=0;a<t.length;a++)e+=t[a]+",";e.endsWith(",")&&(e=e.substr(0,e.length-1)),this.value.serviceIds=e}else this.value.serviceIds=null}}},methods:{handleEditCreated:function(){var t=this.value.serviceIds.split(",");console.log("handleEditCreated",t);for(var e=0;e<t.length;e++)this.selectServiceList.push(Number(t[e]))},handleRemoveProductLadder:function(t,e){var a=this.value.productLadderList;1===a.length?(a.pop(),a.push({count:0,discount:0,price:0})):a.splice(t,1)},handleAddProductLadder:function(t,e){var a=this.value.productLadderList;a.length<3?a.push({count:0,discount:0,price:0}):this.$message({message:"最多只能添加三条",type:"warning"})},handleRemoveFullReduction:function(t,e){var a=this.value.productFullReductionList;1===a.length?(a.pop(),a.push({fullPrice:0,reducePrice:0})):a.splice(t,1)},handleAddFullReduction:function(t,e){var a=this.value.productFullReductionList;a.length<3?a.push({fullPrice:0,reducePrice:0}):this.$message({message:"最多只能添加三条",type:"warning"})},handlePrev:function(){this.$emit("prevStep")},handleNext:function(){this.$emit("nextStep")}}},v={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticStyle:{"margin-top":"50px"}},[a("el-form",{ref:"productSaleForm",staticStyle:{width:"600px"},attrs:{model:t.value,"label-width":"120px",size:"small"}},[a("el-form-item",{attrs:{label:"赠送积分:"}},[a("el-input",{model:{value:t.value.giftPoint,callback:function(e){t.$set(t.value,"giftPoint",e)},expression:"value.giftPoint"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"赠送成长值:"}},[a("el-input",{model:{value:t.value.giftGrowth,callback:function(e){t.$set(t.value,"giftGrowth",e)},expression:"value.giftGrowth"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"积分购买限制:"}},[a("el-input",{model:{value:t.value.usePointLimit,callback:function(e){t.$set(t.value,"usePointLimit",e)},expression:"value.usePointLimit"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"预告商品:"}},[a("el-switch",{attrs:{"active-value":1,"inactive-value":0},model:{value:t.value.previewStatus,callback:function(e){t.$set(t.value,"previewStatus",e)},expression:"value.previewStatus"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"商品上架:"}},[a("el-switch",{attrs:{"active-value":1,"inactive-value":0},model:{value:t.value.publishStatus,callback:function(e){t.$set(t.value,"publishStatus",e)},expression:"value.publishStatus"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"商品推荐:"}},[a("span",{staticStyle:{"margin-right":"10px"}},[t._v("新品")]),t._v(" "),a("el-switch",{attrs:{"active-value":1,"inactive-value":0},model:{value:t.value.newStatus,callback:function(e){t.$set(t.value,"newStatus",e)},expression:"value.newStatus"}}),t._v(" "),a("span",{staticStyle:{"margin-left":"10px","margin-right":"10px"}},[t._v("推荐")]),t._v(" "),a("el-switch",{attrs:{"active-value":1,"inactive-value":0},model:{value:t.value.recommandStatus,callback:function(e){t.$set(t.value,"recommandStatus",e)},expression:"value.recommandStatus"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"服务保证:"}},[a("el-checkbox-group",{model:{value:t.selectServiceList,callback:function(e){t.selectServiceList=e},expression:"selectServiceList"}},[a("el-checkbox",{attrs:{label:1}},[t._v("无忧退货")]),t._v(" "),a("el-checkbox",{attrs:{label:2}},[t._v("快速退款")]),t._v(" "),a("el-checkbox",{attrs:{label:3}},[t._v("免费包邮")])],1)],1),t._v(" "),a("el-form-item",{attrs:{label:"详细页标题:"}},[a("el-input",{model:{value:t.value.detailTitle,callback:function(e){t.$set(t.value,"detailTitle",e)},expression:"value.detailTitle"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"详细页描述:"}},[a("el-input",{model:{value:t.value.detailDesc,callback:function(e){t.$set(t.value,"detailDesc",e)},expression:"value.detailDesc"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"商品关键字:"}},[a("el-input",{model:{value:t.value.keywords,callback:function(e){t.$set(t.value,"keywords",e)},expression:"value.keywords"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"商品备注:"}},[a("el-input",{attrs:{type:"textarea",autoSize:!0},model:{value:t.value.note,callback:function(e){t.$set(t.value,"note",e)},expression:"value.note"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"选择优惠方式:"}},[a("el-radio-group",{attrs:{size:"small"},model:{value:t.value.promotionType,callback:function(e){t.$set(t.value,"promotionType",e)},expression:"value.promotionType"}},[a("el-radio-button",{attrs:{label:0}},[t._v("无优惠")]),t._v(" "),a("el-radio-button",{attrs:{label:1}},[t._v("特惠促销")]),t._v(" "),a("el-radio-button",{attrs:{label:2}},[t._v("会员价格")]),t._v(" "),a("el-radio-button",{attrs:{label:3}},[t._v("阶梯价格")]),t._v(" "),a("el-radio-button",{attrs:{label:4}},[t._v("满减价格")])],1)],1),t._v(" "),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:1===t.value.promotionType,expression:"value.promotionType===1"}]},[a("div",[t._v("\n 开始时间:\n "),a("el-date-picker",{attrs:{type:"datetime","picker-options":t.pickerOptions1,placeholder:"选择开始时间"},model:{value:t.value.promotionStartTime,callback:function(e){t.$set(t.value,"promotionStartTime",e)},expression:"value.promotionStartTime"}})],1),t._v(" "),a("div",{staticClass:"littleMargin"},[t._v("\n 结束时间:\n "),a("el-date-picker",{attrs:{type:"datetime","picker-options":t.pickerOptions1,placeholder:"选择结束时间"},model:{value:t.value.promotionEndTime,callback:function(e){t.$set(t.value,"promotionEndTime",e)},expression:"value.promotionEndTime"}})],1),t._v(" "),a("div",{staticClass:"littleMargin"},[t._v("\n 促销价格:\n "),a("el-input",{staticStyle:{width:"220px"},attrs:{placeholder:"输入促销价格"},model:{value:t.value.promotionPrice,callback:function(e){t.$set(t.value,"promotionPrice",e)},expression:"value.promotionPrice"}})],1)]),t._v(" "),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:2===t.value.promotionType,expression:"value.promotionType===2"}]},t._l(t.value.memberPriceList,function(e,i){return a("div",{class:{littleMargin:0!==i}},[t._v("\n "+t._s(e.memberLevelName)+":\n "),a("el-input",{staticStyle:{width:"200px"},model:{value:e.memberPrice,callback:function(a){t.$set(e,"memberPrice",a)},expression:"item.memberPrice"}})],1)})),t._v(" "),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:3===t.value.promotionType,expression:"value.promotionType===3"}]},[a("el-table",{staticStyle:{width:"80%"},attrs:{data:t.value.productLadderList,border:""}},[a("el-table-column",{attrs:{label:"数量",align:"center",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{model:{value:e.row.count,callback:function(a){t.$set(e.row,"count",a)},expression:"scope.row.count"}})]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"折扣",align:"center",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{model:{value:e.row.discount,callback:function(a){t.$set(e.row,"discount",a)},expression:"scope.row.discount"}})]}}])}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){t.handleRemoveProductLadder(e.$index,e.row)}}},[t._v("删除")]),t._v(" "),a("el-button",{attrs:{type:"text"},on:{click:function(a){t.handleAddProductLadder(e.$index,e.row)}}},[t._v("添加")])]}}])})],1)],1),t._v(" "),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:4===t.value.promotionType,expression:"value.promotionType===4"}]},[a("el-table",{staticStyle:{width:"80%"},attrs:{data:t.value.productFullReductionList,border:""}},[a("el-table-column",{attrs:{label:"满",align:"center",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{model:{value:e.row.fullPrice,callback:function(a){t.$set(e.row,"fullPrice",a)},expression:"scope.row.fullPrice"}})]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"立减",align:"center",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{model:{value:e.row.reducePrice,callback:function(a){t.$set(e.row,"reducePrice",a)},expression:"scope.row.reducePrice"}})]}}])}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){t.handleRemoveFullReduction(e.$index,e.row)}}},[t._v("删除")]),t._v(" "),a("el-button",{attrs:{type:"text"},on:{click:function(a){t.handleAddFullReduction(e.$index,e.row)}}},[t._v("添加")])]}}])})],1)],1),t._v(" "),a("el-form-item",{staticStyle:{"text-align":"center"}},[a("el-button",{attrs:{size:"medium"},on:{click:t.handlePrev}},[t._v("上一步,填写商品信息")]),t._v(" "),a("el-button",{attrs:{type:"primary",size:"medium"},on:{click:t.handleNext}},[t._v("下一步,填写商品属性")])],1)],1)],1)},staticRenderFns:[]};var h=a("VU/8")(p,v,!1,function(t){a("YV+6")},"data-v-2864cfd4",null).exports,m=a("mvHQ"),f=a.n(m),b=a("c/Tr"),g=a.n(b),k=a("lHA8"),P=a.n(k),y=a("KhLR"),S=a("3idm"),w=a("TZVV"),_=a("//Fk"),x=a.n(_),A=a("ZW30"),C={name:"multiUpload",props:{value:Array,maxCount:{type:Number,default:5}},data:function(){return{dataObj:{policy:"",signature:"",key:"",ossaccessKeyId:"",dir:"",host:""},dialogVisible:!1,dialogImageUrl:null,useOss:!0,ossUploadUrl:"http://macro-oss.oss-cn-shenzhen.aliyuncs.com",minioUploadUrl:"http://localhost:8080/minio/upload"}},computed:{fileList:function(){for(var t=[],e=0;e<this.value.length;e++)t.push({url:this.value[e]});return t}},methods:{emitInput:function(t){for(var e=[],a=0;a<t.length;a++)e.push(t[a].url);this.$emit("input",e)},handleRemove:function(t,e){this.emitInput(e)},handlePreview:function(t){this.dialogVisible=!0,this.dialogImageUrl=t.url},beforeUpload:function(t){var e=this;return!this.useOss||new x.a(function(t,a){Object(A.a)().then(function(a){e.dataObj.policy=a.data.policy,e.dataObj.signature=a.data.signature,e.dataObj.ossaccessKeyId=a.data.accessKeyId,e.dataObj.key=a.data.dir+"/${filename}",e.dataObj.dir=a.data.dir,e.dataObj.host=a.data.host,t(!0)}).catch(function(t){console.log(t),a(!1)})})},handleUploadSuccess:function(t,e){var a=this.dataObj.host+"/"+this.dataObj.dir+"/"+e.name;this.useOss||(a=t.data.url),this.fileList.push({name:e.name,url:a}),this.emitInput(this.fileList)},handleExceed:function(t,e){this.$message({message:"最多只能上传"+this.maxCount+"张图片",type:"warning",duration:1e3})}}},L={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-upload",{attrs:{action:t.useOss?t.ossUploadUrl:t.minioUploadUrl,data:t.useOss?t.dataObj:null,"list-type":"picture-card","file-list":t.fileList,"before-upload":t.beforeUpload,"on-remove":t.handleRemove,"on-success":t.handleUploadSuccess,"on-preview":t.handlePreview,limit:t.maxCount,"on-exceed":t.handleExceed}},[a("i",{staticClass:"el-icon-plus"})]),t._v(" "),a("el-dialog",{attrs:{visible:t.dialogVisible},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("img",{attrs:{width:"100%",src:t.dialogImageUrl,alt:""}})])],1)},staticRenderFns:[]};var I=a("VU/8")(C,L,!1,function(t){a("ChAR")},null,null).exports,O=a("fZjL"),$=a.n(O),j={name:"editorSlideUpload",props:{color:{type:String,default:"#1890ff"}},data:function(){return{dialogVisible:!1,listObj:{},fileList:[],dataObj:{policy:"",signature:"",key:"",ossaccessKeyId:"",dir:"",host:""}}},methods:{checkAllSuccess:function(){var t=this;return $()(this.listObj).every(function(e){return t.listObj[e].hasSuccess})},handleSubmit:function(){var t=this,e=$()(this.listObj).map(function(e){return t.listObj[e]});this.checkAllSuccess()?(console.log(e),this.$emit("successCBK",e),this.listObj={},this.fileList=[],this.dialogVisible=!1):this.$message("请等待所有图片上传成功 或 出现了网络问题,请刷新页面重新上传!")},handleSuccess:function(t,e){for(var a=e.uid,i=$()(this.listObj),l=0,r=i.length;l<r;l++)if(this.listObj[i[l]].uid===a)return this.listObj[i[l]].url=this.dataObj.host+"/"+this.dataObj.dir+"/"+e.name,void(this.listObj[i[l]].hasSuccess=!0)},handleRemove:function(t){for(var e=t.uid,a=$()(this.listObj),i=0,l=a.length;i<l;i++)if(this.listObj[a[i]].uid===e)return void delete this.listObj[a[i]]},beforeUpload:function(t){var e=this,a=this,i=t.uid;return this.listObj[i]={},new x.a(function(l,r){Object(A.a)().then(function(r){a.dataObj.policy=r.data.policy,a.dataObj.signature=r.data.signature,a.dataObj.ossaccessKeyId=r.data.accessKeyId,a.dataObj.key=r.data.dir+"/${filename}",a.dataObj.dir=r.data.dir,a.dataObj.host=r.data.host,a.listObj[i]={hasSuccess:!1,uid:t.uid,width:e.width,height:e.height},l(!0)}).catch(function(t){console.log(t),r(!1)})})}}},R={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"upload-container"},[a("el-button",{style:{background:t.color,borderColor:t.color},attrs:{icon:"el-icon-upload",size:"mini",type:"primary"},on:{click:function(e){t.dialogVisible=!0}}},[t._v("上传图片\n ")]),t._v(" "),a("el-dialog",{attrs:{"append-to-body":"",visible:t.dialogVisible},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("el-upload",{staticClass:"editor-slide-upload",attrs:{action:"http://macro-oss.oss-cn-shenzhen.aliyuncs.com",data:t.dataObj,multiple:!0,"file-list":t.fileList,"show-file-list":!0,"list-type":"picture-card","on-remove":t.handleRemove,"on-success":t.handleSuccess,"before-upload":t.beforeUpload}},[a("el-button",{attrs:{size:"small",type:"primary"}},[t._v("点击上传")])],1),t._v(" "),a("el-button",{on:{click:function(e){t.dialogVisible=!1}}},[t._v("取 消")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:t.handleSubmit}},[t._v("确 定")])],1)],1)},staticRenderFns:[]};var T=a("VU/8")(j,R,!1,function(t){a("cpxC")},"data-v-0821ce18",null).exports,V=(a("WQDg"),["advlist anchor autolink autosave code codesample colorpicker colorpicker\n contextmenu directionality emoticons fullscreen hr image imagetools importcss insertdatetime\n legacyoutput link lists media nonbreaking noneditable pagebreak paste preview print save searchreplace\n spellchecker tabfocus table template textcolor textpattern visualblocks visualchars wordcount"]),E=["bold italic underline strikethrough alignleft aligncenter\n alignright outdent indent blockquote undo redo removeformat code","hr bullist numlist link image charmap\t preview anchor pagebreak\n fullscreen insertdatetime media table forecolor backcolor"],N={name:"tinymce",components:{editorImage:T},props:{id:{type:String},value:{type:String,default:""},toolbar:{type:Array,required:!1,default:function(){return[]}},menubar:{default:"file edit insert view format table"},height:{type:Number,required:!1,default:360},width:{type:Number,required:!1,default:720}},data:function(){return{hasChange:!1,hasInit:!1,tinymceId:this.id||"vue-tinymce-"+ +new Date}},watch:{value:function(t){var e=this;!this.hasChange&&this.hasInit&&this.$nextTick(function(){return window.tinymce.get(e.tinymceId).setContent(t)})}},mounted:function(){this.initTinymce()},activated:function(){this.initTinymce()},deactivated:function(){this.destroyTinymce()},methods:{initTinymce:function(){var t=this,e=this;window.tinymce.init({selector:"#"+this.tinymceId,width:this.width,height:this.height,language:"zh_CN",body_class:"panel-body ",object_resizing:!1,toolbar:this.toolbar.length>0?this.toolbar:E,menubar:!1,plugins:V,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('<img class="wscnph" src="'+t.url+'" >')})}},destroyed:function(){this.destroyTinymce()}},D={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"tinymce-container editor-container"},[e("textarea",{staticClass:"tinymce-textarea",attrs:{id:this.tinymceId}}),this._v(" "),e("div",{staticClass:"editor-custom-btn-container"},[e("editorImage",{staticClass:"editor-upload-btn",attrs:{color:"#1890ff"},on:{successCBK:this.imageSuccessCBK}})],1)])},staticRenderFns:[]};var F=a("VU/8")(N,D,!1,function(t){a("pAlR")},"data-v-2fc86b05",null).exports,U={name:"ProductAttrDetail",components:{SingleUpload:w.a,MultiUpload:I,Tinymce:F},props:{value:Object,isEdit:{type:Boolean,default:!1}},data:function(){return{hasEditCreated:!1,productAttributeCategoryOptions:[],selectProductAttr:[],selectProductParam:[],selectProductAttrPics:[],addProductAttrValue:"",activeHtmlName:"pc"}},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;a<e.length;a++)t.push(e[a]);return t},set:function(t){if(null==t||0===t.length)this.value.pic=null,this.value.albumPics=null;else if(this.value.pic=t[0],this.value.albumPics="",t.length>1)for(var e=1;e<t.length;e++)this.value.albumPics+=t[e],e!==t.length-1&&(this.value.albumPics+=",")}}},created:function(){this.getProductAttrCateList()},watch:{productId:function(t){this.isEdit&&(this.hasEditCreated||void 0!==t&&null!=t&&0!==t&&this.handleEditCreated())}},methods:{handleEditCreated:function(){null!=this.value.productAttributeCategoryId&&this.handleProductAttrChange(this.value.productAttributeCategoryId),this.hasEditCreated=!0},getProductAttrCateList:function(){var t=this;Object(y.c)({pageNum:1,pageSize:100}).then(function(e){t.productAttributeCategoryOptions=[];for(var a=e.data.list,i=0;i<a.length;i++)t.productAttributeCategoryOptions.push({label:a[i].name,value:a[i].id})})},getProductAttrList:function(t,e){var a=this,i={pageNum:1,pageSize:100,type:t};Object(S.c)(e,i).then(function(e){var i=e.data.list;if(0===t){a.selectProductAttr=[];for(var l=0;l<i.length;l++){var r=[],s=[];a.isEdit&&(1===i[l].handAddStatus&&(r=a.getEditAttrOptions(i[l].id)),s=a.getEditAttrValues(l)),a.selectProductAttr.push({id:i[l].id,name:i[l].name,handAddStatus:i[l].handAddStatus,inputList:i[l].inputList,values:s,options:r})}a.isEdit&&a.refreshProductAttrPics()}else{a.selectProductParam=[];for(var n=0;n<i.length;n++){var o=null;a.isEdit&&(o=a.getEditParamValue(i[n].id)),a.selectProductParam.push({id:i[n].id,name:i[n].name,value:o,inputType:i[n].inputType,inputList:i[n].inputList})}}})},getEditAttrOptions:function(t){for(var e=[],a=0;a<this.value.productAttributeValueList.length;a++){var i=this.value.productAttributeValueList[a];if(i.productAttributeId===t){for(var l=i.value.split(","),r=0;r<l.length;r++)e.push(l[r]);break}}return e},getEditAttrValues:function(t){var e=new P.a;if(0===t)for(var a=0;a<this.value.skuStockList.length;a++){var i=this.value.skuStockList[a],l=JSON.parse(i.spData);null!=l&&l.length>=1&&e.add(l[0].value)}else if(1===t)for(var r=0;r<this.value.skuStockList.length;r++){var s=this.value.skuStockList[r],n=JSON.parse(s.spData);null!=n&&n.length>=2&&e.add(n[1].value)}else for(var o=0;o<this.value.skuStockList.length;o++){var u=this.value.skuStockList[o],c=JSON.parse(u.spData);null!=c&&c.length>=3&&e.add(c[2].value)}return g()(e)},getEditParamValue:function(t){for(var e=0;e<this.value.productAttributeValueList.length;e++)if(t===this.value.productAttributeValueList[e].productAttributeId)return this.value.productAttributeValueList[e].value},handleProductAttrChange:function(t){this.getProductAttrList(0,t),this.getProductAttrList(1,t)},getInputListArr:function(t){return t.split(",")},handleAddProductAttrValue:function(t){var e=this.selectProductAttr[t].options;null!=this.addProductAttrValue&&""!=this.addProductAttrValue?-1===e.indexOf(this.addProductAttrValue)?(this.selectProductAttr[t].options.push(this.addProductAttrValue),this.addProductAttrValue=null):this.$message({message:"属性值不能重复",type:"warning",duration:1e3}):this.$message({message:"属性值不能为空",type:"warning",duration:1e3})},handleRemoveProductAttrValue:function(t,e){this.selectProductAttr[t].options.splice(e,1)},getProductSkuSp:function(t,e){var a=JSON.parse(t.spData);return null!=a&&e<a.length?a[e].value:null},handleRefreshProductSkuList:function(){var t=this;this.$confirm("刷新列表将导致sku信息重新生成,是否要刷新","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.refreshProductAttrPics(),t.refreshProductSkuList()})},handleSyncProductSkuPrice:function(){var t=this;this.$confirm("将同步第一个sku的价格到所有sku,是否继续","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){if(null!==t.value.skuStockList&&t.value.skuStockList.length>0){var e=[];e=e.concat(e,t.value.skuStockList);for(var a=t.value.skuStockList[0].price,i=0;i<e.length;i++)e[i].price=a;t.value.skuStockList=[],t.value.skuStockList=t.value.skuStockList.concat(t.value.skuStockList,e)}})},handleSyncProductSkuStock:function(){var t=this;this.$confirm("将同步第一个sku的库存到所有sku,是否继续","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){if(null!==t.value.skuStockList&&t.value.skuStockList.length>0){var e=[];e=e.concat(e,t.value.skuStockList);for(var a=t.value.skuStockList[0].stock,i=t.value.skuStockList[0].lowStock,l=0;l<e.length;l++)e[l].stock=a,e[l].lowStock=i;t.value.skuStockList=[],t.value.skuStockList=t.value.skuStockList.concat(t.value.skuStockList,e)}})},refreshProductSkuList:function(){this.value.skuStockList=[];var t=this.value.skuStockList;if(1===this.selectProductAttr.length)for(var e=this.selectProductAttr[0],a=0;a<e.values.length;a++)t.push({spData:f()([{key:e.name,value:e.values[a]}])});else if(2===this.selectProductAttr.length)for(var i=this.selectProductAttr[0],l=this.selectProductAttr[1],r=0;r<i.values.length;r++)if(0!==l.values.length)for(var s=0;s<l.values.length;s++){var n=[];n.push({key:i.name,value:i.values[r]}),n.push({key:l.name,value:l.values[s]}),t.push({spData:f()(n)})}else t.push({spData:f()([{key:i.name,value:i.values[r]}])});else for(var o=this.selectProductAttr[0],u=this.selectProductAttr[1],c=this.selectProductAttr[2],d=0;d<o.values.length;d++)if(0!==u.values.length)for(var p=0;p<u.values.length;p++)if(0!==c.values.length)for(var v=0;v<c.values.length;v++){var h=[];h.push({key:o.name,value:o.values[d]}),h.push({key:u.name,value:u.values[p]}),h.push({key:c.name,value:c.values[v]}),t.push({spData:f()(h)})}else{var m=[];m.push({key:o.name,value:o.values[d]}),m.push({key:u.name,value:u.values[p]}),t.push({spData:f()(m)})}else t.push({spData:f()([{key:o.name,value:o.values[d]}])})},refreshProductAttrPics:function(){if(this.selectProductAttrPics=[],this.selectProductAttr.length>=1)for(var t=this.selectProductAttr[0].values,e=0;e<t.length;e++){var a=null;this.isEdit&&(a=this.getProductSkuPic(t[e])),this.selectProductAttrPics.push({name:t[e],pic:a})}},getProductSkuPic:function(t){for(var e=0;e<this.value.skuStockList.length;e++){if(t===JSON.parse(this.value.skuStockList[e].spData)[0].value)return this.value.skuStockList[e].pic}return null},mergeProductAttrValue:function(){this.value.productAttributeValueList=[];for(var t=0;t<this.selectProductAttr.length;t++){var e=this.selectProductAttr[t];1===e.handAddStatus&&null!=e.options&&e.options.length>0&&this.value.productAttributeValueList.push({productAttributeId:e.id,value:this.getOptionStr(e.options)})}for(var a=0;a<this.selectProductParam.length;a++){var i=this.selectProductParam[a];this.value.productAttributeValueList.push({productAttributeId:i.id,value:i.value})}},mergeProductAttrPics:function(){for(var t=0;t<this.selectProductAttrPics.length;t++)for(var e=0;e<this.value.skuStockList.length;e++){JSON.parse(this.value.skuStockList[e].spData)[0].value===this.selectProductAttrPics[t].name&&(this.value.skuStockList[e].pic=this.selectProductAttrPics[t].pic)}},getOptionStr:function(t){for(var e="",a=0;a<t.length;a++)e+=t[a],a!=t.length-1&&(e+=",");return e},handleRemoveProductSku:function(t,e){var a=this.value.skuStockList;1===a.length?a.pop():a.splice(t,1)},getParamInputList:function(t){return t.split(",")},handlePrev:function(){this.$emit("prevStep")},handleNext:function(){this.mergeProductAttrValue(),this.mergeProductAttrPics(),this.$emit("nextStep")}}},B={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticStyle:{"margin-top":"50px"}},[a("el-form",{ref:"productAttrForm",staticStyle:{width:"720px"},attrs:{model:t.value,"label-width":"120px",size:"small"}},[a("el-form-item",{attrs:{label:"属性类型:"}},[a("el-select",{attrs:{placeholder:"请选择属性类型"},on:{change:t.handleProductAttrChange},model:{value:t.value.productAttributeCategoryId,callback:function(e){t.$set(t.value,"productAttributeCategoryId",e)},expression:"value.productAttributeCategoryId"}},t._l(t.productAttributeCategoryOptions,function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})}))],1),t._v(" "),a("el-form-item",{attrs:{label:"商品规格:"}},[a("el-card",{staticClass:"cardBg",attrs:{shadow:"never"}},t._l(t.selectProductAttr,function(e,i){return a("div",[t._v("\n "+t._s(e.name)+":\n "),0===e.handAddStatus?a("el-checkbox-group",{model:{value:t.selectProductAttr[i].values,callback:function(e){t.$set(t.selectProductAttr[i],"values",e)},expression:"selectProductAttr[idx].values"}},t._l(t.getInputListArr(e.inputList),function(t){return a("el-checkbox",{key:t,staticClass:"littleMarginLeft",attrs:{label:t}})})):a("div",[a("el-checkbox-group",{model:{value:t.selectProductAttr[i].values,callback:function(e){t.$set(t.selectProductAttr[i],"values",e)},expression:"selectProductAttr[idx].values"}},t._l(t.selectProductAttr[i].options,function(e,l){return a("div",{staticClass:"littleMarginLeft",staticStyle:{display:"inline-block"}},[a("el-checkbox",{key:e,attrs:{label:e}}),t._v(" "),a("el-button",{staticClass:"littleMarginLeft",attrs:{type:"text"},on:{click:function(e){t.handleRemoveProductAttrValue(i,l)}}},[t._v("删除\n ")])],1)})),t._v(" "),a("el-input",{staticStyle:{width:"160px","margin-left":"10px"},attrs:{clearable:""},model:{value:t.addProductAttrValue,callback:function(e){t.addProductAttrValue=e},expression:"addProductAttrValue"}}),t._v(" "),a("el-button",{staticClass:"littleMarginLeft",on:{click:function(e){t.handleAddProductAttrValue(i)}}},[t._v("增加")])],1)],1)})),t._v(" "),a("el-table",{staticStyle:{width:"100%","margin-top":"20px"},attrs:{data:t.value.skuStockList,border:""}},[t._l(t.selectProductAttr,function(e,i){return a("el-table-column",{key:e.id,attrs:{label:e.name,align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t.getProductSkuSp(e.row,i))+"\n ")]}}])})}),t._v(" "),a("el-table-column",{attrs:{label:"销售价格",width:"80",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{model:{value:e.row.price,callback:function(a){t.$set(e.row,"price",a)},expression:"scope.row.price"}})]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"商品库存",width:"80",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{model:{value:e.row.stock,callback:function(a){t.$set(e.row,"stock",a)},expression:"scope.row.stock"}})]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"库存预警值",width:"80",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{model:{value:e.row.lowStock,callback:function(a){t.$set(e.row,"lowStock",a)},expression:"scope.row.lowStock"}})]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"SKU编号",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{model:{value:e.row.skuCode,callback:function(a){t.$set(e.row,"skuCode",a)},expression:"scope.row.skuCode"}})]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作",width:"80",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){t.handleRemoveProductSku(e.$index,e.row)}}},[t._v("删除\n ")])]}}])})],2),t._v(" "),a("el-button",{staticStyle:{"margin-top":"20px"},attrs:{type:"primary"},on:{click:t.handleRefreshProductSkuList}},[t._v("刷新列表\n ")]),t._v(" "),a("el-button",{staticStyle:{"margin-top":"20px"},attrs:{type:"primary"},on:{click:t.handleSyncProductSkuPrice}},[t._v("同步价格\n ")]),t._v(" "),a("el-button",{staticStyle:{"margin-top":"20px"},attrs:{type:"primary"},on:{click:t.handleSyncProductSkuStock}},[t._v("同步库存\n ")])],1),t._v(" "),t.hasAttrPic?a("el-form-item",{attrs:{label:"属性图片:"}},[a("el-card",{staticClass:"cardBg",attrs:{shadow:"never"}},t._l(t.selectProductAttrPics,function(e,i){return a("div",[a("span",[t._v(t._s(e.name)+":")]),t._v(" "),a("single-upload",{staticStyle:{width:"300px",display:"inline-block","margin-left":"10px"},model:{value:e.pic,callback:function(a){t.$set(e,"pic",a)},expression:"item.pic"}})],1)}))],1):t._e(),t._v(" "),a("el-form-item",{attrs:{label:"商品参数:"}},[a("el-card",{staticClass:"cardBg",attrs:{shadow:"never"}},t._l(t.selectProductParam,function(e,i){return a("div",{class:{littleMarginTop:0!==i}},[a("div",{staticClass:"paramInputLabel"},[t._v(t._s(e.name)+":")]),t._v(" "),1===e.inputType?a("el-select",{staticClass:"paramInput",model:{value:t.selectProductParam[i].value,callback:function(e){t.$set(t.selectProductParam[i],"value",e)},expression:"selectProductParam[index].value"}},t._l(t.getParamInputList(e.inputList),function(t){return a("el-option",{key:t,attrs:{label:t,value:t}})})):a("el-input",{staticClass:"paramInput",model:{value:t.selectProductParam[i].value,callback:function(e){t.$set(t.selectProductParam[i],"value",e)},expression:"selectProductParam[index].value"}})],1)}))],1),t._v(" "),a("el-form-item",{attrs:{label:"商品相册:"}},[a("multi-upload",{model:{value:t.selectProductPics,callback:function(e){t.selectProductPics=e},expression:"selectProductPics"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"规格参数:"}},[a("el-tabs",{attrs:{type:"card"},model:{value:t.activeHtmlName,callback:function(e){t.activeHtmlName=e},expression:"activeHtmlName"}},[a("el-tab-pane",{attrs:{label:"电脑端详情",name:"pc"}},[a("tinymce",{attrs:{width:595,height:300},model:{value:t.value.detailHtml,callback:function(e){t.$set(t.value,"detailHtml",e)},expression:"value.detailHtml"}})],1),t._v(" "),a("el-tab-pane",{attrs:{label:"移动端详情",name:"mobile"}},[a("tinymce",{attrs:{width:595,height:300},model:{value:t.value.detailMobileHtml,callback:function(e){t.$set(t.value,"detailMobileHtml",e)},expression:"value.detailMobileHtml"}})],1)],1)],1),t._v(" "),a("el-form-item",{staticStyle:{"text-align":"center"}},[a("el-button",{attrs:{size:"medium"},on:{click:t.handlePrev}},[t._v("上一步,填写商品促销")]),t._v(" "),a("el-button",{attrs:{type:"primary",size:"medium"},on:{click:t.handleNext}},[t._v("下一步,选择商品关联")])],1)],1)],1)},staticRenderFns:[]};var H=a("VU/8")(U,B,!1,function(t){a("OguG")},"data-v-19ce3db8",null).exports,z=a("0QkR");var q={name:"ProductRelationDetail",props:{value:Object,isEdit:{type:Boolean,default:!1}},data:function(){return{subjectList:[],subjectTitles:["待选择","已选择"],prefrenceAreaList:[],prefrenceAreaTitles:["待选择","已选择"]}},created:function(){this.getSubjectList(),this.getPrefrenceAreaList()},computed:{selectSubject:{get:function(){var t=[];if(null==this.value.subjectProductRelationList||this.value.subjectProductRelationList.length<=0)return t;for(var e=0;e<this.value.subjectProductRelationList.length;e++)t.push(this.value.subjectProductRelationList[e].subjectId);return t},set:function(t){this.value.subjectProductRelationList=[];for(var e=0;e<t.length;e++)this.value.subjectProductRelationList.push({subjectId:t[e]})}},selectPrefrenceArea:{get:function(){var t=[];if(null==this.value.prefrenceAreaProductRelationList||this.value.prefrenceAreaProductRelationList.length<=0)return t;for(var e=0;e<this.value.prefrenceAreaProductRelationList.length;e++)t.push(this.value.prefrenceAreaProductRelationList[e].prefrenceAreaId);return t},set:function(t){this.value.prefrenceAreaProductRelationList=[];for(var e=0;e<t.length;e++)this.value.prefrenceAreaProductRelationList.push({prefrenceAreaId:t[e]})}}},methods:{filterMethod:function(t,e){return e.label.indexOf(t)>-1},getSubjectList:function(){var t=this;Object(z.b)().then(function(e){for(var a=e.data,i=0;i<a.length;i++)t.subjectList.push({label:a[i].title,key:a[i].id})})},getPrefrenceAreaList:function(){var t=this;Object(d.a)({url:"/prefrenceArea/listAll",method:"get"}).then(function(e){for(var a=e.data,i=0;i<a.length;i++)t.prefrenceAreaList.push({label:a[i].name,key:a[i].id})})},handlePrev:function(){this.$emit("prevStep")},handleFinishCommit:function(){this.$emit("finishCommit",this.isEdit)}}},M={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticStyle:{"margin-top":"50px"}},[a("el-form",{ref:"productRelationForm",staticStyle:{width:"680px"},attrs:{model:t.value,"label-width":"120px",size:"small"}},[a("el-form-item",{attrs:{label:"关联专题:"}},[a("el-transfer",{staticStyle:{display:"inline-block"},attrs:{filterable:"","filter-method":t.filterMethod,"filter-placeholder":"请输入专题名称",titles:t.subjectTitles,data:t.subjectList},model:{value:t.selectSubject,callback:function(e){t.selectSubject=e},expression:"selectSubject"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"关联优选:"}},[a("el-transfer",{staticStyle:{display:"inline-block"},attrs:{filterable:"","filter-method":t.filterMethod,"filter-placeholder":"请输入优选名称",titles:t.prefrenceAreaTitles,data:t.prefrenceAreaList},model:{value:t.selectPrefrenceArea,callback:function(e){t.selectPrefrenceArea=e},expression:"selectPrefrenceArea"}})],1),t._v(" "),a("el-form-item",{staticStyle:{"text-align":"center"}},[a("el-button",{attrs:{size:"medium"},on:{click:t.handlePrev}},[t._v("上一步,填写商品属性")]),t._v(" "),a("el-button",{attrs:{type:"primary",size:"medium"},on:{click:t.handleFinishCommit}},[t._v("完成,提交商品")])],1)],1)],1)},staticRenderFns:[]};var K={albumPics:"",brandId:null,brandName:"",deleteStatus:0,description:"",detailDesc:"",detailHtml:"",detailMobileHtml:"",detailTitle:"",feightTemplateId:0,flashPromotionCount:0,flashPromotionId:0,flashPromotionPrice:0,flashPromotionSort:0,giftPoint:0,giftGrowth:0,keywords:"",lowStock:0,name:"",newStatus:0,note:"",originalPrice:0,pic:"",memberPriceList:[],productFullReductionList:[{fullPrice:0,reducePrice:0}],productLadderList:[{count:0,discount:0,price:0}],previewStatus:0,price:0,productAttributeCategoryId:null,productAttributeValueList:[],skuStockList:[],subjectProductRelationList:[],prefrenceAreaProductRelationList:[],productCategoryId:null,productCategoryName:"",productSn:"",promotionEndTime:"",promotionPerLimit:0,promotionPrice:null,promotionStartTime:"",promotionType:0,publishStatus:0,recommandStatus:0,sale:0,serviceIds:"",sort:0,stock:0,subTitle:"",unit:"",usePointLimit:0,verifyStatus:0,weight:0},G={name:"ProductDetail",components:{ProductInfoDetail:c,ProductSaleDetail:h,ProductAttrDetail:H,ProductRelationDetail:a("VU/8")(q,M,!1,function(t){a("vjr4")},"data-v-812a42c4",null).exports},props:{isEdit:{type:Boolean,default:!1}},data:function(){return{active:0,productParam:l()({},K),showStatus:[!0,!1,!1,!1]}},created:function(){var t=this;this.isEdit&&Object(n.d)(this.$route.query.id).then(function(e){t.productParam=e.data})},methods:{hideAll:function(){for(var t=0;t<this.showStatus.length;t++)this.showStatus[t]=!1},prevStep:function(){this.active>0&&this.active<this.showStatus.length&&(this.active--,this.hideAll(),this.showStatus[this.active]=!0)},nextStep:function(){this.active<this.showStatus.length-1&&(this.active++,this.hideAll(),this.showStatus[this.active]=!0)},finishCommit:function(t){var e=this;this.$confirm("是否要提交该产品","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t?Object(n.g)(e.$route.query.id,e.productParam).then(function(t){e.$message({type:"success",message:"提交成功",duration:1e3}),e.$router.back()}):Object(n.a)(e.productParam).then(function(t){e.$message({type:"success",message:"提交成功",duration:1e3}),location.reload()})})}}},J={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-card",{staticClass:"form-container",attrs:{shadow:"never"}},[a("el-steps",{attrs:{active:t.active,"finish-status":"success","align-center":""}},[a("el-step",{attrs:{title:"填写商品信息"}}),t._v(" "),a("el-step",{attrs:{title:"填写商品促销"}}),t._v(" "),a("el-step",{attrs:{title:"填写商品属性"}}),t._v(" "),a("el-step",{attrs:{title:"选择商品关联"}})],1),t._v(" "),a("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"}}),t._v(" "),a("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"}}),t._v(" "),a("product-attr-detail",{directives:[{name:"show",rawName:"v-show",value:t.showStatus[2],expression:"showStatus[2]"}],attrs:{"is-edit":t.isEdit},on:{nextStep:t.nextStep,prevStep:t.prevStep},model:{value:t.productParam,callback:function(e){t.productParam=e},expression:"productParam"}}),t._v(" "),a("product-relation-detail",{directives:[{name:"show",rawName:"v-show",value:t.showStatus[3],expression:"showStatus[3]"}],attrs:{"is-edit":t.isEdit},on:{prevStep:t.prevStep,finishCommit:t.finishCommit},model:{value:t.productParam,callback:function(e){t.productParam=e},expression:"productParam"}})],1)},staticRenderFns:[]};var W=a("VU/8")(G,J,!1,function(t){a("gv9E")},null,null);e.a=W.exports},N3DD:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i={name:"addProduct",components:{ProductDetail:a("CmKi").a}},l={render:function(){var t=this.$createElement;return(this._self._c||t)("product-detail",{attrs:{"is-edit":!1}})},staticRenderFns:[]};var r=a("VU/8")(i,l,!1,function(t){a("mtqr")},null,null);e.default=r.exports},OguG:function(t,e){},WQDg:function(t,e){tinymce.addI18n("zh_CN",{Cut:"剪切","Heading 5":"标题5","Header 2":"标题2","Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.":"你的浏览器不支持对剪贴板的访问,请使用Ctrl+X/C/V键进行复制粘贴。","Heading 4":"标题4",Div:"Div区块","Heading 2":"标题2",Paste:"粘贴",Close:"关闭","Font Family":"字体",Pre:"预格式文本","Align right":"右对齐","New document":"新文档",Blockquote:"引用","Numbered list":"编号列表","Heading 1":"标题1",Headings:"标题","Increase indent":"增加缩进",Formats:"格式",Headers:"标题","Select all":"全选","Header 3":"标题3",Blocks:"区块",Undo:"撤消",Strikethrough:"删除线","Bullet list":"项目符号","Header 1":"标题1",Superscript:"上标","Clear formatting":"清除格式","Font Sizes":"字号",Subscript:"下标","Header 6":"标题6",Redo:"重复",Paragraph:"段落",Ok:"确定",Bold:"粗体",Code:"代码",Italic:"斜体","Align center":"居中","Header 5":"标题5","Heading 6":"标题6","Heading 3":"标题3","Decrease indent":"减少缩进","Header 4":"标题4","Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.":"当前为纯文本粘贴模式,再次点击可以回到普通粘贴模式。",Underline:"下划线",Cancel:"取消",Justify:"两端对齐",Inline:"文本",Copy:"复制","Align left":"左对齐","Visual aids":"网格线","Lower Greek":"小写希腊字母",Square:"方块",Default:"默认","Lower Alpha":"小写英文字母",Circle:"空心圆",Disc:"实心圆","Upper Alpha":"大写英文字母","Upper Roman":"大写罗马字母","Lower Roman":"小写罗马字母","Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.":"标识符应该以字母开头,后跟字母、数字、破折号、点、冒号或下划线。",Name:"名称",Anchor:"锚点",Id:"标识符","You have unsaved changes are you sure you want to navigate away?":"你还有文档尚未保存,确定要离开?","Restore last draft":"恢复上次的草稿","Special character":"特殊符号","Source code":"源代码",Language:"语言","Insert/Edit code sample":"插入/编辑代码示例",B:"B",R:"R",G:"G",Color:"颜色","Right to left":"从右到左","Left to right":"从左到右",Emoticons:"表情",Robots:"机器人","Document properties":"文档属性",Title:"标题",Keywords:"关键词",Encoding:"编码",Description:"描述",Author:"作者",Fullscreen:"全屏","Horizontal line":"水平分割线","Horizontal space":"水平边距","Insert/edit image":"插入/编辑图片",General:"普通",Advanced:"高级",Source:"地址",Border:"边框","Constrain proportions":"保持纵横比","Vertical space":"垂直边距","Image description":"图片描述",Style:"样式",Dimensions:"大小","Insert image":"插入图片",Image:"图片","Zoom in":"放大",Contrast:"对比度",Back:"后退",Gamma:"伽马值","Flip horizontally":"水平翻转",Resize:"调整大小",Sharpen:"锐化","Zoom out":"缩小","Image options":"图片选项",Apply:"应用",Brightness:"亮度","Rotate clockwise":"顺时针旋转","Rotate counterclockwise":"逆时针旋转","Edit image":"编辑图片","Color levels":"颜色层次",Crop:"裁剪",Orientation:"方向","Flip vertically":"垂直翻转",Invert:"反转","Date/time":"日期/时间","Insert date/time":"插入日期/时间","Remove link":"删除链接",Url:"地址","Text to display":"显示文字",Anchors:"锚点","Insert link":"插入链接",Link:"链接","New window":"在新窗口打开",None:"无","The URL you entered seems to be an external link. Do you want to add the required http:// prefix?":"你所填写的URL地址属于外部链接,需要加上http://:前缀吗?","Paste or type a link":"粘贴或输入链接",Target:"打开方式","The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?":"你所填写的URL地址为邮件地址,需要加上mailto:前缀吗?","Insert/edit link":"插入/编辑链接","Insert/edit video":"插入/编辑视频",Media:"媒体","Alternative source":"镜像","Paste your embed code below:":"将内嵌代码粘贴在下面:","Insert video":"插入视频",Poster:"封面","Insert/edit media":"插入/编辑媒体",Embed:"内嵌","Nonbreaking space":"不间断空格","Page break":"分页符","Paste as text":"粘贴为文本",Preview:"预览",Print:"打印",Save:"保存","Could not find the specified string.":"未找到搜索内容.",Replace:"替换",Next:"下一个","Whole words":"全字匹配","Find and replace":"查找和替换","Replace with":"替换为",Find:"查找","Replace all":"全部替换","Match case":"区分大小写",Prev:"上一个",Spellcheck:"拼写检查",Finish:"完成","Ignore all":"全部忽略",Ignore:"忽略","Add to Dictionary":"添加到字典","Insert row before":"在上方插入",Rows:"行",Height:"高","Paste row after":"粘贴到下方",Alignment:"对齐方式","Border color":"边框颜色","Column group":"列组",Row:"行","Insert column before":"在左侧插入","Split cell":"拆分单元格","Cell padding":"单元格内边距","Cell spacing":"单元格外间距","Row type":"行类型","Insert table":"插入表格",Body:"表体",Caption:"标题",Footer:"表尾","Delete row":"删除行","Paste row before":"粘贴到上方",Scope:"范围","Delete table":"删除表格","H Align":"水平对齐",Top:"顶部对齐","Header cell":"表头单元格",Column:"列","Row group":"行组",Cell:"单元格",Middle:"垂直居中","Cell type":"单元格类型","Copy row":"复制行","Row properties":"行属性","Table properties":"表格属性",Bottom:"底部对齐","V Align":"垂直对齐",Header:"表头",Right:"右对齐","Insert column after":"在右侧插入",Cols:"列","Insert row after":"在下方插入",Width:"宽","Cell properties":"单元格属性",Left:"左对齐","Cut row":"剪切行","Delete column":"删除列",Center:"居中","Merge cells":"合并单元格","Insert template":"插入模板",Templates:"模板","Background color":"背景色","Custom...":"自定义...","Custom color":"自定义颜色","No color":"无","Text color":"文字颜色","Table of Contents":"内容列表","Show blocks":"显示区块边框","Show invisible characters":"显示不可见字符","Words: {0}":"字数:{0}",Insert:"插入",File:"文件",Edit:"编辑","Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help":"在编辑区按ALT-F9打开菜单,按ALT-F10打开工具栏,按ALT-0查看帮助",Tools:"工具",View:"视图",Table:"表格",Format:"格式"})},"YV+6":function(t,e){},cpxC:function(t,e){},fZjL:function(t,e,a){t.exports={default:a("jFbC"),__esModule:!0}},gv9E:function(t,e){},jFbC:function(t,e,a){a("Cdx3"),t.exports=a("FeBl").Object.keys},mtqr:function(t,e){},mvHQ:function(t,e,a){t.exports={default:a("qkKv"),__esModule:!0}},pAlR:function(t,e){},qkKv:function(t,e,a){var i=a("FeBl"),l=i.JSON||(i.JSON={stringify:JSON.stringify});t.exports=function(t){return l.stringify.apply(l,arguments)}},uqUo:function(t,e,a){var i=a("kM2E"),l=a("FeBl"),r=a("S82l");t.exports=function(t,e){var a=(l.Object||{})[t]||Object[t],s={};s[t]=e(a),i(i.S+i.F*r(function(){a(1)}),"Object",s)}},vjr4:function(t,e){}});
- //# sourceMappingURL=2.c5c452e34309696c1050.js.map
|