12 |
- webpackJsonp([0],{"/ZDd":function(t,e){},"0QkR":function(t,e,r){"use strict";e.b=function(){return Object(i.a)({url:"/subject/listAll",method:"get"})},e.a=function(t){return Object(i.a)({url:"/subject/list",method:"get",params:t})};var i=r("vLgD")},"3idm":function(t,e,r){"use strict";e.c=function(t,e){return Object(i.a)({url:"/productAttribute/list/"+t,method:"get",params:e})},e.b=function(t){return Object(i.a)({url:"/productAttribute/delete",method:"post",data:t,requestType:"form"})},e.a=function(t){return Object(i.a)({url:"/productAttribute/create",method:"post",data:t})},e.f=function(t,e){return Object(i.a)({url:"/productAttribute/update/"+t,method:"post",data:e})},e.d=function(t){return Object(i.a)({url:"/productAttribute/"+t,method:"get"})},e.e=function(t){return Object(i.a)({url:"/productAttribute/attrInfo/"+t,method:"get"})};var i=r("vLgD")},"4WTo":function(t,e,r){var i=r("NWt+");t.exports=function(t,e){var r=[];return i(t,!1,r.push,r,e),r}},"4cjj":function(t,e,r){"use strict";e.c=function(t){return Object(i.a)({url:"/coupon/list",method:"get",params:t})},e.a=function(t){return Object(i.a)({url:"/coupon/create",method:"post",data:t})},e.d=function(t){return Object(i.a)({url:"/coupon/"+t,method:"get"})},e.e=function(t,e){return Object(i.a)({url:"/coupon/update/"+t,method:"post",data:e})},e.b=function(t){return Object(i.a)({url:"/coupon/delete/"+t,method:"post"})};var i=r("vLgD")},"5zde":function(t,e,r){r("zQR9"),r("qyJz"),t.exports=r("FeBl").Array.from},"7Doy":function(t,e,r){var i=r("EqjI"),a=r("7UMu"),n=r("dSzd")("species");t.exports=function(t){var e;return a(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!a(e.prototype)||(e=void 0),i(e)&&null===(e=e[n])&&(e=void 0)),void 0===e?Array:e}},"8CEy":function(t,e){},"8COs":function(t,e){},"9Bbf":function(t,e,r){"use strict";var i=r("kM2E");t.exports=function(t){i(i.S,t,{of:function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];return new this(e)}})}},"9C8M":function(t,e,r){"use strict";var i=r("evD5").f,a=r("Yobk"),n=r("xH/j"),o=r("+ZMJ"),s=r("2KxR"),l=r("NWt+"),u=r("vIB/"),c=r("EGZi"),d=r("bRrM"),p=r("+E39"),h=r("06OY").fastKey,f=r("LIJb"),m=p?"_s":"size",v=function(t,e){var r,i=h(e);if("F"!==i)return t._i[i];for(r=t._f;r;r=r.n)if(r.k==e)return r};t.exports={getConstructor:function(t,e,r,u){var c=t(function(t,i){s(t,c,e,"_i"),t._t=e,t._i=a(null),t._f=void 0,t._l=void 0,t[m]=0,void 0!=i&&l(i,r,t[u],t)});return n(c.prototype,{clear:function(){for(var t=f(this,e),r=t._i,i=t._f;i;i=i.n)i.r=!0,i.p&&(i.p=i.p.n=void 0),delete r[i.i];t._f=t._l=void 0,t[m]=0},delete:function(t){var r=f(this,e),i=v(r,t);if(i){var a=i.n,n=i.p;delete r._i[i.i],i.r=!0,n&&(n.n=a),a&&(a.p=n),r._f==i&&(r._f=a),r._l==i&&(r._l=n),r[m]--}return!!i},forEach:function(t){f(this,e);for(var r,i=o(t,arguments.length>1?arguments[1]:void 0,3);r=r?r.n:this._f;)for(i(r.v,r.k,this);r&&r.r;)r=r.p},has:function(t){return!!v(f(this,e),t)}}),p&&i(c.prototype,"size",{get:function(){return f(this,e)[m]}}),c},def:function(t,e,r){var i,a,n=v(t,e);return n?n.v=r:(t._l=n={i:a=h(e,!0),k:e,v:r,p:i=t._l,n:void 0,r:!1},t._f||(t._f=n),i&&(i.n=n),t[m]++,"F"!==a&&(t._i[a]=n)),t},getEntry:v,setStrong:function(t,e,r){u(t,e,function(t,r){this._t=f(t,e),this._k=r,this._l=void 0},function(){for(var t=this._k,e=this._l;e&&e.r;)e=e.p;return this._t&&(this._l=e=e?e.n:this._t._f)?c(0,"keys"==t?e.k:"values"==t?e.v:[e.k,e.v]):(this._t=void 0,c(1))},r?"entries":"values",!r,!0),d(e)}}},"9bBU":function(t,e,r){r("mClu");var i=r("FeBl").Object;t.exports=function(t,e,r){return i.defineProperty(t,e,r)}},ALrJ:function(t,e,r){var i=r("+ZMJ"),a=r("MU5D"),n=r("sB3e"),o=r("QRG4"),s=r("oeOm");t.exports=function(t,e){var r=1==t,l=2==t,u=3==t,c=4==t,d=6==t,p=5==t||d,h=e||s;return function(e,s,f){for(var m,v,b=n(e),g=a(b),y=i(s,f,3),k=o(g.length),S=0,w=r?h(e,k):l?h(e,0):void 0;k>S;S++)if((p||S in g)&&(v=y(m=g[S],S,b),t))if(r)w[S]=v;else if(v)switch(t){case 3:return!0;case 5:return m;case 6:return S;case 2:w.push(m)}else if(c)return!1;return d?-1:u||c?c:w}}},BDhv:function(t,e,r){var i=r("kM2E");i(i.P+i.R,"Set",{toJSON:r("m9gC")("Set")})},"BwD/":function(t,e){},C4MV:function(t,e,r){t.exports={default:r("9bBU"),__esModule:!0}},Cdx3:function(t,e,r){var i=r("sB3e"),a=r("lktj");r("uqUo")("keys",function(){return function(t){return a(i(t))}})},CmKi:function(t,e,r){"use strict";var i=r("woOf"),a=r.n(i),n=r("Xxa5"),o=r.n(n),s=r("exGp"),l=r.n(s),u=r("mRsl"),c=r("s/Rn"),d=r("UgCr"),p={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"}],productCategoryId:[{required:!0,message:"请选择商品分类",trigger:"blur"}],brandId:[{required:!0,message:"请选择商品品牌",trigger:"blur"}],requiredProp:[{required:!0,message:"该项为必填项",trigger:"blur"}],price:[{required:!0,message:"请输入商品售价",trigger:"blur"}],originalPrice:[{required:!0,message:"请输入商品市场价",trigger:"blur"}]},showCascader:!1}},created:function(){var t=this;return l()(o.a.mark(function e(){return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getProductCateList();case 2:return e.next=4,t.getBrandList();case 4:case"end":return e.stop()}},e,t)}))()},computed:{productId:function(){return this.value.id}},watch:{productId:function(t){this.hasEditCreated||void 0!==t&&null!=t&&0!==t&&(console.log("productId",t),this.handleEditCreated())},selectProductCateValue:function(t){console.log(t,"newValue",this.value),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.showCascader=!0,this.hasEditCreated=!0},getProductCateList:function(){var t=this;Object(u.d)().then(function(e){var r=e.data;t.productCateOptions=[];for(var i=0;i<r.length;i++){var a=[];if(null!=r[i].children&&r[i].children.length>0)for(var n=0;n<r[i].children.length;n++)a.push({label:r[i].children[n].name,value:r[i].children[n].id});t.productCateOptions.push({label:r[i].name,value:r[i].id,children:a})}})},getBrandList:function(){var t=this;Object(c.c)({pageNum:1,pageSize:100}).then(function(e){t.brandOptions=[];for(var r=e.data.list,i=0;i<r.length;i++)t.brandOptions.push({label:r[i].name,value:r[i].id})})},getCateNameById:function(t){for(var e=null,r=0;r<this.productCateOptions.length;r++)for(var i=0;i<this.productCateOptions[r].children.length;i++)if(this.productCateOptions[r].children[i].value===t)return e=this.productCateOptions[r].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="",r=0;r<this.brandOptions.length;r++)if(this.brandOptions[r].value===t){e=this.brandOptions[r].label;break}this.value.brandName=e}}},h={render:function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticStyle:{"margin-top":"50px"}},[r("el-form",{ref:"productInfoForm",staticStyle:{width:"600px"},attrs:{model:t.value,rules:t.rules,"label-width":"120px",size:"small"}},[r("el-form-item",{attrs:{label:"商品分类:",prop:"productCategoryId"}},[t.showCascader?r("el-cascader",{attrs:{disabled:!t.isEdit,options:t.productCateOptions},model:{value:t.selectProductCateValue,callback:function(e){t.selectProductCateValue=e},expression:"selectProductCateValue"}}):t._e()],1),t._v(" "),r("el-form-item",{attrs:{label:"商品名称:",prop:"name"}},[r("el-input",{attrs:{disabled:!t.isEdit},model:{value:t.value.name,callback:function(e){t.$set(t.value,"name",e)},expression:"value.name"}})],1),t._v(" "),r("el-form-item",{attrs:{label:"商品品牌:",prop:"brandId"}},[r("el-select",{attrs:{disabled:!t.isEdit,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 r("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})}))],1),t._v(" "),r("el-form-item",{attrs:{label:"商品描述:"}},[r("el-input",{attrs:{autoSize:!0,disabled:!t.isEdit,type:"textarea",placeholder:"请输入内容"},model:{value:t.value.detailDesc,callback:function(e){t.$set(t.value,"detailDesc",e)},expression:"value.detailDesc"}})],1),t._v(" "),r("el-form-item",{attrs:{label:"商品货号:"}},[r("el-input",{attrs:{disabled:!t.isEdit},model:{value:t.value.productSn,callback:function(e){t.$set(t.value,"productSn",e)},expression:"value.productSn"}})],1),t._v(" "),r("el-form-item",{attrs:{label:"商品售价:",prop:"price"}},[r("el-input-number",{staticClass:"number-input",attrs:{disabled:!t.isEdit,autocomplete:"off","controls-position":"right",type:"number"},model:{value:t.value.price,callback:function(e){t.$set(t.value,"price",e)},expression:"value.price"}})],1),t._v(" "),r("el-form-item",{attrs:{label:"市场价:",prop:"originalPrice"}},[r("el-input-number",{staticClass:"number-input",attrs:{type:"number",autocomplete:"off","controls-position":"right",disabled:!t.isEdit},model:{value:t.value.originalPrice,callback:function(e){t.$set(t.value,"originalPrice",e)},expression:"value.originalPrice"}})],1),t._v(" "),r("el-form-item",{attrs:{label:"商品库存:"}},[r("el-input-number",{staticClass:"number-input",attrs:{type:"number",autocomplete:"off","controls-position":"right",disabled:!t.isEdit},model:{value:t.value.stock,callback:function(e){t.$set(t.value,"stock",e)},expression:"value.stock"}})],1),t._v(" "),r("el-form-item",{attrs:{label:"排序"}},[r("el-input-number",{attrs:{disabled:!t.isEdit},model:{value:t.value.sort,callback:function(e){t.$set(t.value,"sort",e)},expression:"value.sort"}})],1),t._v(" "),r("el-form-item",{staticStyle:{"text-align":"center"}},[r("el-button",{attrs:{type:"primary",size:"medium"},on:{click:function(e){t.handleNext("productInfoForm")}}},[t._v("下一步,填写商品促销")])],1)],1)],1)},staticRenderFns:[]};var f=r("VU/8")(p,h,!1,function(t){r("8CEy")},"data-v-1eec34b7",null).exports,m=r("vLgD");var v={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(m.a)({url:"/memberLevel/list",method:"get",params:t})).then(function(t){for(var r=[],i=0;i<t.data.length;i++){var a=t.data[i];r.push({memberLevelId:a.id,memberLevelName:a.name})}e.value.memberPriceList=r})},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(","),r=0;r<e.length;r++)t.push(Number(e[r]));return t},set:function(t){var e="";if(null!=t&&t.length>0){for(var r=0;r<t.length;r++)e+=t[r]+",";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 r=this.value.productLadderList;1===r.length?(r.pop(),r.push({count:0,discount:0,price:0})):r.splice(t,1)},handleAddProductLadder:function(t,e){var r=this.value.productLadderList;r.length<3?r.push({count:0,discount:0,price:0}):this.$message({message:"最多只能添加三条",type:"warning"})},handleRemoveFullReduction:function(t,e){var r=this.value.productFullReductionList;1===r.length?(r.pop(),r.push({fullPrice:0,reducePrice:0})):r.splice(t,1)},handleAddFullReduction:function(t,e){var r=this.value.productFullReductionList;r.length<3?r.push({fullPrice:0,reducePrice:0}):this.$message({message:"最多只能添加三条",type:"warning"})},handlePrev:function(){this.$emit("prevStep")},handleNext:function(){this.$emit("nextStep")}}},b={render:function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticStyle:{"margin-top":"50px"}},[r("el-form",{ref:"productSaleForm",staticStyle:{width:"600px"},attrs:{model:t.value,"label-width":"120px",size:"small"}},[r("el-form-item",{attrs:{label:"商品上架:"}},[r("el-switch",{attrs:{disabled:!t.isEdit,"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(" "),r("el-form-item",{attrs:{label:"商品推荐:"}},[r("span",{staticStyle:{"margin-right":"10px"}},[t._v("新品")]),t._v(" "),r("el-switch",{attrs:{disabled:!t.isEdit,"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(" "),r("span",{staticStyle:{"margin-left":"10px","margin-right":"10px"}},[t._v("推荐")]),t._v(" "),r("el-switch",{attrs:{disabled:!t.isEdit,"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(" "),r("el-form-item",{directives:[{name:"show",rawName:"v-show",value:1===t.value.promotionType,expression:"value.promotionType===1"}]},[r("div",[t._v("\n 开始时间:\n "),r("el-date-picker",{attrs:{disabled:!t.isEdit,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(" "),r("div",{staticClass:"littleMargin"},[t._v("\n 结束时间:\n "),r("el-date-picker",{attrs:{disabled:!t.isEdit,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(" "),r("div",{staticClass:"littleMargin"},[t._v("\n 促销价格:\n "),r("el-input",{staticStyle:{width:"220px"},attrs:{disabled:!t.isEdit,placeholder:"输入促销价格"},model:{value:t.value.promotionPrice,callback:function(e){t.$set(t.value,"promotionPrice",e)},expression:"value.promotionPrice"}})],1)]),t._v(" "),r("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 r("div",{class:{littleMargin:0!==i}},[t._v("\n "+t._s(e.memberLevelName)+":\n "),r("el-input",{staticStyle:{width:"200px"},attrs:{disabled:!t.isEdit},model:{value:e.memberPrice,callback:function(r){t.$set(e,"memberPrice",r)},expression:"item.memberPrice"}})],1)})),t._v(" "),r("el-form-item",{directives:[{name:"show",rawName:"v-show",value:3===t.value.promotionType,expression:"value.promotionType===3"}]},[r("el-table",{staticStyle:{width:"80%"},attrs:{data:t.value.productLadderList,border:""}},[r("el-table-column",{attrs:{label:"数量",align:"center",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("el-input",{attrs:{disabled:!t.isEdit},model:{value:e.row.count,callback:function(r){t.$set(e.row,"count",r)},expression:"scope.row.count"}})]}}])}),t._v(" "),r("el-table-column",{attrs:{label:"折扣",align:"center",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("el-input",{attrs:{disabled:!t.isEdit},model:{value:e.row.discount,callback:function(r){t.$set(e.row,"discount",r)},expression:"scope.row.discount"}})]}}])}),t._v(" "),r("el-table-column",{attrs:{align:"center",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("el-button",{attrs:{type:"text",disabled:!t.isEdit},on:{click:function(r){t.handleRemoveProductLadder(e.$index,e.row)}}},[t._v("删除")]),t._v(" "),r("el-button",{attrs:{type:"text",disabled:!t.isEdit},on:{click:function(r){t.handleAddProductLadder(e.$index,e.row)}}},[t._v("添加")])]}}])})],1)],1),t._v(" "),r("el-form-item",{directives:[{name:"show",rawName:"v-show",value:4===t.value.promotionType,expression:"value.promotionType===4"}]},[r("el-table",{staticStyle:{width:"80%"},attrs:{data:t.value.productFullReductionList,border:""}},[r("el-table-column",{attrs:{label:"满",align:"center",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("el-input",{model:{value:e.row.fullPrice,callback:function(r){t.$set(e.row,"fullPrice",r)},expression:"scope.row.fullPrice"}})]}}])}),t._v(" "),r("el-table-column",{attrs:{label:"立减",align:"center",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("el-input",{model:{value:e.row.reducePrice,callback:function(r){t.$set(e.row,"reducePrice",r)},expression:"scope.row.reducePrice"}})]}}])}),t._v(" "),r("el-table-column",{attrs:{align:"center",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("el-button",{attrs:{type:"text",disabled:!t.isEdit},on:{click:function(r){t.handleRemoveFullReduction(e.$index,e.row)}}},[t._v("删除")]),t._v(" "),r("el-button",{attrs:{type:"text",disabled:!t.isEdit},on:{click:function(r){t.handleAddFullReduction(e.$index,e.row)}}},[t._v("添加")])]}}])})],1)],1),t._v(" "),r("el-form-item",{staticStyle:{"text-align":"center"}},[r("el-button",{attrs:{size:"medium"},on:{click:t.handlePrev}},[t._v("上一步,填写商品信息")]),t._v(" "),r("el-button",{attrs:{type:"primary",size:"medium"},on:{click:t.handleNext}},[t._v("下一步,填写商品属性")])],1)],1)],1)},staticRenderFns:[]};var g=r("VU/8")(v,b,!1,function(t){r("Gbxq")},"data-v-77ab88bc",null).exports,y=r("mvHQ"),k=r.n(y),S=r("c/Tr"),w=r.n(S),P=r("lHA8"),_=r.n(P),x=r("KhLR"),L=r("3idm"),O=r("TZVV"),A=r("//Fk"),j=r.n(A),C=r("ZW30"),E={name:"multiUpload",props:{value:Array,maxCount:{type:Number,default:5},disabled:{type:Boolean,default:!1},bucket_name:{type:String,default:"mall"}},data:function(){return{dataObj:{policy:"",signature:"",key:"",KSSAccessKeyId:"",acl:"public-read",name:""},dialogVisible:!1,dialogImageUrl:null,useOss:!0,ossUploadUrl:"https://"+this.bucket_name+".ks3-cn-beijing.ksyuncs.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=[],r=0;r<t.length;r++)e.push(t[r].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,r=this;return!this.useOss||new j.a(function(i,a){var n=(new Date).getTime()+t.name,o={filename:t.name,bucketName:e.bucket_name,postData:{filename:t.name,acl:"public-read",key:n,unknowValueField:[]}};Object(C.a)(o).then(function(a){r.dataObj.policy=a.data.policy,r.dataObj.signature=a.data.signature,r.dataObj.KSSAccessKeyId=a.data.kssAccessKeyId,r.dataObj.key=n,r.dataObj.name=t.name,r.dataObj.acl="public-read";var o={KSSAccessKeyId:a.data.kssAccessKeyId,policy:a.data.policy,signature:a.data.signature,key:n,acl:"public-read",uploadDomain:"https://ks3-cn-beijing.ksyuncs.com/"+e.bucket_name,autoStart:!0};document.body,new ks3FileUploader(o);i(!0)}).catch(function(t){console.log(t),a(!1)})})},handleUploadSuccess:function(t,e){var r=this.ossUploadUrl+"/"+this.dataObj.key;this.useOss||(r=t.data.url),this.fileList.push({name:e.name,url:r}),this.emitInput(this.fileList)},handleExceed:function(t,e){this.$message({message:"最多只能上传"+this.maxCount+"张图片",type:"warning",duration:1e3})}}},I={render:function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("el-upload",{attrs:{disabled:t.disabled,action:t.ossUploadUrl,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}},[r("i",{staticClass:"el-icon-plus"})]),t._v(" "),r("el-dialog",{attrs:{visible:t.dialogVisible},on:{"update:visible":function(e){t.dialogVisible=e}}},[r("img",{attrs:{width:"100%",src:t.dialogImageUrl,alt:""}})])],1)},staticRenderFns:[]};var R=r("VU/8")(E,I,!1,function(t){r("BwD/")},null,null).exports,T=r("fZjL"),$=r.n(T),D={name:"editorSlideUpload",props:{color:{type:String,default:"#1890ff"},disabled:{type:Boolean,default:!1},bucket_name:{type:String,default:"mall"}},data:function(){return{dialogVisible:!1,listObj:{},fileList:[],dataObj:{policy:"",signature:"",key:"",KSSAccessKeyId:"",acl:"public-read",name:""},ossUploadUrl:"https://mall.ks3-cn-beijing.ksyuncs.com"}},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){var r=e.uid,i=$()(this.listObj);console.log(i,"objKeyArr",this.listObj);for(var a=0,n=i.length;a<n;a++)if(this.listObj[i[a]].uid===r)return this.listObj[i[a]].url=this.ossUploadUrl+"/"+this.listObj[i[a]].key,void(this.listObj[i[a]].hasSuccess=!0)},handleRemove:function(t){for(var e=t.uid,r=$()(this.listObj),i=0,a=r.length;i<a;i++)if(this.listObj[r[i]].uid===e)return void delete this.listObj[r[i]]},beforeUpload:function(t){var e=this;console.log(t,"试试批量上传");var r=this,i=t.uid;return this.listObj[i]={},new j.a(function(a,n){var o=(new Date).getTime()+t.name,s={filename:t.name,bucketName:e.bucket_name,postData:{filename:t.name,acl:"public-read",key:o,unknowValueField:[]}};Object(C.a)(s).then(function(n){r.dataObj.policy=n.data.policy,r.dataObj.signature=n.data.signature,r.dataObj.KSSAccessKeyId=n.data.kssAccessKeyId,r.dataObj.key=o,r.dataObj.name=t.name,r.dataObj.acl="public-read",r.listObj[i]={hasSuccess:!1,uid:t.uid,width:e.width,height:e.height,name:t.name,key:o},a(!0)}).catch(function(t){console.log(t),n(!1)})})}}},V={render:function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"upload-container"},[r("el-button",{style:{background:t.color,borderColor:t.color},attrs:{disabled:t.disabled,icon:"el-icon-upload",size:"mini",type:"primary"},on:{click:function(e){t.dialogVisible=!0}}},[t._v("上传图片\n ")]),t._v(" "),r("el-dialog",{attrs:{"append-to-body":"",visible:t.dialogVisible},on:{"update:visible":function(e){t.dialogVisible=e}}},[r("el-upload",{staticClass:"editor-slide-upload",attrs:{disabled:t.disabled,action:t.ossUploadUrl,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}},[r("el-button",{attrs:{size:"small",type:"primary"}},[t._v("点击上传")])],1),t._v(" "),r("el-button",{on:{click:function(e){t.dialogVisible=!1}}},[t._v("取 消")]),t._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:t.handleSubmit}},[t._v("确 定")])],1)],1)},staticRenderFns:[]};var F=r("VU/8")(D,V,!1,function(t){r("oP6A")},"data-v-816d571c",null).exports,U=(r("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"]),N=["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"],B={name:"tinymce",components:{editorImage:F},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},disabled:{type:Boolean,default:!1}},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:N,menubar:!1,plugins:U,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(r){e.value&&r.setContent(e.value),e.hasInit=!0,r.on("NodeChange Change KeyUp SetContent",function(){t.hasChange=!0,t.$emit("input",r.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()}},M={render:function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{class:t.disabled?"disable":""},[r("div",{staticClass:"tinymce-container editor-container",attrs:{disabled:t.disabled,contenteditable:t.disabled}},[r("textarea",{staticClass:"tinymce-textarea",attrs:{contenteditable:t.disabled,disabled:t.disabled,id:t.tinymceId}}),t._v(" "),r("div",{staticClass:"editor-custom-btn-container"},[r("editorImage",{staticClass:"editor-upload-btn",attrs:{disabled:t.disabled,color:"#1890ff"},on:{successCBK:t.imageSuccessCBK}})],1)])])},staticRenderFns:[]};var q=r("VU/8")(B,M,!1,function(t){r("VVOu")},"data-v-6aa2be36",null).exports,z={name:"ProductAttrDetail",components:{SingleUpload:O.a,MultiUpload:R,Tinymce:q},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(","),r=0;r<e.length;r++)t.push(e[r]);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+=",")}},skuStockList:function(){return this.value.skuStockList}},created:function(){},mounted:function(){console.log(this.value.skuStockList,"skuStockList"),this.handleEditCreated(),this.getProductAttrCateList()},watch:{productId:function(t){this.hasEditCreated||t&&this.handleEditCreated()}},methods:{handleEditCreated:function(){null!=this.value.productAttributeCategoryId&&this.handleProductAttrChange(this.value.productAttributeCategoryId),this.hasEditCreated=!0},getProductAttrCateList:function(){var t=this;Object(x.c)({pageNum:1,pageSize:100}).then(function(e){t.productAttributeCategoryOptions=[];for(var r=e.data.list,i=0;i<r.length;i++)t.productAttributeCategoryOptions.push({label:r[i].name,value:r[i].id})})},getProductAttrList:function(t,e){var r=this;console.log("getProductAttrList","调用");var i={pageNum:1,pageSize:100,type:t};Object(L.c)(e,i).then(function(e){var i=e.data.list;if(0===t){r.selectProductAttr=[];for(var a=0;a<i.length;a++){var n=[],o=[];r.isEdit&&(1===i[a].handAddStatus&&(n=r.getEditAttrOptions(i[a].id)),o=r.getEditAttrValues(a)),r.selectProductAttr.push({id:i[a].id,name:i[a].name,handAddStatus:i[a].handAddStatus,inputList:i[a].inputList,values:o,options:n})}r.isEdit&&(console.log("编辑模式刷新属性"),r.refreshProductAttrPics())}else{r.selectProductParam=[];for(var s=0;s<i.length;s++){var l=null;r.isEdit&&(l=r.getEditParamValue(i[s].id)),r.selectProductParam.push({id:i[s].id,name:i[s].name,value:l,inputType:i[s].inputType,inputList:i[s].inputList})}}})},getEditAttrOptions:function(t){for(var e=[],r=0;r<this.value.productAttributeValueList.length;r++){var i=this.value.productAttributeValueList[r];if(i.productAttributeId===t){for(var a=i.value.split(","),n=0;n<a.length;n++)e.push(a[n]);break}}return e},getEditAttrValues:function(t){var e=new _.a;if(0===t)for(var r=0;r<this.value.skuStockList.length;r++){var i=this.value.skuStockList[r],a=JSON.parse(i.spData);null!=a&&a.length>=1&&e.add(a[0].value)}else if(1===t)for(var n=0;n<this.value.skuStockList.length;n++){var o=this.value.skuStockList[n],s=JSON.parse(o.spData);null!=s&&s.length>=2&&e.add(s[1].value)}else for(var l=0;l<this.value.skuStockList.length;l++){var u=this.value.skuStockList[l],c=JSON.parse(u.spData);null!=c&&c.length>=3&&e.add(c[2].value)}return w()(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 r=JSON.parse(t.spData);return null!=r&&e<r.length?r[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 r=t.value.skuStockList[0].price,i=0;i<e.length;i++)e[i].price=r;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 r=t.value.skuStockList[0].stock,i=t.value.skuStockList[0].lowStock,a=0;a<e.length;a++)e[a].stock=r,e[a].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],r=0;r<e.values.length;r++)t.push({spData:k()([{key:e.name,value:e.values[r]}])});else if(2===this.selectProductAttr.length)for(var i=this.selectProductAttr[0],a=this.selectProductAttr[1],n=0;n<i.values.length;n++)if(0!==a.values.length)for(var o=0;o<a.values.length;o++){var s=[];s.push({key:i.name,value:i.values[n]}),s.push({key:a.name,value:a.values[o]}),t.push({spData:k()(s)})}else t.push({spData:k()([{key:i.name,value:i.values[n]}])});else for(var l=this.selectProductAttr[0],u=this.selectProductAttr[1],c=this.selectProductAttr[2],d=0;d<l.values.length;d++)if(0!==u.values.length)for(var p=0;p<u.values.length;p++)if(0!==c.values.length)for(var h=0;h<c.values.length;h++){var f=[];f.push({key:l.name,value:l.values[d]}),f.push({key:u.name,value:u.values[p]}),f.push({key:c.name,value:c.values[h]}),t.push({spData:k()(f)})}else{var m=[];m.push({key:l.name,value:l.values[d]}),m.push({key:u.name,value:u.values[p]}),t.push({spData:k()(m)})}else t.push({spData:k()([{key:l.name,value:l.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 r=null;this.isEdit&&(r=this.getProductSkuPic(t[e])),this.selectProductAttrPics.push({name:t[e],pic:r})}},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 r=0;r<this.selectProductParam.length;r++){var i=this.selectProductParam[r];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="",r=0;r<t.length;r++)e+=t[r],r!=t.length-1&&(e+=",");return e},handleRemoveProductSku:function(t,e){var r=this.value.skuStockList;1===r.length?r.pop():r.splice(t,1)},getParamInputList:function(t){return t.split(",")},handlePrev:function(){this.$emit("prevStep")},handleNext:function(){this.value.skuStockList&&!(this.value.skuStockList.length<=0)&&this.value.skuStockList[0].price+""&&this.value.skuStockList[0].stock+""&&this.value.skuStockList[0].lowStock+""&&this.value.skuStockList[0].skuCode+""?(this.mergeProductAttrValue(),this.mergeProductAttrPics(),this.$emit("nextStep")):this.$message.error("请编辑商品规格")},handleFinishCommit:function(){this.value.skuStockList&&!(this.value.skuStockList.length<=0)&&this.value.skuStockList[0].price+""&&this.value.skuStockList[0].stock+""&&this.value.skuStockList[0].lowStock+""&&this.value.skuStockList[0].skuCode+""?(this.mergeProductAttrValue(),this.mergeProductAttrPics(),this.$emit("finishCommit",this.isEdit)):this.$message.error("请编辑商品规格")}}},H={render:function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticStyle:{"margin-top":"50px"}},[r("el-form",{ref:"productAttrForm",staticStyle:{width:"720px"},attrs:{model:t.value,"label-width":"120px",size:"small"}},[r("el-form-item",{attrs:{label:"属性类型:"}},[r("el-select",{attrs:{disabled:!t.isEdit,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 r("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})}))],1),t._v(" "),r("el-form-item",{attrs:{label:"商品规格:",rules:[{required:!0,message:"请选择商品规格",trigger:"blur"}]}},[r("el-card",{staticClass:"cardBg",attrs:{shadow:"never"}},t._l(t.selectProductAttr,function(e,i){return r("div",[t._v("\n "+t._s(e.name)+":\n "),0===e.handAddStatus?r("el-checkbox-group",{attrs:{disabled:!t.isEdit},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(e){return r("el-checkbox",{key:e,staticClass:"littleMarginLeft",attrs:{label:e,disabled:!t.isEdit}})})):r("div",[r("el-checkbox-group",{attrs:{disabled:!t.isEdit},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,a){return r("div",{staticClass:"littleMarginLeft",staticStyle:{display:"inline-block"}},[r("el-checkbox",{key:e,attrs:{label:e,disabled:!t.isEdit}}),t._v(" "),r("el-button",{staticClass:"littleMarginLeft",attrs:{disabled:!t.isEdit,type:"text"},on:{click:function(e){t.handleRemoveProductAttrValue(i,a)}}},[t._v("删除\n ")])],1)})),t._v(" "),r("el-input",{staticStyle:{width:"160px","margin-left":"10px"},attrs:{disabled:!t.isEdit,clearable:""},model:{value:t.addProductAttrValue,callback:function(e){t.addProductAttrValue=e},expression:"addProductAttrValue"}}),t._v(" "),r("el-button",{staticClass:"littleMarginLeft",attrs:{disabled:!t.isEdit},on:{click:function(e){t.handleAddProductAttrValue(i)}}},[t._v("增加")])],1)],1)})),t._v(" "),r("el-table",{staticStyle:{width:"100%","margin-top":"20px"},attrs:{data:t.skuStockList,border:""}},[t._l(t.selectProductAttr,function(e,i){return r("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(" "),r("el-table-column",{attrs:{label:"销售价格",width:"80",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("el-input",{attrs:{disabled:!t.isEdit},model:{value:e.row.price,callback:function(r){t.$set(e.row,"price",r)},expression:"scope.row.price"}})]}}])}),t._v(" "),r("el-table-column",{attrs:{label:"商品库存",width:"80",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("el-input",{attrs:{disabled:!t.isEdit},model:{value:e.row.stock,callback:function(r){t.$set(e.row,"stock",r)},expression:"scope.row.stock"}})]}}])}),t._v(" "),r("el-table-column",{attrs:{label:"库存预警值",width:"80",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("el-input",{attrs:{disabled:!t.isEdit},model:{value:e.row.lowStock,callback:function(r){t.$set(e.row,"lowStock",r)},expression:"scope.row.lowStock"}})]}}])}),t._v(" "),r("el-table-column",{attrs:{label:"SKU编号",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("el-input",{attrs:{disabled:e.row.platformLock||!t.isEdit},model:{value:e.row.skuCode,callback:function(r){t.$set(e.row,"skuCode",r)},expression:"scope.row.skuCode"}})]}}])}),t._v(" "),r("el-table-column",{attrs:{label:"操作",width:"80",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.platformLock?t._e():r("el-button",{attrs:{disabled:!t.isEdit,type:"text"},on:{click:function(r){t.handleRemoveProductSku(e.$index,e.row)}}},[t._v("删除\n ")])]}}])})],2),t._v(" "),r("el-button",{staticStyle:{"margin-top":"20px"},attrs:{type:"primary",disabled:!t.isEdit},on:{click:t.handleRefreshProductSkuList}},[t._v("刷新列表\n ")]),t._v(" "),r("el-button",{staticStyle:{"margin-top":"20px"},attrs:{type:"primary",disabled:!t.isEdit},on:{click:t.handleSyncProductSkuPrice}},[t._v("同步价格\n ")]),t._v(" "),r("el-button",{staticStyle:{"margin-top":"20px"},attrs:{type:"primary",disabled:!t.isEdit},on:{click:t.handleSyncProductSkuStock}},[t._v("同步库存\n ")])],1),t._v(" "),t.hasAttrPic?r("el-form-item",{attrs:{label:"属性图片:"}},[r("el-card",{staticClass:"cardBg",attrs:{shadow:"never"}},t._l(t.selectProductAttrPics,function(e,i){return r("div",[r("span",[t._v(t._s(e.name)+":")]),t._v(" "),r("single-upload",{staticStyle:{width:"300px",display:"inline-block","margin-left":"10px"},attrs:{disabled:!t.isEdit},model:{value:e.pic,callback:function(r){t.$set(e,"pic",r)},expression:"item.pic"}})],1)}))],1):t._e(),t._v(" "),r("el-form-item",{attrs:{label:"商品参数:"}},[r("el-card",{staticClass:"cardBg",attrs:{shadow:"never"}},t._l(t.selectProductParam,function(e,i){return r("div",{class:{littleMarginTop:0!==i}},[r("div",{staticClass:"paramInputLabel"},[t._v(t._s(e.name)+":")]),t._v(" "),1===e.inputType?r("el-select",{staticClass:"paramInput",attrs:{disabled:!t.isEdit},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 r("el-option",{key:t,attrs:{label:t,value:t}})})):r("el-input",{staticClass:"paramInput",attrs:{disabled:!t.isEdit},model:{value:t.selectProductParam[i].value,callback:function(e){t.$set(t.selectProductParam[i],"value",e)},expression:"selectProductParam[index].value"}})],1)}))],1),t._v(" "),r("el-form-item",{attrs:{label:"商品相册:"}},[r("multi-upload",{attrs:{disabled:!t.isEdit},model:{value:t.selectProductPics,callback:function(e){t.selectProductPics=e},expression:"selectProductPics"}})],1),t._v(" "),r("el-form-item",{attrs:{label:"规格参数:"}},[r("el-tabs",{attrs:{type:"card"},model:{value:t.activeHtmlName,callback:function(e){t.activeHtmlName=e},expression:"activeHtmlName"}},[r("el-tab-pane",{attrs:{label:"电脑端详情",name:"pc"}},[r("tinymce",{attrs:{width:595,height:300,disabled:!t.isEdit},model:{value:t.value.detailHtml,callback:function(e){t.$set(t.value,"detailHtml",e)},expression:"value.detailHtml"}})],1),t._v(" "),r("el-tab-pane",{attrs:{label:"移动端详情",name:"mobile"}},[r("tinymce",{attrs:{width:595,height:300,disabled:!t.isEdit},model:{value:t.value.detailMobileHtml,callback:function(e){t.$set(t.value,"detailMobileHtml",e)},expression:"value.detailMobileHtml"}})],1)],1)],1),t._v(" "),r("el-form-item",{staticStyle:{"text-align":"center"}},[r("el-button",{attrs:{size:"medium"},on:{click:t.handlePrev}},[t._v("上一步,填写商品促销")]),t._v(" "),r("el-button",{attrs:{type:"primary",size:"medium"},on:{click:t.handleFinishCommit}},[t._v("完成,提交商品")])],1)],1)],1)},staticRenderFns:[]};var K=r("VU/8")(z,H,!1,function(t){r("8COs")},"data-v-d99b1332",null).exports,J=r("0QkR");var G={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(J.b)().then(function(e){for(var r=e.data,i=0;i<r.length;i++)t.subjectList.push({label:r[i].title,key:r[i].id,disabled:!t.isEdit})})},getPrefrenceAreaList:function(){var t=this;Object(m.a)({url:"/prefrenceArea/listAll",method:"get"}).then(function(e){for(var r=e.data,i=0;i<r.length;i++)t.prefrenceAreaList.push({label:r[i].name,key:r[i].id,disabled:!t.isEdit})})},handlePrev:function(){this.$emit("prevStep")},handleFinishCommit:function(){this.$emit("finishCommit",this.isEdit)}}},W={render:function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticStyle:{"margin-top":"50px"}},[r("el-form",{ref:"productRelationForm",staticStyle:{width:"680px"},attrs:{model:t.value,"label-width":"120px",size:"small"}},[r("el-form-item",{attrs:{label:"关联专题:"}},[r("el-transfer",{staticStyle:{display:"inline-block"},attrs:{disabled:!t.isEdit,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(" "),r("el-form-item",{attrs:{label:"关联优选:"}},[r("el-transfer",{staticStyle:{display:"inline-block"},attrs:{disabled:!t.isEdit,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(" "),r("el-form-item",{staticStyle:{"text-align":"center"}},[r("el-button",{attrs:{size:"medium"},on:{click:t.handlePrev}},[t._v("上一步,填写商品属性")]),t._v(" "),r("el-button",{attrs:{type:"primary",size:"medium"},on:{click:t.handleFinishCommit}},[t._v("完成,提交商品")])],1)],1)],1)},staticRenderFns:[]};var Z={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},Q={name:"ProductDetail",components:{ProductInfoDetail:f,ProductSaleDetail:g,ProductAttrDetail:K,ProductRelationDetail:r("VU/8")(G,W,!1,function(t){r("/ZDd")},"data-v-54c4e537",null).exports},props:{isEdit:{type:Boolean,default:!1}},data:function(){return{active:0,productParam:a()({},Z),showStatus:[!0,!1,!1,!1]}},created:function(){var t=this;this.$route.query.id&&Object(d.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.$route.query.id&&t?this.$confirm("是否要提交该产品","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(d.g)(e.$route.query.id,e.productParam).then(function(t){e.$message({type:"success",message:"提交成功",duration:1e3}),e.$router.back()})}):!this.$route.query.id&&t?this.$confirm("是否要提交该产品","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(d.a)(e.productParam).then(function(t){e.$message({type:"success",message:"提交成功",duration:1e3}),e.$router.back()})}):this.$router.back()}}},Y={render:function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("el-card",{staticClass:"form-container",attrs:{shadow:"never"}},[r("el-steps",{attrs:{active:t.active,"finish-status":"success","align-center":""}},[r("el-step",{attrs:{title:"填写商品信息"}}),t._v(" "),r("el-step",{attrs:{title:"填写商品促销"}}),t._v(" "),r("el-step",{attrs:{title:"填写商品属性"}})],1),t._v(" "),r("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(" "),t.showStatus[1]?r("product-sale-detail",{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._e(),t._v(" "),t.showStatus[2]?r("product-attr-detail",{attrs:{"is-edit":t.isEdit},on:{nextStep:t.nextStep,prevStep:t.prevStep,finishCommit:t.finishCommit},model:{value:t.productParam,callback:function(e){t.productParam=e},expression:"productParam"}}):t._e()],1)},staticRenderFns:[]};var X=r("VU/8")(Q,Y,!1,function(t){r("MfRC")},null,null);e.a=X.exports},FWz8:function(t,e,r){"use strict";e.d=function(t){return Object(i.a)({url:"/order/list",method:"get",params:t})},e.a=function(t){return Object(i.a)({url:"/order/update/close",method:"post",requestType:"form",data:t})},e.b=function(t){return Object(i.a)({url:"/order/delete",method:"post",params:t})},e.c=function(t){return Object(i.a)({url:"/order/update/delivery",method:"post",data:t})},e.e=function(t){return Object(i.a)({url:"/order/"+t,method:"get"})},e.j=function(t){return Object(i.a)({url:"/order/update/receiverInfo",method:"post",data:t})},e.h=function(t){return Object(i.a)({url:"/order/update/moneyInfo",method:"post",data:t})},e.i=function(t){return Object(i.a)({url:"/order/update/note",method:"post",params:t})},e.f=function(t){return Object(i.a)({url:"/order/selectCourier",method:"get",params:t})},e.g=function(t){return Object(i.a)({url:"/order/refreshCourier",method:"get",params:t})};var i=r("vLgD")},Gbxq:function(t,e){},HpRW:function(t,e,r){"use strict";var i=r("kM2E"),a=r("lOnJ"),n=r("+ZMJ"),o=r("NWt+");t.exports=function(t){i(i.S,t,{from:function(t){var e,r,i,s,l=arguments[1];return a(this),(e=void 0!==l)&&a(l),void 0==t?new this:(r=[],e?(i=0,s=n(l,arguments[2],2),o(t,!1,function(t){r.push(s(t,i++))})):o(t,!1,r.push,r),new this(r))}})}},KhLR:function(t,e,r){"use strict";e.c=function(t){return Object(i.a)({url:"/productAttribute/category/list",method:"get",params:t})},e.a=function(t){return Object(i.a)({url:"/productAttribute/category/create",method:"post",data:t,requestType:"form"})},e.b=function(t){return Object(i.a)({url:"/productAttribute/category/delete/"+t,method:"get"})},e.e=function(t,e){return Object(i.a)({url:"/productAttribute/category/update/"+t,method:"post",data:e,requestType:"form"})},e.d=function(){return Object(i.a)({url:"/productAttribute/category/list/withAttr",method:"get"})};var i=r("vLgD")},LIJb:function(t,e,r){var i=r("EqjI");t.exports=function(t,e){if(!i(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},Mdfv:function(t,e,r){"use strict";e.c=function(t){return Object(i.a)({url:"/home/advertise/list",method:"get",params:t})},e.f=function(t,e){return Object(i.a)({url:"/home/advertise/update/status/"+t,method:"post",params:e})},e.b=function(t){return Object(i.a)({url:"/home/advertise/delete",method:"post",data:t,requestType:"form"})},e.a=function(t){return Object(i.a)({url:"/home/advertise/create",method:"post",data:t})},e.d=function(t){return Object(i.a)({url:"/home/advertise/"+t,method:"get"})},e.e=function(t,e){return Object(i.a)({url:"/home/advertise/update/"+t,method:"post",data:e})};var i=r("vLgD")},MfRC:function(t,e){},Og03:function(t,e,r){"use strict";e.c=function(){return Object(i.a)({url:"/resourceCategory/listAll",method:"get"})},e.a=function(t){return Object(i.a)({url:"/resourceCategory/create",method:"post",data:t})},e.d=function(t,e){return Object(i.a)({url:"/resourceCategory/update/"+t,method:"post",data:e})},e.b=function(t){return Object(i.a)({url:"/resourceCategory/delete/"+t,method:"post"})};var i=r("vLgD")},STSY:function(t,e,r){"use strict";e.f=function(t){return Object(i.a)({url:"/role/list",method:"get",params:t})},e.c=function(t){return Object(i.a)({url:"/role/create",method:"post",data:t})},e.i=function(t,e){return Object(i.a)({url:"/role/update/"+t,method:"post",data:e})},e.j=function(t,e){return Object(i.a)({url:"/role/updateStatus/"+t,method:"post",params:e})},e.d=function(t){return Object(i.a)({url:"/role/delete",method:"post",data:t,requestType:"form"})},e.e=function(){return Object(i.a)({url:"/role/listAll",method:"get"})},e.g=function(t){return Object(i.a)({url:"/role/listMenu/"+t,method:"get"})},e.h=function(t){return Object(i.a)({url:"/role/listResource/"+t,method:"get"})},e.a=function(t){return Object(i.a)({url:"/role/allocMenu",method:"post",data:t,requestType:"form"})},e.b=function(t){return Object(i.a)({url:"/role/allocResource",method:"post",data:t,requestType:"form"})};var i=r("vLgD")},SldL:function(t,e){!function(e){"use strict";var r,i=Object.prototype,a=i.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",s=n.asyncIterator||"@@asyncIterator",l=n.toStringTag||"@@toStringTag",u="object"==typeof t,c=e.regeneratorRuntime;if(c)u&&(t.exports=c);else{(c=e.regeneratorRuntime=u?t.exports:{}).wrap=k;var d="suspendedStart",p="suspendedYield",h="executing",f="completed",m={},v={};v[o]=function(){return this};var b=Object.getPrototypeOf,g=b&&b(b(E([])));g&&g!==i&&a.call(g,o)&&(v=g);var y=_.prototype=w.prototype=Object.create(v);P.prototype=y.constructor=_,_.constructor=P,_[l]=P.displayName="GeneratorFunction",c.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===P||"GeneratorFunction"===(e.displayName||e.name))},c.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,l in t||(t[l]="GeneratorFunction")),t.prototype=Object.create(y),t},c.awrap=function(t){return{__await:t}},x(L.prototype),L.prototype[s]=function(){return this},c.AsyncIterator=L,c.async=function(t,e,r,i){var a=new L(k(t,e,r,i));return c.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},x(y),y[l]="Generator",y[o]=function(){return this},y.toString=function(){return"[object Generator]"},c.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var i=e.pop();if(i in t)return r.value=i,r.done=!1,r}return r.done=!0,r}},c.values=E,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(j),!t)for(var e in this)"t"===e.charAt(0)&&a.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function i(i,a){return s.type="throw",s.arg=t,e.next=i,a&&(e.method="next",e.arg=r),!!a}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var l=a.call(o,"catchLoc"),u=a.call(o,"finallyLoc");if(l&&u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&a.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var n=i;break}}n&&("break"===t||"continue"===t)&&n.tryLoc<=e&&e<=n.finallyLoc&&(n=null);var o=n?n.completion:{};return o.type=t,o.arg=e,n?(this.method="next",this.next=n.finallyLoc,m):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var i=r.completion;if("throw"===i.type){var a=i.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,i){return this.delegate={iterator:E(t),resultName:e,nextLoc:i},"next"===this.method&&(this.arg=r),m}}}function k(t,e,r,i){var a=e&&e.prototype instanceof w?e:w,n=Object.create(a.prototype),o=new C(i||[]);return n._invoke=function(t,e,r){var i=d;return function(a,n){if(i===h)throw new Error("Generator is already running");if(i===f){if("throw"===a)throw n;return I()}for(r.method=a,r.arg=n;;){var o=r.delegate;if(o){var s=O(o,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===d)throw i=f,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=h;var l=S(t,e,r);if("normal"===l.type){if(i=r.done?f:p,l.arg===m)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=f,r.method="throw",r.arg=l.arg)}}}(t,r,o),n}function S(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}function w(){}function P(){}function _(){}function x(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function L(t){var e;this._invoke=function(r,i){function n(){return new Promise(function(e,n){!function e(r,i,n,o){var s=S(t[r],t,i);if("throw"!==s.type){var l=s.arg,u=l.value;return u&&"object"==typeof u&&a.call(u,"__await")?Promise.resolve(u.__await).then(function(t){e("next",t,n,o)},function(t){e("throw",t,n,o)}):Promise.resolve(u).then(function(t){l.value=t,n(l)},o)}o(s.arg)}(r,i,e,n)})}return e=e?e.then(n,n):n()}}function O(t,e){var i=t.iterator[e.method];if(i===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=r,O(t,e),"throw"===e.method))return m;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var a=S(i,t.iterator,e.arg);if("throw"===a.type)return e.method="throw",e.arg=a.arg,e.delegate=null,m;var n=a.arg;return n?n.done?(e[t.resultName]=n.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,m):n:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,m)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,n=function e(){for(;++i<t.length;)if(a.call(t,i))return e.value=t[i],e.done=!1,e;return e.value=r,e.done=!0,e};return n.next=n}}return{next:I}}function I(){return{value:r,done:!0}}}(function(){return this}()||Function("return this")())},TZVV:function(t,e,r){"use strict";var i=r("//Fk"),a=r.n(i),n=r("ZW30"),o={name:"singleUpload",props:{value:String,disabled:{type:Boolean,default:!1},bucket_name:{type:String,default:"mall"}},computed:{imageUrl:function(){return this.value},imageName:function(){return null!=this.value&&""!==this.value?this.value.substr(this.value.lastIndexOf("/")+1):null},fileList:function(){return[{name:this.imageName,url:this.imageUrl}]},showFileList:{get:function(){return null!==this.value&&""!==this.value&&void 0!==this.value},set:function(t){}}},data:function(){return{dataObj:{policy:"",signature:"",key:"",KSSAccessKeyId:"",acl:"public-read",name:""},dialogVisible:!1,useOss:!0,ossUploadUrl:"https://"+this.bucket_name+".ks3-cn-beijing.ksyuncs.com",minioUploadUrl:"http://localhost:8080/minio/upload"}},methods:{emitInput:function(t){this.$emit("input",t)},handleRemove:function(t,e){this.emitInput("")},handlePreview:function(t){this.dialogVisible=!0},beforeUpload:function(t){var e=this,r=this;return!this.useOss||(console.log(t,"掉用beforeUpload"),new a.a(function(i,a){var o=(new Date).getTime()+t.name,s={filename:t.name,bucketName:e.bucket_name,postData:{filename:t.name,acl:"public-read",key:o,unknowValueField:[]}};Object(n.a)(s).then(function(a){r.dataObj.policy=a.data.policy,r.dataObj.signature=a.data.signature,r.dataObj.KSSAccessKeyId=a.data.kssAccessKeyId,r.dataObj.key=o,r.dataObj.name=t.name,r.dataObj.acl="public-read";var n={KSSAccessKeyId:a.data.kssAccessKeyId,policy:a.data.policy,signature:a.data.signature,key:o,acl:"public-read",uploadDomain:"https://ks3-cn-beijing.ksyuncs.com/"+e.bucket_name,autoStart:!0};console.log(n,"ks3Options");document.body,new ks3FileUploader(n);i(!0)}).catch(function(t){console.log(t),a(!1)})}))},handleUploadSuccess:function(t,e){var r=this.ossUploadUrl+"/"+this.dataObj.key;this.showFileList=!0,this.fileList.pop(),this.useOss||(r=t.data.url),this.fileList.push({name:e.name,url:r}),this.emitInput(this.fileList[0].url)}}},s={render:function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("el-upload",{attrs:{disabled:t.disabled,action:t.ossUploadUrl,data:t.useOss?t.dataObj:null,"list-type":"picture",multiple:!1,"show-file-list":t.showFileList,"file-list":t.fileList,"before-upload":t.beforeUpload,"on-remove":t.handleRemove,"on-success":t.handleUploadSuccess,"on-preview":t.handlePreview}},[r("el-button",{attrs:{size:"small",type:"primary"}},[t._v("点击上传")]),t._v(" "),r("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[t._v("\n 只能上传jpg/png文件,且不超过10MB\n ")])],1),t._v(" "),r("el-dialog",{attrs:{visible:t.dialogVisible},on:{"update:visible":function(e){t.dialogVisible=e}}},[r("img",{attrs:{width:"100%",src:t.fileList[0].url,alt:""}})])],1)},staticRenderFns:[]};var l=r("VU/8")(o,s,!1,function(t){r("moa/")},null,null);e.a=l.exports},UgCr:function(t,e,r){"use strict";e.b=function(t){return Object(n.a)({url:"/product/list",method:"get",params:t})},e.c=function(t){return Object(n.a)({url:"/product/simpleList",method:"get",params:t})},e.e=function(t){return Object(n.a)({url:"/product/update/deleteStatus",method:"post",params:t})},e.f=function(t){return Object(n.a)({url:"/product/update/newStatus",method:"post",params:t})},e.i=function(t){return Object(n.a)(a()({url:"/product/update/recommendStatus",method:"post",params:t,data:t},"params",t))},e.h=function(t){return Object(n.a)({url:"/product/update/publishStatus",method:"post",data:t,params:t})},e.a=function(t){return Object(n.a)({url:"/product/create",method:"post",data:t})},e.g=function(t,e){return Object(n.a)({url:"/product/update/"+t,method:"post",data:e})},e.d=function(t){return Object(n.a)({url:"/product/updateInfo/"+t,method:"get"})};var i=r("bOdI"),a=r.n(i),n=r("vLgD")},VVOu: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:"格式"})},Xxa5:function(t,e,r){t.exports=r("jyFz")},ZW30:function(t,e,r){"use strict";e.a=function(t){return Object(i.a)({url:"/api-admin/getUploadSign",method:"POST",headers:{"Content-Type":"application/json"},data:t})};var i=r("vLgD"),a=r("mw3O");r.n(a)},bOdI:function(t,e,r){"use strict";e.__esModule=!0;var i,a=r("C4MV"),n=(i=a)&&i.__esModule?i:{default:i};e.default=function(t,e,r){return e in t?(0,n.default)(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}},bUp0:function(t,e,r){"use strict";e.c=function(t,e){return Object(i.a)({url:"/menu/list/"+t,method:"get",params:e})},e.b=function(t){return Object(i.a)({url:"/menu/delete/"+t,method:"post"})},e.a=function(t){return Object(i.a)({url:"/menu/create",method:"post",data:t})},e.g=function(t,e){return Object(i.a)({url:"/menu/update/"+t,method:"post",data:e})},e.e=function(t){return Object(i.a)({url:"/menu/"+t,method:"get"})},e.f=function(t,e){return Object(i.a)({url:"/menu/updateHidden/"+t,method:"post",params:e})},e.d=function(){return Object(i.a)({url:"/menu/treeList",method:"get"})};var i=r("vLgD")},"c/Tr":function(t,e,r){t.exports={default:r("5zde"),__esModule:!0}},exGp:function(t,e,r){"use strict";e.__esModule=!0;var i,a=r("//Fk"),n=(i=a)&&i.__esModule?i:{default:i};e.default=function(t){return function(){var e=t.apply(this,arguments);return new n.default(function(t,r){return function i(a,o){try{var s=e[a](o),l=s.value}catch(t){return void r(t)}if(!s.done)return n.default.resolve(l).then(function(t){i("next",t)},function(t){i("throw",t)});t(l)}("next")})}}},fBQ2:function(t,e,r){"use strict";var i=r("evD5"),a=r("X8DO");t.exports=function(t,e,r){e in t?i.f(t,e,a(0,r)):t[e]=r}},fZjL:function(t,e,r){t.exports={default:r("jFbC"),__esModule:!0}},ioQ5:function(t,e,r){r("HpRW")("Set")},jFbC:function(t,e,r){r("Cdx3"),t.exports=r("FeBl").Object.keys},jyFz:function(t,e,r){var i=function(){return this}()||Function("return this")(),a=i.regeneratorRuntime&&Object.getOwnPropertyNames(i).indexOf("regeneratorRuntime")>=0,n=a&&i.regeneratorRuntime;if(i.regeneratorRuntime=void 0,t.exports=r("SldL"),a)i.regeneratorRuntime=n;else try{delete i.regeneratorRuntime}catch(t){i.regeneratorRuntime=void 0}},lHA8:function(t,e,r){t.exports={default:r("pPW7"),__esModule:!0}},m9gC:function(t,e,r){var i=r("RY/4"),a=r("4WTo");t.exports=function(t){return function(){if(i(this)!=t)throw TypeError(t+"#toJSON isn't generic");return a(this)}}},mClu:function(t,e,r){var i=r("kM2E");i(i.S+i.F*!r("+E39"),"Object",{defineProperty:r("evD5").f})},mRsl:function(t,e,r){"use strict";e.c=function(t,e){return Object(i.a)({url:"/productCategory/list/"+t,method:"get",params:e})},e.b=function(t){return Object(i.a)({url:"/productCategory/delete/"+t,method:"post"})},e.a=function(t){return Object(i.a)({url:"/productCategory/create",method:"post",data:t})},e.g=function(t,e){return Object(i.a)({url:"/productCategory/update/"+t,method:"post",data:e})},e.e=function(t){return Object(i.a)({url:"/productCategory/"+t,method:"get"})},e.h=function(t){return Object(i.a)({url:"/productCategory/update/showStatus",method:"post",data:t,params:t})},e.f=function(t){return Object(i.a)({url:"/productCategory/update/navStatus",method:"post",data:t,params:t})},e.d=function(){return Object(i.a)({url:"/productCategory/list/withChildren",method:"get"})};var i=r("vLgD")},"moa/":function(t,e){},oNmr:function(t,e,r){r("9Bbf")("Set")},oP6A:function(t,e){},oeOm:function(t,e,r){var i=r("7Doy");t.exports=function(t,e){return new(i(t))(e)}},pPW7:function(t,e,r){r("M6a0"),r("zQR9"),r("+tPU"),r("ttyz"),r("BDhv"),r("oNmr"),r("ioQ5"),t.exports=r("FeBl").Set},qo66:function(t,e,r){"use strict";var i=r("7KvD"),a=r("kM2E"),n=r("06OY"),o=r("S82l"),s=r("hJx8"),l=r("xH/j"),u=r("NWt+"),c=r("2KxR"),d=r("EqjI"),p=r("e6n0"),h=r("evD5").f,f=r("ALrJ")(0),m=r("+E39");t.exports=function(t,e,r,v,b,g){var y=i[t],k=y,S=b?"set":"add",w=k&&k.prototype,P={};return m&&"function"==typeof k&&(g||w.forEach&&!o(function(){(new k).entries().next()}))?(k=e(function(e,r){c(e,k,t,"_c"),e._c=new y,void 0!=r&&u(r,b,e[S],e)}),f("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(t){var e="add"==t||"set"==t;t in w&&(!g||"clear"!=t)&&s(k.prototype,t,function(r,i){if(c(this,k,t),!e&&g&&!d(r))return"get"==t&&void 0;var a=this._c[t](0===r?0:r,i);return e?this:a})}),g||h(k.prototype,"size",{get:function(){return this._c.size}})):(k=v.getConstructor(e,t,b,S),l(k.prototype,r),n.NEED=!0),p(k,t),P[t]=k,a(a.G+a.W+a.F,P),g||v.setStrong(k,t,b),k}},qyJz:function(t,e,r){"use strict";var i=r("+ZMJ"),a=r("kM2E"),n=r("sB3e"),o=r("msXi"),s=r("Mhyx"),l=r("QRG4"),u=r("fBQ2"),c=r("3fs2");a(a.S+a.F*!r("dY0y")(function(t){Array.from(t)}),"Array",{from:function(t){var e,r,a,d,p=n(t),h="function"==typeof this?this:Array,f=arguments.length,m=f>1?arguments[1]:void 0,v=void 0!==m,b=0,g=c(p);if(v&&(m=i(m,f>2?arguments[2]:void 0,2)),void 0==g||h==Array&&s(g))for(r=new h(e=l(p.length));e>b;b++)u(r,b,v?m(p[b],b):p[b]);else for(d=g.call(p),r=new h;!(a=d.next()).done;b++)u(r,b,v?o(d,m,[a.value,b],!0):a.value);return r.length=b,r}})},"s/Rn":function(t,e,r){"use strict";e.c=function(t){return Object(i.a)({url:"/brand/list",method:"get",params:t})},e.a=function(t){return Object(i.a)({url:"/brand/create",method:"post",data:t})},e.f=function(t){return Object(i.a)({url:"/brand/update/showStatus",method:"post",data:t,requestType:"form"})},e.b=function(t){return Object(i.a)({url:"/brand/delete/"+t,method:"get"})},e.d=function(t){return Object(i.a)({url:"/brand/"+t,method:"get"})},e.e=function(t,e){return Object(i.a)({url:"/brand/update/"+t,method:"post",data:e})};var i=r("vLgD")},ttyz:function(t,e,r){"use strict";var i=r("9C8M"),a=r("LIJb");t.exports=r("qo66")("Set",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return i.def(a(this,"Set"),t=0===t?0:t,t)}},i)},uqUo:function(t,e,r){var i=r("kM2E"),a=r("FeBl"),n=r("S82l");t.exports=function(t,e){var r=(a.Object||{})[t]||Object[t],o={};o[t]=e(r),i(i.S+i.F*n(function(){r(1)}),"Object",o)}},xT6B:function(t,e,r){"use strict";function i(t){return("00"+t).substr(t.length)}e.a=function(t,e){/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));var r={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};for(var a in r)if(new RegExp("("+a+")").test(e)){var n=r[a]+"";e=e.replace(RegExp.$1,1===RegExp.$1.length?n:i(n))}return e}}});
- //# sourceMappingURL=0.e23f1a4fe70bd8ff0f2f.js.map
|