(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-463e52be"],{"0782":function(t,e,i){},"07b6":function(t,e,i){"use strict";i("b787")},"0e0d":function(t,e,i){},1635:function(t,e,i){"use strict";var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"mockups"},[i("my-img",{staticClass:"mockups-left",attrs:{"big-image":!0,src:t.value,alt:"product image"}}),i("div",{staticClass:"mockups-right"},[i("div",{staticClass:"mockups-title"},[t._v("Select title image view")]),i("div",{staticClass:"mockups-list"},t._l(t.images,(function(e,s){return i("div",{key:s,staticClass:"mockups-item"},[i("div",{class:["mockups-item-img-box","div-hover",{"div-select tag":e.url===t.value}],on:{click:function(i){return t.onSelectImg(e)}}},[i("my-img",{staticClass:"mockups-item-img",attrs:{src:e.url,"show-on-server":e.showOnServer},on:{"update:showOnServer":function(i){return t.$set(e,"showOnServer",i)},"update:show-on-server":function(i){return t.$set(e,"showOnServer",i)},showOnServerClick:function(i){return t.showOnServerClick(e)}}})],1)])})),0)])],1)},o=[],a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"image-container"},[t.isAlive&&t.finImageUrl?s("el-image",{style:t.imageStyle,attrs:{src:t.finImageUrl,alt:t.alt},on:{load:t.loadSuccess,click:t.showPreview,error:t.loadFail}}):t._e(),t.bigImage?t._e():s("div",{staticClass:"show-on-server-box",on:{click:function(e){return e.preventDefault(),e.stopPropagation(),t.showOnServerClick.apply(null,arguments)}}},[t.showOnServer?t._e():s("img",{staticClass:"icon",attrs:{src:i("ee78")}}),t.showOnServer?s("img",{staticClass:"icon",attrs:{src:i("9486")}}):t._e()]),t.showOnServer||t.bigImage?t._e():s("div",{staticClass:"mask"},[t.showOnServer?t._e():s("span",{staticClass:"mask-text"},[t._v(" Not visible in the store ")])]),s("el-dialog",{attrs:{visible:t.dialogVisible},on:{"update:visible":function(e){t.dialogVisible=e}}},[s("img",{attrs:{src:t.src,width:"100%",alt:""}})])],1)},n=[],r={name:"MyImg",props:{src:{type:String,default:()=>i("e803")},alt:{type:String,default:"image"},width:{type:Number,default:200},height:{type:Number,default:200},quality:{type:Number,default:80},noCompress:{type:Boolean,default:!1},preview:{type:Boolean,default:!1},imageStyle:{type:Object,default:()=>{}},showOnServer:{type:Boolean,default:!1},bigImage:{type:Boolean,default:!1}},data(){return{finImageUrl:"",failCount:0,isAlive:!0,dialogVisible:!1}},watch:{src(){this.urlChange()}},mounted(){this.urlChange()},methods:{showOnServerClick(){this.$emit("showOnServerClick")},showPreview(){this.preview&&(this.dialogVisible=!0)},endWith(t,e){var i=t.length-e.length;return i>=0&&t.indexOf(e,i)===i},reload(){this.isAlive=!1,this.$nextTick(()=>this.isAlive=!0)},urlChange(){this.failCount=0,this.loadFail()},loadSuccess(){},loadFail(t){this.src?(this.failCount=this.failCount+1,1!==this.failCount?2!==this.failCount?this.finImageUrl=i("e803"):this.finImageUrl=this.src:this.noCompress?this.finImageUrl=this.src:this.endWith(this.src,"jpg")||this.endWith(this.src,"jpeg")||this.endWith(this.src,"png")?this.finImageUrl=this.src+`?x-oss-process=image/resize,w_${this.width},h_${this.height}/format,webp/quality,q_${this.quality}`:this.finImageUrl=this.src):this.finImageUrl=""}}},l=r,c=(i("6795"),i("2877")),d=Object(c["a"])(l,a,n,!1,null,"518f0d8a",null),u=d.exports,p={name:"Mockups",components:{MyImg:u},props:{images:{type:Array,default:()=>[]},value:{type:String,default:null}},data(){return{currentIndex:0}},watch:{currentIndex(t){this.$emit("change",this.images[t].url)},images:{handler(){this.$emit("images:updated",this.images)}}},methods:{onSelectImg(t){t.showOnServer&&this.$emit("input",t.url)},showOnServerClick(t){t.showOnServer=!t.showOnServer}}},g=p,h=(i("4d38"),Object(c["a"])(g,s,o,!1,null,"7aa79a7a",null));e["a"]=h.exports},"21f7":function(t,e,i){},"3a78":function(t,e,i){t.exports=i.p+"static/img/empyImage.6280cd62.svg"},"48c2":function(t,e,i){"use strict";var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.variantList?i("div",{staticClass:"variants-box"},[t._m(0),i("div",{staticClass:"variants-title"},[t._v("Pricing")]),i("div",{staticClass:"variants-button-box"},[i("div",{staticClass:"button-box"},[i("el-button",{attrs:{disabled:!t.skuIds.length},on:{click:function(e){return t.showEdit("retailPrice")}}},[t._v("Edit price")]),i("el-button",{attrs:{disabled:!t.skuIds.length},on:{click:function(e){return t.showEdit("profit")}}},[t._v("Edit profit")]),i("el-button",{attrs:{disabled:!t.skuIds.length},on:{click:function(e){return t.showEdit("compareAtPrice")}}},[t._v("Edit compare at price")]),i("el-button",{attrs:{disabled:!t.skuIds.length},on:{click:function(e){return t.showEdit("profitMargin")}}},[t._v("Edit profit margin")]),i("el-button",{attrs:{disabled:!t.skuIds.length},on:{click:function(e){return t.showEdit("additionalPrice")}}},[t._v("Edit additional fees")])],1),i("div",{staticClass:"switch-box"},[i("div",{staticClass:"text"},[t._v("Compare at price")]),i("el-switch",{model:{value:t.showCompareAtPriceRow,callback:function(e){t.showCompareAtPriceRow=e},expression:"showCompareAtPriceRow"}})],1)]),i("el-form-item",{attrs:{prop:"variantList"}},[i("el-table",{staticClass:"variants-table",attrs:{data:t.variantList,"row-style":t.tableRowStyle},on:{"selection-change":t.handleSelectionChange}},[i("el-table-column",{attrs:{type:"selection",width:"55"}}),t._l(t.variantList[0].skuList,(function(e,s){return[i("el-table-column",{key:s,attrs:{label:e.label},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.skuList&&e.row.skuList.length?i("div",[t._v(t._s(e.row.skuList[s].value))]):t._e()]}}],null,!0)})]})),i("el-table-column",{attrs:{prop:"costs",label:"Production Cost"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("div",{staticClass:"input-box"},[i("div",{staticClass:"input-tag"},[t._v("USD")]),i("el-input-number",{staticClass:"input-content",staticStyle:{width:"100%"},attrs:{precision:2,controls:!1,disabled:""},model:{value:e.row.costs,callback:function(i){t.$set(e.row,"costs",i)},expression:"scope.row.costs"}})],1)]}}],null,!1,458063697)}),i("el-table-column",{attrs:{prop:"profit",label:"Profit"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("div",{staticClass:"input-box"},[i("div",{staticClass:"input-tag"},[t._v("USD")]),i("el-input-number",{staticClass:"input-content",staticStyle:{width:"100%"},attrs:{precision:2,controls:!1,min:0},on:{input:function(i){return t.profitComputed(e.row)}},model:{value:e.row.profit,callback:function(i){t.$set(e.row,"profit",i)},expression:"scope.row.profit"}})],1)]}}],null,!1,4126958023)}),i("el-table-column",{attrs:{prop:"profitMargin",label:"Profit margin"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("div",{staticClass:"input-box"},[i("el-input-number",{staticClass:"input-content",staticStyle:{width:"100%"},attrs:{precision:2,max:9999,min:-9999,controls:!1},on:{input:function(i){return t.profitMarginComputed(e.row)}},model:{value:e.row.profitMargin,callback:function(i){t.$set(e.row,"profitMargin",i)},expression:"scope.row.profitMargin"}}),i("div",{staticClass:"input-tag"},[t._v("%")])],1)]}}],null,!1,3548064671)}),i("el-table-column",{attrs:{prop:"additionalPrice",label:"Additional Fees"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("div",{staticClass:"input-box"},[i("div",{staticClass:"input-tag"},[t._v("USD")]),i("el-input-number",{staticClass:"input-content",staticStyle:{width:"100%"},attrs:{precision:2,controls:!1},on:{input:function(i){return t.additionalFeesComputed(e.row)}},model:{value:e.row.additionalPrice,callback:function(i){t.$set(e.row,"additionalPrice",i)},expression:"scope.row.additionalPrice"}})],1)]}}],null,!1,852812851)}),t.showCompareAtPriceRow?i("el-table-column",{key:"compareAtPrice",attrs:{prop:"compareAtPrice",label:"Compare at price"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("div",{staticClass:"input-box"},[i("div",{staticClass:"input-tag"},[t._v("USD")]),i("el-input-number",{staticClass:"input-content",staticStyle:{width:"100%"},attrs:{precision:2,min:e.row.retailPrice,controls:!1},model:{value:e.row.compareAtPrice,callback:function(i){t.$set(e.row,"compareAtPrice",i)},expression:"scope.row.compareAtPrice"}})],1)]}}],null,!1,1319474822)}):t._e(),i("el-table-column",{attrs:{prop:"retailPrice",label:"Your Price"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("div",{staticClass:"input-box"},[i("div",{staticClass:"input-tag"},[t._v("USD")]),i("el-input-number",{staticClass:"input-content",staticStyle:{width:"100%"},attrs:{precision:2,controls:!1,min:e.row.costs+e.row.additionalPrice},on:{input:function(i){return t.retailPriceComputed(e.row)}},model:{value:e.row.retailPrice,callback:function(i){t.$set(e.row,"retailPrice",i)},expression:"scope.row.retailPrice"}})],1)]}}],null,!1,2578629936)}),i("el-table-column",{attrs:{label:"Synchronous Sku"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("el-radio-group",{model:{value:e.row.checked,callback:function(i){t.$set(e.row,"checked",i)},expression:"scope.row.checked"}},[i("el-radio",{attrs:{label:!0}},[t._v("Yes")]),i("el-radio",{attrs:{label:!1}},[t._v("No")])],1)]}}],null,!1,3279884005)})],2)],1),i("el-dialog",{attrs:{visible:t.dialogVisible,"close-on-click-modal":!1,"append-to-body":"",width:"30%"},on:{"update:visible":function(e){t.dialogVisible=e}}},[i("div",{staticClass:"dialog-title",attrs:{slot:"title"},slot:"title"},[t._v("edit")]),i("el-form",{ref:"editForm",attrs:{model:t.editForm,rules:t.editRules,"label-width":"100px","label-position":"top"},nativeOn:{submit:function(e){return e.preventDefault(),t.editPrice("editForm")}}},["profitMargin"===t.currentKey?i("div",{staticClass:"input-box"},[i("el-form-item",{attrs:{prop:"num"}},[i("el-input-number",{staticClass:"input-content",staticStyle:{width:"100%"},attrs:{precision:2,max:9999,min:-9999,controls:!1},model:{value:t.editForm.num,callback:function(e){t.$set(t.editForm,"num",e)},expression:"editForm.num"}})],1),i("div",{staticClass:"input-tag"},[t._v("%")])],1):i("div",{staticClass:"input-box"},[i("div",{staticClass:"input-tag"},[t._v("USD")]),i("el-form-item",{attrs:{prop:"num"}},[i("el-input-number",{staticClass:"input-content",staticStyle:{width:"100%"},attrs:{precision:2,max:9999,min:-9999,controls:!1},model:{value:t.editForm.num,callback:function(e){t.$set(t.editForm,"num",e)},expression:"editForm.num"}})],1)],1)]),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:t.close}},[t._v("close")]),i("el-button",{attrs:{loading:t.editLoading,type:"primary"},on:{click:function(e){return t.editPrice("editForm")}}},[t._v("Edit")])],1)],1)],1):t._e()},o=[function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"variants-text"},[i("div",{staticClass:"text"},[t._v("Your retail price = (product cost) * (100% + profit margin) + additional fees")]),i("div",{staticClass:"text"},[t._v("We recommend that you select several major sales countries.Add shipping costs to your retail price to make it free shipping to customers inyour primary sales countries.")]),i("div",{staticClass:"text"},[t._v("You can then set up shipping profiles on your store. Main sales countries: freeshipping, other shipping areas: some shipping costs will be added accordingly")])])}],a={name:"Variants",props:{variantList:{type:Array,default:()=>[]},customProductInfo:{type:Object,default:()=>({})}},data(){return{showCompareAtPriceRow:!0,skuIds:[],dialogVisible:!1,currentKey:"",editLoading:!1,editForm:{num:0},editRules:{num:[{required:!0,message:"The 1Num field is required",trigger:"blur"}]}}},computed:{skuType(){return(t,e)=>this.customProductInfo.option1Name===t?e.option1Value:this.customProductInfo.option2Name===t?e.option2Value:this.customProductInfo.option3Name===t?e.option3Value:""},skuList(){return t=>{const e=[];return t.option1Value&&e.push({label:this.customProductInfo.option1Name,value:t.option1Value}),t.option2Value&&e.push({label:this.customProductInfo.option2Name,value:t.option2Value}),t.option3Value&&e.push({label:this.customProductInfo.option3Name,value:t.option3Value}),e}},profitComputed(){return t=>(t.retailPrice=Number(t.profit)+Number(t.costs)+Number(t.additionalPrice),t.profitMargin=Number(t.profit)/Number(t.costs+t.profit)*100,t.profit)},retailPriceComputed(){return t=>(t.profit=t.retailPrice-t.costs-t.additionalPrice,t.profit<=0?(t.profit=0,t.profitMargin=0):t.profitMargin=Number(t.profit)/Number(t.costs+t.profit)*100,t.retailPrice)},profitMarginComputed(){return t=>{const e=Number(t.profitMargin)/100;return t.profit=e*Number(t.costs)/(1-e),t.retailPrice=Number(t.profit)+Number(t.costs)+Number(t.additionalPrice),t.profitMargin}},additionalFeesComputed(){return t=>(t.retailPrice=Number(t.profit)+Number(t.costs)+Number(t.additionalPrice),t.profit=t.retailPrice-t.costs-t.additionalPrice,t.profit<=0?(t.profit=0,t.profitMargin=0):t.profitMargin=Number(t.profit)/Number(t.costs+t.profit)*100,t.additionalPrice)},haveDropshipped(){return this.customProductInfo&&this.customProductInfo.id}},watch:{variantList:{handler(t){t.forEach(t=>(t.skuList=this.skuList(t),t)),this.changeForm()},deep:!0,immediate:!1},skuIds:{handler(){this.changeForm()},deep:!0}},methods:{handleSelectionChange(t){this.skuIds=t.map(t=>t.skuId)},tableRowStyle({row:t,rowIndex:e}){return t.checked?{}:{background:"#faf9f9 !important",color:"gray","text-decoration":"line-through","font-weight":"lighter"}},close(){this.editLoading=!1,this.dialogVisible=!1,this.editForm.num=0},showEdit(t){this.dialogVisible=!0,this.currentKey=t},editPrice(t){this.$refs[t].validate(async t=>{t&&(this.editLoading=!0,this.variantList.forEach(t=>{this.skuIds.forEach(e=>{t.skuId===e&&(t[this.currentKey]=this.editForm.num)})}),this.close())})},changeForm(){const t=this.variantList.map(t=>{const e={skuId:t.skuId,retailPrice:t.retailPrice,compareAtPrice:t.compareAtPrice,costs:t.costs,checked:t.checked};return e});this.$emit("change",t)}}},n=a,r=(i("84c1"),i("2877")),l=Object(r["a"])(n,s,o,!1,null,"fae977ba",null);e["a"]=l.exports},"4bdd":function(t,e,i){"use strict";i("e8fe")},"4d38":function(t,e,i){"use strict";i("21f7")},6795:function(t,e,i){"use strict";i("d4afd")},7141:function(t,e,i){"use strict";i.r(e);var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"dropshinpper-detail default-main"},[i("BackPage"),i("el-form",{ref:"dropshinpperForm",attrs:{model:t.dropshinpperForm,rules:t.dropshinpperRules,"label-width":"100px","label-position":"top"}},[i("div",{staticClass:"dropshinpper-title"},[t._v(t._s(t.detailInfo.customProductInfo.title))]),i("div",{staticClass:"dropshinpper-card"},[i("div",{staticClass:"dropshinpper-card-title"},[t._v("Mockups")]),i("Mockups",{attrs:{images:t.detailInfo.images},on:{"update:images":function(e){return t.$set(t.detailInfo,"images",e)}},model:{value:t.dropshinpperForm.mainImageUrl,callback:function(e){t.$set(t.dropshinpperForm,"mainImageUrl",e)},expression:"dropshinpperForm.mainImageUrl"}})],1),i("div",{staticClass:"dropshinpper-card"},[i("Description",{attrs:{"custom-product-info":t.detailInfo.customProductInfo,"collection-id":t.detailInfo.customProductInfo.collectionId},on:{"update:collectionId":function(e){return t.$set(t.detailInfo.customProductInfo,"collectionId",e)},"update:collection-id":function(e){return t.$set(t.detailInfo.customProductInfo,"collectionId",e)},change:t.changeDescription}})],1),i("div",{staticClass:"dropshinpper-card"},[i("div",{staticClass:"dropshinpper-card-title"},[t._v("Publishing Settings")]),t.detailInfo.customProductInfo.blankProductId?i("StoreDetails",{attrs:{"custom-product-id":t.customProductId,"blank-product-id-list":[t.detailInfo.customProductInfo.blankProductId],"default-logistics-type":t.detailInfo.customProductInfo.defaultLogisticsType,"fittings-id-list":t.fittingsIdList,"greeting-cards":t.greetingCards,"fittings-id":t.detailInfo.customProductInfo.fittingsId,"blank-fittings-level":t.detailInfo.customProductInfo.blankFittingsLevel,"hidden-in-store":t.detailInfo.customProductInfo.hiddenInStore,"blank-greeting-card-id":t.detailInfo.customProductInfo.blankGreetingCardId,"level-fittings":[].concat(t.detailInfo.level1Fittingses).concat(t.detailInfo.level2Fittingses),"show-package":!t.detailInfo.customProductInfo.isCustomDesignFittings,"show-blank-greeting-card":!t.detailInfo.customProductInfo.isCustomDesignFittings},on:{"update:defaultLogisticsType":function(e){return t.$set(t.detailInfo.customProductInfo,"defaultLogisticsType",e)},"update:default-logistics-type":function(e){return t.$set(t.detailInfo.customProductInfo,"defaultLogisticsType",e)},"update:fittingsIdList":function(e){t.fittingsIdList=e},"update:fittings-id-list":function(e){t.fittingsIdList=e},"update:fittingsId":function(e){return t.$set(t.detailInfo.customProductInfo,"fittingsId",e)},"update:fittings-id":function(e){return t.$set(t.detailInfo.customProductInfo,"fittingsId",e)},"update:blankFittingsLevel":function(e){return t.$set(t.detailInfo.customProductInfo,"blankFittingsLevel",e)},"update:blank-fittings-level":function(e){return t.$set(t.detailInfo.customProductInfo,"blankFittingsLevel",e)},"update:hiddenInStore":function(e){return t.$set(t.detailInfo.customProductInfo,"hiddenInStore",e)},"update:hidden-in-store":function(e){return t.$set(t.detailInfo.customProductInfo,"hiddenInStore",e)},"update:blankGreetingCardId":function(e){return t.$set(t.detailInfo.customProductInfo,"blankGreetingCardId",e)},"update:blank-greeting-card-id":function(e){return t.$set(t.detailInfo.customProductInfo,"blankGreetingCardId",e)}}}):t._e()],1),i("div",{staticClass:"dropshinpper-card"},[i("div",{staticClass:"dropshinpper-card-title"},[t._v("Variants")]),i("Variants",{attrs:{"custom-product-info":t.detailInfo.customProductInfo,"variant-list":t.detailInfo.variantList},on:{change:t.changeVariants}})],1),i("div",{staticClass:"dropshinpper-button"},[i("el-button",{attrs:{loading:t.saveLoading},on:{click:function(e){return t.save("dropshinpperForm")}}},[t._v("Save as draft")]),2!==t.currentShop.shopType?i("el-button",{attrs:{loading:t.publishLoading,type:"primary"},on:{click:function(e){return t.release("dropshinpperForm")}}},[t._v("Publish")]):t._e()],1)])],1)},o=[],a=(i("d9e2"),i("2f69")),n=i("1635"),r=i("afad"),l=i("48c2"),c=i("cd9e"),d=i("2f62"),u=i("623f"),p={name:"DropshinpperDetail",components:{Mockups:n["a"],StoreDetails:r["a"],Variants:l["a"],Description:c["a"]},beforeRouteEnter(t,e,i){document.documentElement.scrollTop=0,i()},data(){return{fittingsIdList:[],id:"",customProductId:null,detailInfo:{customProductInfo:{tags:[]},images:[{url:""}],level1Fittings:[{id:""}],level2Fittings:[{id:""}],level1Fittingses:[],level2Fittingses:[],level3Fittings:[{id:""}],variantList:[{retailPrice:0,profit:0,profitMargin:0}]},saveLoading:!1,publishLoading:!1,dropshinpperForm:{blankProductId:0,mainImageUrl:"",title:"",description:"",isAddMertic:!0,tags:[],variantList:[],hiddenInStore:!1,blankFittingsLevel:1,collectionId:""},greetingCards:[],dropshinpperRules:{blankProductId:[{required:!0,message:"The BlankProductId field is required",trigger:"blur"}],mainImageUrl:[{required:!0,message:"The MainImageUrl field is required",trigger:"blur"}],title:[{required:!0,message:"The Title field is required",trigger:"blur"}],description:[{required:!0,message:"The Description field is required",trigger:"blur"}],hiddenInStore:[{required:!0,message:"The HiddenInStore field is required",trigger:"blur"}],blankFittingsLevel:[{required:!0,message:"The BlankFittingsLevel field is required",trigger:"blur"}],variantList:[{required:!0,message:"The VariantList field is required",trigger:"blur"}]},setIntervalTag:!1}},computed:{...Object(d["b"])("user",{currentShop:"getCurrentShop"})},created(){this.id=this.$route.params.id,this.customProductId=this.$route.params.customProductId,this.getDetail(),this.loadGreetingCards()},beforeDestroy(){clearInterval(this.setIntervalTag)},methods:{async getDetail(){var t={};this.customProductId&&(t.customProductId=this.customProductId);const e=await Object(a["c"])(this.id,t);this.detailInfo=e.data,this.detailInfo.variantList.forEach(t=>{let e,i=Number(t.retailPrice)-Number(t.costs)-Number(t.additionalPrice);i<=0?(i=0,e=0):e=Number(t.profit)/(Number(t.costs)+Number(t.profit))*100,this.$set(t,"profit",i),this.$set(t,"profitMargin",e)})},async loadGreetingCards(){var t=await Object(u["m"])({blankProductId:this.id});this.greetingCards=t.data||[]},changeStore(t){this.dropshinpperForm=Object.assign(this.dropshinpperForm,t)},changeVariants(t){this.dropshinpperForm.variantList=t},changeDescription(t){this.dropshinpperForm=Object.assign(this.dropshinpperForm,t)},async save(t,e=!0){return new Promise(i=>{this.$refs[t].validate(async t=>{if(t){this.saveLoading=!0;try{var s=Object.assign({},this.dropshinpperForm);s.id=this.customProductId,s.fittingsIdList=this.fittingsIdList,this.detailInfo.images&&this.detailInfo.images.length>0&&(s.imageList=this.detailInfo.images.map(t=>({url:t.url,showOnServer:t.showOnServer})));const t=await Object(a["h"])(s);e&&(this.$message.success("Save success"),setTimeout(()=>{this.callNewPage("/DropshinpperList")},500)),i(t.data)}finally{this.saveLoading=!1}}})})},async release(t){this.publishLoading=!0;try{const e=await this.save(t,!1);await this.publish(e),this.callNewPage({name:"DropshinpperList",params:{id:e}})}finally{this.publishLoading=!1}},async publish(t){const e=await Object(a["l"])({customProductId:t});return e.data.customProductPublishId},async getPublishStatus(t){return new Promise((e,i)=>{const s=async()=>{const{data:{status:o}}=await Object(a["n"])({customProductPublishId:t});return 2===o?(clearInterval(this.setIntervalTag),e()):3===o&&(this.$message.error("publish failure"),clearInterval(this.setIntervalTag),i(new Error)),s};s(),this.setIntervalTag=setInterval(s,3e3)})}}},g=p,h=(i("07b6"),i("2877")),m=Object(h["a"])(g,s,o,!1,null,"389d650e",null);e["default"]=m.exports},"84c1":function(t,e,i){"use strict";i("b490")},9486:function(t,e,i){t.exports=i.p+"static/img/eyes-icon.96da6581.svg"},9791:function(t,e,i){"use strict";i("0e0d")},a3c1:function(t,e){t.exports="data:image/webp;base64,UklGRl4FAABXRUJQVlA4WAoAAAAQAAAAdwAAdwAAQUxQSKwDAAABoC0AjNo4UqDOOoylpdibOOu6Y8ejP2iPmZmZmZmZ6ZvwC5iZma80ydqS5p4jAoIbSYqkiM7l7d49aPwB0Fusdrd5QRipROtERWHgbetWiyDchYGvMKPKHyxIpdjzE8xp7PeK8mgOUyQxHTZl/VoXYyRULS5IwR1qJFYPRdyojzQyqNdq3FTWkM21Cuu/zmKKjKaLRTa6CplVHR42BSjAoMzRUSQowrhJzqJGIepFWsoTFOSE8lWVCEUZOXQdY4zCVC5VzzhFcSZ1ElopCjRtUdzeH5El/013ikKdujlxYhRrnK+dcoSCjcp5CFC0QZ5OGYW7mH0I0tLRzawDboLiTTZlojAzBtn3mj5a4SBLW4kdJBmaWkVLXNmQmrYFXduIdbTG9Y26DLTI5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4ugAAAAA="},afad:function(t,e,i){"use strict";var s=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"upgrade-box"},[s("div",{staticClass:"row"},[s("div",{staticClass:"default-shipping"},[t._v("default shipping")]),s("div",{staticClass:"shipping-detail",attrs:{slot:"reference"},on:{click:t.showShippingRateInfoClick},slot:"reference"},[t._v("Shipping Price Details")])]),s("ShippingRates",{directives:[{name:"show",rawName:"v-show",value:t.showShippingRateInfo,expression:"showShippingRateInfo"}],staticStyle:{"margin-bottom":"40px"},attrs:{"detail-info":t.detail}}),s("div",{staticClass:"row"},[s("el-checkbox-group",{attrs:{size:"large"},model:{value:t.shippingMethod,callback:function(e){t.shippingMethod=e},expression:"shippingMethod"}},[s("el-checkbox",{staticClass:"checkbox",attrs:{label:1},on:{change:function(e){return t.shippingChange(1)}}},[t._v("Standard logistics")]),s("el-checkbox",{staticClass:"checkbox",attrs:{label:2},on:{change:function(e){return t.shippingChange(2)}}},[t._v("Fast shipping")])],1)],1),t.category2List&&t.category2List.length>0?s("div",{staticClass:"order-fitting-row"},[s("div",{staticClass:"box"},[s("el-collapse",{attrs:{value:t.openCollapseList}},t._l(t.category2List,(function(e){return s("el-collapse-item",{key:e.key,attrs:{name:e.key}},[s("template",{slot:"title"},[s("div",{staticClass:"collapse-header"},[s("div",{staticClass:"collapse-header-left"},[s("span",[t._v(t._s(e.label))])]),s("div",{staticClass:"collapse-header-right"},[s("span",{staticClass:"text"},[t._v(" "+t._s(e.radioKey?"checked":"unchecked")+" ")])])])]),s("div",{staticClass:"collapse-item-box"},[s("el-radio-group",{staticStyle:{width:"100%"},model:{value:e.radioKey,callback:function(i){t.$set(e,"radioKey",i)},expression:"category.radioKey"}},t._l(t.orderListMap.get(e.key),(function(e){return s("div",{key:e.radioKey,staticClass:"item",on:{click:function(i){return i.stopPropagation(),i.preventDefault(),t.orderRadioClick(e)}}},[s("el-radio",{staticClass:"radio-box",attrs:{label:e.radioKey}},[s("img",{staticClass:"item-image",attrs:{alt:e.title,src:e.mainImageUrl},on:{click:function(i){return i.preventDefault(),i.stopPropagation(),t.showImgList([e.mainImageUrl])}}}),s("div",{staticClass:"item-content"},[s("div",[t._v(t._s(e.title))]),1===e.stockingStrategy?s("div",[t._v(" ("+t._s(e.price?"US$ "+e.price:"free")+") ")]):t._e()]),2===e.stockingStrategy?s("div",{staticClass:"inventory",on:{click:function(t){t.stopPropagation(),t.preventDefault()}}},[s("span",[t._v("Your inventory "+t._s(e.inventory?e.inventory:0)+" pic")]),!e.inventory||e.inventory=2&&1===t.currentFittingsLevel?s("div",{staticClass:"upgrade-tip-top-box"},[s("div",{staticClass:"upgrade-tip-top"},[s("div",{staticStyle:{"align-items":"baseline"}},[s("img",{staticClass:"upgrade-tip-icon",attrs:{src:i("522c"),alt:"tip"}})]),s("div",{staticClass:"upgrade-tip-text"},[t._v("This jewelry box needs to subscribe to the premium service, you can get more advanced jewelry packaging at a lower price than the market, so as to better serve your customers, which will be more beneficial to promote your brand")])])]):t._e(),s("div",{staticClass:"upgrade-img-box"},[s("img",{staticClass:"upgrade-img-icon div-hover last",attrs:{src:i("a3c1")},on:{click:function(e){return t.moveFn("last")}}}),s("my-img",{staticClass:"upgrade-img",attrs:{src:t.showImg}}),s("img",{staticClass:"upgrade-img-icon div-hover next",attrs:{src:i("a8ad")},on:{click:function(e){return t.moveFn("next")}}})],1),t.fittingsLevel>=2&&1===t.currentFittingsLevel?s("div",{staticClass:"upgrade-btns"},[s("el-button",{on:{click:t.toSubcriptionDetail}},[t._v("Details")]),s("el-button",{attrs:{type:"primary"},on:{click:t.toSubcription}},[t._v("Subscription")])],1):t._e(),s("subscription-action",{ref:"SubscriptionAction"})],1)},d=[],u=i("7f5a"),p={name:"StoreDetailsDialog",components:{SubscriptionAction:u["a"]},props:{value:{type:Boolean,default:!1},imageUrls:{type:Array,default:()=>[]},fittingsLevel:{type:Number,default:null}},data(){return{dialogVisible:!1,imgIndex:0}},computed:{showImg(){var t;return(null===(t=this.imageUrls)||void 0===t?void 0:t[this.imgIndex])||""},...Object(l["b"])("user",{currentFittingsLevel:"getFittingsLevel"})},watch:{value(t){this.dialogVisible=t},dialogVisible(t){this.$emit("input",t)}},methods:{moveFn(t){"next"===t?this.imgIndex[]},greetingCards:{type:Array,default:()=>[]},fittingsIdList:{type:Array,default:()=>[]},fittingsId:{type:Number,default:null},blankProductIdList:{type:Array,default:()=>[]},customProductId:{type:Number,default:null},blankGreetingCardId:{type:Number,default:null},defaultLogisticsType:{type:Number,default:1},blankFittingsLevel:{type:Number,default:null},hiddenInStore:{type:Boolean,default:!1},collectionId:{type:String,default:""},showStoreInfo:{type:Boolean,default:!0},showBlankGreetingCard:{type:Boolean,default:!0},showPackage:{type:Boolean,default:!0}},data(){return{road:!0,showShippingRateInfo:!1,detail:{},orderListMap:new Map,category2:y["a"],openCollapseList:[],category2List:[],customCollectionList:[],fittingsImgDialog:{show:!1,logoUrl:null,fittings:null},showStoreDetailsDialog:!1,storeDetailsDialog:{show:!1,imageUrls:[],fittingsLevel:null},showImgListTag:!1,currentImgList:[],orderSelectedFittingIds:[],itemSelectedFittingIds:[],skuCategory2List:[],skuListMap:new Map,shippingMethod:[this.defaultLogisticsType]}},computed:{...Object(l["b"])("user",{currentShop:"getCurrentShop",fittingsLevel:"getFittingsLevel",fittingsLogoUrl:"getFittingsLogoUrl"})},watch:{blankProductIdList:{async handler(){this.road&&(await this.getBindFittingsList(),await this.getProductDetail())},deep:!0,immediate:!0},category2List:{handler(t){const e=[];t.forEach(t=>{t.object&&e.push(t.object.customProductId?t.object.customProductId:t.object.blankProductId)}),this.orderSelectedFittingIds=e},deep:!0,immediate:!0},skuCategory2List:{handler(t){const e=[];t.forEach(t=>{t.object&&e.push(t.object.customProductId?t.object.customProductId:t.object.blankProductId)}),this.itemSelectedFittingIds=e},deep:!0,immediate:!0},orderSelectedFittingIds:{handler(t){this.$emit("update:fittingsIdList",this.itemSelectedFittingIds.concat(t))},deep:!0,immediate:!0},itemSelectedFittingIds:{handler(t){this.$emit("update:fittingsIdList",this.orderSelectedFittingIds.concat(t))},deep:!0,immediate:!0}},mounted(){this.shippingChange(this.defaultLogisticsType),this.getCustomCollectionList()},methods:{toCustomAccessories(){this.callNewPage("/CustomAccessories")},showImgList(t){t&&t.length>0&&(this.currentImgList=t,this.showImgListTag=!0)},toReplenishInventory(t){localStorage.setItem("toReplenishInventoryObject",JSON.stringify(t)),this.callNewPage("/MyCustomAccessories/")},showShippingRateInfoClick(){this.showShippingRateInfo=!this.showShippingRateInfo},async getProductDetail(){if(!this.blankProductIdList||0===this.blankProductIdList.length)return;const t=this.blankProductIdList[0],e=await Object(n["a"])({handle:t,shippingRateInfos:!0});this.detail=e.data,this.road=!1},async getBindFittingsList(){if(!this.blankProductIdList||0===this.blankProductIdList.length)return;console.log("blankProductIdList: ",this.blankProductIdList);const t=[];this.blankProductIdList.forEach(e=>{const i={blankProductId:e};this.customProductId&&(i.customProductId=this.customProductId),t.push(i)});const e=await Object(r["g"])({records:t});let i=[];const s=e.data.orderLevelItemList,o=e.data.skuLevelItemList[0].fittingsList;i=o.concat(s),this.road=!1,this.orderListMap=new Map;const a=new Map;for(let n=0;n{const e=t[1];return this.openCollapseList.push(e.key),e})},orderRadioClick(t){if(2===t.stockingStrategy&&t.inventorye.id===t)[0],i=e.level;if(i>this.fittingsLevel)return this.showStoreDetailsDialogFn(e.showImageUrls,e.level),this.$emit("update:blankFittingsLevel",this.levelFittings[0].level),void this.$emit("update:fittingsId",this.levelFittings[0].id);this.$emit("update:blankFittingsLevel",i)}else this.$emit("update:blankFittingsLevel",null)},onBlankGreetingCardChange(t){if(t)if(1===this.fittingsLevel){const e=this.greetingCards.filter(e=>e.id===t)[0];this.showStoreDetailsDialogFn(e.showImageUrls,2),this.$emit("update:blankGreetingCardId",null)}else this.$emit("update:blankGreetingCardId",t);else this.$emit("update:blankGreetingCardId",null)},onCollectionIdChange(t){this.$emit("update:collectionId",t)},onHiddenInStoreChange(t){this.$emit("update:hiddenInStore",t)}}},C=k,w=(i("9791"),Object(h["a"])(C,s,o,!1,null,"32c1d3ca",null));e["a"]=w.exports},b490:function(t,e,i){},b5a3:function(t,e,i){"use strict";i("0782")},b787:function(t,e,i){},cd9e:function(t,e,i){"use strict";var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"description-box"},[i("div",{staticClass:"description-title"},[t._v("Product Description")]),i("el-form-item",{staticStyle:{"margin-top":"24px"},attrs:{label:"product title",prop:"title"}},[i("el-input",{model:{value:t.customProductInfo.title,callback:function(e){t.$set(t.customProductInfo,"title",e)},expression:"customProductInfo.title"}})],1),i("el-form-item",{attrs:{label:"description",prop:"description"}},[t.currentShop.shopType===t.enums.shopTypeEnum.ETSY.value?i("el-input",{attrs:{autosize:{minRows:2,maxRows:8},type:"textarea"},model:{value:t.customProductInfo.description,callback:function(e){t.$set(t.customProductInfo,"description",e)},expression:"customProductInfo.description"}}):i("Wangeditor",{model:{value:t.customProductInfo.description,callback:function(e){t.$set(t.customProductInfo,"description",e)},expression:"customProductInfo.description"}})],1),i("div",{staticClass:"description-title"},[t._v("Tags")]),i("el-input",{staticClass:"tag-input",attrs:{placeholder:"Add tag"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.addTag.apply(null,arguments)}},model:{value:t.tempDescriptionForm.tag,callback:function(e){t.$set(t.tempDescriptionForm,"tag",e)},expression:"tempDescriptionForm.tag"}}),i("div",{staticClass:"tag-box"},t._l(t.customProductInfo.tags,(function(e,s){return i("div",{key:s,staticClass:"tag-item"},[i("div",[t._v(t._s(e))]),i("i",{staticClass:"el-icon-close del-tag div-hover",on:{click:function(e){return t.delTag(s)}}})])})),0),t.showStoreInfo?i("div",{staticClass:"store-info"},[i("div",{staticClass:"store-title"},[t._v("Shopify Categories")]),i("div",{staticClass:"store-sub-title"},[t._v("Select One Or Multiple Categories To Publish Your Product")]),i("el-select",{staticClass:"customCollection-list",attrs:{value:t.collectionId,placeholder:"",clearable:""},on:{change:t.onCollectionIdChange}},t._l(t.customCollectionList,(function(t){return i("el-option",{key:t.id,attrs:{label:t.title,value:t.id}})})),1)],1):t._e()],1)},o=[],a=i("448e"),n=i("e661"),r=i("2f62"),l=i("2f69"),c={name:"Description",components:{Wangeditor:a["a"]},props:{customProductInfo:{type:Object,default:()=>({})},collectionId:{type:String,default:""},showStoreInfo:{type:Boolean,default:!0}},data(){return{customCollectionList:[],tempDescriptionForm:{tag:""},enums:{shopTypeEnum:n["a"]}}},computed:{...Object(r["b"])("user",{currentShop:"getCurrentShop"})},watch:{customProductInfo:{handler(t){this.$emit("change",t)},deep:!0}},mounted(){this.getCustomCollectionList()},methods:{async getCustomCollectionList(){if(!this.showStoreInfo)return;const t=await Object(l["b"])();this.customCollectionList=t.data.items},onCollectionIdChange(t){this.$emit("update:collectionId",t)},addTag(){const t=this.tempDescriptionForm.tag;this.customProductInfo.tags.push(t),this.tempDescriptionForm.tag=""},delTag(t){this.customProductInfo.tags.splice(t,1)}}},d=c,u=(i("4bdd"),i("2877")),p=Object(u["a"])(d,s,o,!1,null,"4d7d6b60",null);e["a"]=p.exports},d4afd:function(t,e,i){},e8fe:function(t,e,i){},ee78:function(t,e,i){t.exports=i.p+"static/img/mock-up-invisible-icon.36fe3961.svg"}}]);