(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-49d3bd88"],{"1a76":function(t,i,e){"use strict";e("5fe1")},3420:function(t,i,e){"use strict";e("67f7")},"34ec":function(t,i,e){"use strict";e("570a")},"4f85":function(t,i,e){"use strict";var s=function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("div",[e("el-tag",{staticClass:"product-tag",staticStyle:{color:"black"},attrs:{color:t.isSelectNew?"gray":"white"},on:{click:t.newLabelClick}},[t._v("New")]),t._l(t.labels,(function(i,s){return e("el-tag",{key:i.name+s,staticClass:"product-tag",style:{color:"black"},attrs:{color:i.checked?"gray":"white"},on:{click:function(i){return t.onLabelClick(s)}}},[t._v(t._s(i.name))])}))],2)},o=[],r=e("6d68"),n={name:"ProductTagsSelector",data(){return{labels:[],isSelectNew:!1}},mounted(){this.getLabels()},methods:{async getLabels(){const t=await Object(r["b"])();if(this.labels=t.data.records,this.labels&&this.labels.length)for(const i of this.labels)i.checked=!1},onLabelClick(t){var i=Object.assign({},this.labels[t]);i.checked=!i.checked,this.$set(this.labels,t,i),this.emitChange()},newLabelClick(){this.isSelectNew=!this.isSelectNew,this.emitChange()},emitChange(){var t={};if(t.isSelectNew=this.isSelectNew,t.labelIds=[],this.labels&&this.labels.length)for(const i of this.labels)i.checked&&t.labelIds.push(i.id);this.$emit("change",t)}}},a=n,l=(e("34ec"),e("2877")),c=Object(l["a"])(a,s,o,!1,null,"3672090d",null);i["a"]=c.exports},"570a":function(t,i,e){},"5fe1":function(t,i,e){},"60fc":function(t,i){t.exports="data:image/webp;base64,UklGRqoAAABXRUJQVlA4WAoAAAAQAAAAHwAABQAAQUxQSF8AAAABcBUAoBnNVgRGWiMjxGIwjs94n4dZDSJCbds2DDWlXIK5l0+sQfOkCIBIguZp8efiYmE3VnBzeTcWz3FFNxaCSWfMyN0secboJuCwx3ygDgyY23xiff2Fg+bp8acxMQBWUDggJAAAALACAJ0BKiAABgA+bSyRRaQioZgEAEAGxLSAAD2QAAD++5zAAA=="},"67f7":function(t,i,e){},"6d68":function(t,i,e){"use strict";e.d(i,"c",(function(){return o})),e.d(i,"d",(function(){return r})),e.d(i,"a",(function(){return n})),e.d(i,"b",(function(){return a}));var s=e("66a5");const o=t=>Object(s["a"])({url:"/shopapi/blankProduct/page",method:"post",data:t}),r=t=>Object(s["a"])({url:"/shopapi/blankProduct/type/list",method:"post",data:t}),n=t=>Object(s["a"])({url:"/shopapi/blankProduct/detail",method:"post",data:t}),a=t=>Object(s["a"])({url:"/shopapi/blankProduct/label/list",method:"post",data:t})},"7a97":function(t,i,e){t.exports=e.p+"static/img/empty.74e11ed5.webp"},"8f76":function(t,i,e){"use strict";e.r(i);var s=function(){var t=this,i=t.$createElement,s=t._self._c||i;return s("div",{staticClass:"dropshinpper-box default-main",attrs:{id:"dropshinpper-box"}},[t.dropshinpperList.length?[s("el-row",{staticClass:"table-title",attrs:{gutter:5}},[s("el-col",{attrs:{span:8}},[s("el-checkbox",{staticClass:"check-all",attrs:{size:"medium",indeterminate:t.selectAllIndeterminate},on:{change:t.onCheckAll}}),t.selectDropshippers.length?s("span",{staticClass:"check-text"},[t._v("Selected "+t._s(t.selectDropshippers.length)+" of "+t._s(t.dropshinpperList.length))]):s("span",{staticClass:"check-text"},[t._v("Select ALL")])],1),s("el-col",{staticClass:"global-buttons",attrs:{span:16}},[s("el-button",{staticStyle:{"margin-left":"8px"},attrs:{disabled:!t.configurationJewelryBoxBtnValid,type:"primary"},on:{click:t.toConfigurationJewelryBox}},[t._v("Configuration jewelry box")]),s("el-button",{directives:[{name:"loading",rawName:"v-loading",value:t.editListingsLoading,expression:"editListingsLoading"}],attrs:{disabled:!t.editListingsBtnValid},on:{click:t.toEditListings}},[t._v("Edit listings")])],1)],1),t._l(t.dropshinpperList,(function(i,o){return s("div",{key:i.id,staticClass:"dropshinpper-item"},[s("div",{staticClass:"check-container"},[s("el-checkbox",{staticClass:"check",on:{change:function(i){return t.onProductCheckChange(o)}},model:{value:t.dropshinpperList[o].checked,callback:function(i){t.$set(t.dropshinpperList[o],"checked",i)},expression:"dropshinpperList[index].checked"}})],1),s("my-img",{staticClass:"dropshinpper-item-left",attrs:{src:i.mainImageUrl}}),s("div",{staticClass:"dropshinpper-item-right"},[s("div",{staticClass:"dropshinpper-item-title"},[t._v(t._s(i.title))]),s("div",{staticClass:"dropshinpper-item-attr"},[t._v(t._s(i.optionInfo))]),s("div",{staticClass:"dropshinpper-item-tip",domProps:{innerHTML:t._s(i.blankContent)}})]),s("div",{staticClass:"dropshinpper-item-tool"},[i.status===t.enums.customProductStatusEnum.PUBLISHING.value?s("el-button",{staticClass:"dropshinpper-item-tool-item",attrs:{type:"info"}},[t._v(" Publishing ... ")]):i.status===t.enums.customProductStatusEnum.WAIT_PUBLISH.value?s("el-button",{staticClass:"dropshinpper-item-tool-item",attrs:{type:"warning"}},[t._v(" Wait For Publish ... ")]):i.status===t.enums.customProductStatusEnum.UNPUBLISHED.value?s("el-button",{staticClass:"dropshinpper-item-tool-item",attrs:{type:"primary"},on:{click:function(e){return t.release(i)}}},[t._v(" Publish ")]):i.status===t.enums.customProductStatusEnum.PUBLISH_FAIL.value?s("el-button",{staticClass:"dropshinpper-item-tool-item",attrs:{type:"primary"},on:{click:function(e){return t.release(i)}}},[t._v(" Publish Fail,Try again ")]):i.status!==t.enums.customProductStatusEnum.PUBLISHED.value||i.isHiddenInStore?i.status===t.enums.customProductStatusEnum.PUBLISHED.value&&i.isHiddenInStore?s("el-button",{staticClass:"dropshinpper-item-tool-item"},[t._v(" hidden ")]):t._e():s("el-button",{staticClass:"dropshinpper-item-tool-item",on:{click:function(e){return t.openStoreUrl(i)}}},[t._v(" See in Store ")]),s("el-button",{staticClass:"dropshinpper-item-tool-item",on:{click:function(e){return t.toEdit(i.blankProductId)}}},[t._v("Edit listing")]),s("div",{staticClass:"dropshinpper-item-tool-item",on:{click:function(i){return t.showToolFn(o)}}},[s("img",{staticClass:"div-hover",attrs:{src:e("60fc"),alt:"more"}}),s("div",{directives:[{name:"show",rawName:"v-show",value:t.showTool&&t.showToolIndex===o,expression:"showTool && showToolIndex === index"}],staticClass:"tool-marks"}),s("transition",{attrs:{name:"el-zoom-in-top"}},[s("div",{directives:[{name:"show",rawName:"v-show",value:t.showTool&&t.showToolIndex===o,expression:"showTool && showToolIndex === index"}],staticClass:"show-tool"},[i.status===t.enums.customProductStatusEnum.PUBLISHED.value?s("div",{staticClass:"show-tool-item div-hover",on:{click:function(e){i.isHiddenInStore?t.showOnShopify(i.id):t.hideOnShopify(i.id)}}},[t._v(" "+t._s(i.isHiddenInStore?"show on shopify":"Hide on Shopify")+" ")]):t._e(),s("div",{staticClass:"show-tool-item div-hover",on:{click:function(e){return t.deleteShopify(i.id)}}},[t._v("Delete")])])])],1)],1)],1)})),s("el-pagination",{staticClass:"pagination",attrs:{background:"",layout:"prev, pager, next, sizes","page-sizes":[10,20,30,40],total:t.query.total,"hide-on-single-page":""},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})]:[s("el-empty",{staticStyle:{margin:"0 auto"},attrs:{image:e("7a97"),"image-size":300,description:"No product yet"}})],s("batch-distribution",{ref:"BatchDistribution",attrs:{"load-blank-product-data":!1,show:t.batchDistributionDialog.show},on:{"update:show":function(i){return t.$set(t.batchDistributionDialog,"show",i)},success:t.onEditListingsSuccess}}),s("ConfigurationJewelryBox",{ref:"ConfigurationJewelryBox"})],2)},o=[],r=e("2f69"),n=e("f13c"),a=e.n(n);const l={PUBLISHING:{text:"发布中",value:99},WAIT_PUBLISH:{text:"等待发布中",value:97},PUBLISH_FAIL:{text:"发布失败",value:98},PUBLISHED:{text:"已发布",value:2},UNPUBLISHED:{text:"未发布",value:1}};var c=l,d=e("8f8f"),u=function(){var t=this,i=t.$createElement,e=t._self._c||i;return t.show?e("div",{ref:"bathcDistributionDialog",staticClass:"batch-distribution-dialog",attrs:{id:"batch-distribution-dialog"}},[e("el-card",{staticClass:"batch-distribution-dialog-card",attrs:{id:"batch-distribution-dialog-card",shadow:"always"}},[e("div",{staticClass:"batch-distribution-dialog-card-title",attrs:{id:"batch-distribution-dialog-title"}},[t._v("Configuration jewelry box")]),e("i",{staticClass:"el-icon-close close cursor-pointer",on:{click:function(i){return i.target!==i.currentTarget?null:t.hiddenDialog.apply(null,arguments)}}}),e("el-divider"),e("store-details",{attrs:{"fittings-id":t.dropshinpperForm.fittingsId,"blank-fittings-level":t.dropshinpperForm.blankFittingsLevel,"level-fittings":t.fittingses,"show-store-info":!1},on:{"update:fittingsId":function(i){return t.$set(t.dropshinpperForm,"fittingsId",i)},"update:fittings-id":function(i){return t.$set(t.dropshinpperForm,"fittingsId",i)},"update:blankFittingsLevel":function(i){return t.$set(t.dropshinpperForm,"blankFittingsLevel",i)},"update:blank-fittings-level":function(i){return t.$set(t.dropshinpperForm,"blankFittingsLevel",i)}}}),e("div",{staticClass:"dropshinpper-button"},[e("el-button",{attrs:{disabled:t.doing},on:{click:t.hiddenDialog}},[t._v("Cancel")]),e("el-button",{directives:[{name:"loading",rawName:"v-loading",value:t.doing,expression:"doing"}],attrs:{disabled:t.doing,type:"primary"},on:{click:t.toSave}},[t._v("Save")])],1)],1)],1):t._e()},p=[],h=e("afad"),f=e("b0dc"),m={name:"ConfigurationJewelryBox",components:{StoreDetails:h["a"]},data(){return{show:!1,customProductIds:[],fittingses:[],dropshinpperForm:{hiddenInStore:!1,blankFittingsLevel:1,collectionId:"",fittingsId:null},dropshinpperRules:{hiddenInStore:[{required:!0,message:"The HiddenInStore field is required",trigger:"blur"}],blankFittingsLevel:[{required:!0,message:"The BlankFittingsLevel field is required",trigger:"blur"}]},doing:!1}},mounted(){this.loadBlankFittings()},methods:{init({customProductIds:t}){this.customProductIds=t,this.show=!0},hiddenDialog(){this.$refs.bathcDistributionDialog.className+=" hidden-dialog",setTimeout(()=>{this.show=!1},500)},loadBlankFittings(){Object(f["a"])({fittingAll:!0}).then(t=>{if(200===t.code){var i=t.data.records||[];this.fittingses=i,this.fittingses&&this.fittingses.length&&(this.dropshinpperForm.fittingsId=this.fittingses[0].id)}})},toSave(){this.doing=!0;var t={};t.customProductIds=this.customProductIds,t.fittingsLevel=this.dropshinpperForm.blankFittingsLevel,t.fittingsId=this.dropshinpperForm.fittingsId,Object(r["d"])(t).then(t=>{200===t.code&&(this.$message.success("Save success"),this.hiddenDialog(),this.$emit("save"))}).finally(()=>{this.doing=!1})}}},g=m,b=(e("1a76"),e("2877")),v=Object(b["a"])(g,u,p,!1,null,"4ead1f3f",null),D=v.exports,k={name:"DropshinpperList",components:{BatchDistribution:d["a"],ConfigurationJewelryBox:D},data(){return{query:{total:0,current:1,size:10,keyword:"",status:"",isHiddenInStore:""},dropshinpperList:[],enums:{customProductStatusEnum:c},showTool:!1,showToolIndex:0,publishStatusInterval:!1,selectAll:!1,selectAllIndeterminate:!1,batchDistributionDialog:{show:!1},editListingsLoading:!1}},computed:{selectDropshippers(){var t=[];if(this.dropshinpperList&&this.dropshinpperList.length)for(const i of this.dropshinpperList)i.checked&&t.push(i);return t},batchPublishBtnValid(){return this.selectDropshippers.length},editListingsBtnValid(){return this.selectDropshippers.length},configurationJewelryBoxBtnValid(){return this.selectDropshippers.length}},async created(){await this.getList()},methods:{async startPublishStatusInternal(){if(this.dropshinpperList&&this.dropshinpperList.length){var t=[];for(const i of this.dropshinpperList)i.publishId&&t.push(i.publishId);t.length>0&&await this.getPublishStatuses(t)}},async getPublishStatuses(t){var i={};i.customProductPublishIds=t;var e=await Object(r["k"])(i);if(e.data.records&&e.data.records.length){var s=!1;for(const t of e.data.records)3===t.status&&(this.$message.error("publish failure"),s=!0),2===t.status&&(s=!0);s?this.getList(!1):setTimeout(this.startPublishStatusInternal,1e3)}},reloadList(){this.query.current=1,this.getList()},async getList(t=!0){const i=await Object(r["h"])(this.query);var e=i.data.records||[];for(const s of e)s.checked=!1;this.dropshinpperList=e,this.selectAll=!1,this.selectAllIndeterminate=!1,this.query.total=i.data.total,t&&a.a.scrollTo("#dropshinpper-box",500,{offset:-120,easing:"ease-in-out"}),setTimeout(this.startPublishStatusInternal,1e3)},showToolFn(t){this.showToolIndex=t,this.showTool=!this.showTool},hideOnShopify(t){const i=this.$loading();this.$confirm("Are you sure you want to hide on shopify?","tip",{confirmButtonText:"Yes",cancelButtonText:"Cancel",type:"warning"}).then(async()=>{await Object(r["e"])(t),i.close(),this.getList(),this.$message({type:"success",message:"success!"})}).catch(()=>{i.close(),this.$message({type:"info",message:"cancel"})})},showOnShopify(t){const i=this.$loading();this.$confirm("Are you sure you want to show on shopify?","tip",{confirmButtonText:"Yes",cancelButtonText:"Cancel",type:"warning"}).then(async()=>{await Object(r["n"])(t),this.getList(),i.close(),this.$message({type:"success",message:"success!"})}).catch(()=>{i.close(),this.$message({type:"info",message:"cancel"})})},deleteShopify(t){this.$confirm("Are you sure you want to delete on shopify?","tip",{confirmButtonText:"Yes",cancelButtonText:"Cancel",type:"warning"}).then(async()=>{await Object(r["m"])(t),this.getList(),this.$message({type:"success",message:"success!"})}).catch(()=>{this.$message({type:"info",message:"cancel"})})},toEdit(t){this.callNewPage("/Dropshinpper/"+t)},async release(t){await this.publish(t.id),this.getList(!1)},openStoreUrl(t){window.open(t.productStoreUrl)},async publish(t){const i=await Object(r["i"])({customProductId:t});return i.data.customProductPublishId},handleSizeChange(t){this.query.size=t,this.getList()},handleCurrentChange(t){this.query.current=t,this.getList()},onCheckAll(t){if(t)for(const i of this.dropshinpperList)i.checked=!0;else for(const i of this.dropshinpperList)i.checked=!1;this.selectAllIndeterminate=!1,this.dropshinpperList.splice()},onProductCheckChange(){this.dropshinpperList.splice();let t=0;for(const i of this.dropshinpperList)i.checked&&(t+=1);this.selectAll=t>0&&t===this.dropshinpperList.length,this.selectAllIndeterminate=t>0&&t{t&&this.$emit("save",this.dropshinpperForm)})}}},D=v,k=(e("9b98"),e("2877")),P=Object(k["a"])(D,h,f,!1,null,"fb70e02e",null),w=P.exports,I=function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("div",{staticClass:"dropshinpper-detail"},[e("el-form",{ref:"dropshinpperForm",attrs:{model:t.dropshinpperForm,rules:t.dropshinpperRules,"label-width":"100px","label-position":"top"}},[e("div",{staticClass:"dropshinpper-card"},[e("div",{staticClass:"dropshinpper-card-title"},[t._v("Store details")]),e("StoreDetails",{attrs:{"fittings-id":t.dropshinpperForm.fittingsId,"blank-fittings-level":t.dropshinpperForm.blankFittingsLevel,"collection-id":t.dropshinpperForm.collectionId,"hidden-in-store":t.dropshinpperForm.hiddenInStore,"level-fittings":t.fittingses},on:{"update:fittingsId":function(i){return t.$set(t.dropshinpperForm,"fittingsId",i)},"update:fittings-id":function(i){return t.$set(t.dropshinpperForm,"fittingsId",i)},"update:blankFittingsLevel":function(i){return t.$set(t.dropshinpperForm,"blankFittingsLevel",i)},"update:blank-fittings-level":function(i){return t.$set(t.dropshinpperForm,"blankFittingsLevel",i)},"update:collectionId":function(i){return t.$set(t.dropshinpperForm,"collectionId",i)},"update:collection-id":function(i){return t.$set(t.dropshinpperForm,"collectionId",i)},"update:hiddenInStore":function(i){return t.$set(t.dropshinpperForm,"hiddenInStore",i)},"update:hidden-in-store":function(i){return t.$set(t.dropshinpperForm,"hiddenInStore",i)}}})],1),e("div",{staticClass:"dropshinpper-button"},[e("el-button",{attrs:{disabled:t.doing},on:{click:t.toBack}},[t._v("Previous")]),e("el-button",{directives:[{name:"loading",rawName:"v-loading",value:t.doing,expression:"doing"}],attrs:{disabled:t.doing,type:"primary"},on:{click:t.toSave}},[t._v("Bulk distribution")])],1)])],1)},C=[],S=e("afad"),L=e("b0dc"),y={name:"StoreDetail",components:{StoreDetails:S["a"]},data(){return{fittingses:[],dropshinpperForm:{hiddenInStore:!1,blankFittingsLevel:1,collectionId:"",fittingsId:null},dropshinpperRules:{hiddenInStore:[{required:!0,message:"The HiddenInStore field is required",trigger:"blur"}],blankFittingsLevel:[{required:!0,message:"The BlankFittingsLevel field is required",trigger:"blur"}]},doing:!1}},mounted(){this.loadBlankFittings()},methods:{loadBlankFittings(){Object(L["a"])({fittingAll:!0}).then(t=>{if(200===t.code){var i=t.data.records||[];this.fittingses=i,this.fittingses&&this.fittingses.length&&(this.dropshinpperForm.fittingsId=this.fittingses[0].id)}})},toBack(){this.$emit("back")},toSave(){this.$refs.dropshinpperForm.validate(t=>{t&&(this.$emit("save",{blankFittingsLevel:this.dropshinpperForm.blankFittingsLevel,fittingsId:this.dropshinpperForm.fittingsId,collectionId:this.dropshinpperForm.collectionId,hiddenInStore:this.dropshinpperForm.hiddenInStore}),this.doing=!0)})}}},A=y,F=(e("cdeb"),Object(k["a"])(A,I,C,!1,null,"38284c62",null)),x=F.exports,_={name:"BatchDistributionDialog",components:{ProductTagsSelector:a["a"],MInputNumber:p["a"],DropshipDetail:w,StoreDetail:x},filters:{profileFilter(t){if(null==t.bulkDistributionDefaultPriceRate||null==t.bulkDistributionDefaultPriceAdd){if(t.dropShippingForm){let i=-1/0,e=1/0;for(const s of t.dropShippingForm.variantList){const t=Number(s.retailPrice)-Number(s.costs);t>i&&(i=t),ts&&(s=t.costs),t.costs{this.$emit("update:show",!1)},500)},handleCurrentChange(t){this.page.current=t,this.getProducts()},async getProducts(){if(!this.loadBlankProductData)return;this.productLoading=!0;var t={isDropshipped:!1};t.isNew=this.isSelectNew,t.labelIds=this.selectLabelIds,t.current=this.page.current,t.size=this.page.size;const i=await Object(r["c"])(t);this.productLoading=!1,this.page.total=i.data.total,this.productList=[];for(const e of i.data.records)e.checked=!1,e.bulkDistributionDefaultPriceRate=100*this.userInfo.bulkDistributionDefaultPriceRate,e.bulkDistributionDefaultPriceAdd=this.userInfo.bulkDistributionDefaultPriceAdd,e.bulkDistributionCompareAtPriceRate=100*this.userInfo.bulkDistributionCompareAtPriceRate,this.productList.push(e);this.scrollToTop()},scrollToTop(){d.a.scrollTo("#batch-distribution-dialog-title",500,{offset:-120,easing:"ease-in-out",container:"#batch-distribution-dialog-card"})},reloadProducts(){this.page.current=1,this.getProducts()},onSelectLabelChange({isSelectNew:t,labelIds:i}){this.isSelectNew=t,this.selectLabelIds=i,this.reloadProducts()},onCheckAll(t){if(t)for(const i of this.productList)i.checked=!0;else for(const i of this.productList)i.checked=!1;this.selectAllIndeterminate=!1,this.productList.splice()},onProductCheckChange(){this.productList.splice();let t=0;for(const i of this.productList)i.checked&&(t+=1);this.selectAll=t>0&&t===this.productList.length,this.selectAllIndeterminate=t>0&&t{const i=Number(t.retailPrice)-Number(t.costs),e=Number(t.profit)/Number(t.costs)*100;t.profit=i,t.profitMargin=e})),t},async toEditMore(t){var i=this.productList[t];await this.loadProductDetail(i),null!=i.bulkDistributionDefaultPriceRate&&null!=i.bulkDistributionDefaultPriceAdd&&i.dropShippingForm.variantList.forEach(t=>{const e=t.costs*i.bulkDistributionDefaultPriceRate/100+i.bulkDistributionDefaultPriceAdd,s=Number(t.profit)/Number(t.costs)*100;t.retailPrice=Object(u["d"])(t.costs+e),t.profit=e,t.profitMargin=s}),null!=i.bulkDistributionCompareAtPriceRate&&i.dropShippingForm.variantList.forEach(t=>{t.compareAtPrice=t.costs*i.bulkDistributionCompareAtPriceRate/100,t.compareAtPrice=Object(u["d"])(t.compareAtPrice)}),this.$refs.dropshipDetail.init({detail:i.dropShippingDetailInfo,form:i.dropShippingForm}),this.dropShippingDetailForm.productInfoIndex=t,this.dropShippingDetailForm.productInfo=i,this.showComponent=this.showComponentEnum.DROPSHIP_DETAIL,this.scrollToTop()},onDropshipDetailSave(t){console.log("on dropship detail save",t),this.productList[this.dropShippingDetailForm.productInfoIndex].dropShippingForm=t,this.productList[this.dropShippingDetailForm.productInfoIndex].custom=!0,this.productList[this.dropShippingDetailForm.productInfoIndex].bulkDistributionDefaultPriceRate=void 0,this.productList[this.dropShippingDetailForm.productInfoIndex].bulkDistributionDefaultPriceAdd=void 0,this.productList[this.dropShippingDetailForm.productInfoIndex].bulkDistributionCompareAtPriceRate=void 0,this.showComponent=this.showComponentEnum.MAIN,this.scrollToTop()},onDropshipDetailBack(){this.showComponent=this.showComponentEnum.MAIN,this.scrollToTop()},async toContinue(){this.showComponent=this.showComponentEnum.STORE_DETAIL},async onStoreDetailSave({blankFittingsLevel:t,collectionId:i,fittingsId:e,hiddenInStore:s}){var o={},r=[];o.records=r;for(const n of this.selectProducts){var a={};a.blankProductId=n.id,n.dropShippingForm&&(a.mainImageUrl=n.dropShippingForm.mainImageUrl,a.title=n.dropShippingForm.title,a.description=n.dropShippingForm.description,a.isAddMertic=n.dropShippingForm.isAddMertic,a.tags=n.dropShippingForm.tags,a.variantList=n.dropShippingForm.variantList),a.hiddenInStore=s,a.blankFittingsLevel=t,a.fittingsId=e,a.collectionId=i,a.bulkDistributionDefaultPriceRate=n.bulkDistributionDefaultPriceRate,a.bulkDistributionDefaultPriceRate&&(a.bulkDistributionDefaultPriceRate=Object(u["d"])(a.bulkDistributionDefaultPriceRate/100)),a.bulkDistributionDefaultPriceAdd=n.bulkDistributionDefaultPriceAdd,a.bulkDistributionCompareAtPriceRate=n.bulkDistributionCompareAtPriceRate,a.bulkDistributionCompareAtPriceRate&&(a.bulkDistributionCompareAtPriceRate=Object(u["d"])(a.bulkDistributionCompareAtPriceRate/100)),r.push(a)}var l=await Object(n["g"])(o);200===l.code?(l=await Object(n["l"])({customProductIds:l.data}),200===l.code?this.$message.success("Bulk distribution success!"):this.$message.error(l.msg),console.log(this),this.$emit("success"),this.callNewPage("/DropshinpperList")):this.$message.error(l.msg)},onStoreDetailBack(){this.showComponent=this.showComponentEnum.MAIN,this.scrollToTop()},toEditProfit(){this.editProfitDialog.bulkDistributionDefaultPriceRate=void 0,this.editProfitDialog.bulkDistributionDefaultPriceAdd=void 0,this.editProfitDialog.show=!0},doEditProfit(){for(const t of this.selectProducts)t.custom||(t.bulkDistributionDefaultPriceRate=this.editProfitDialog.bulkDistributionDefaultPriceRate,t.bulkDistributionDefaultPriceAdd=this.editProfitDialog.bulkDistributionDefaultPriceAdd);this.editProfitDialog.show=!1},toEditComparePrice(){this.editComparePriceDialog.bulkDistributionCompareAtPriceRate=void 0,this.editComparePriceDialog.show=!0},doEditComparePrice(){for(const t of this.selectProducts)t.custom||(t.bulkDistributionCompareAtPriceRate=this.editComparePriceDialog.bulkDistributionCompareAtPriceRate);this.editComparePriceDialog.show=!1}}},T=_,$=(e("3420"),Object(k["a"])(T,s,o,!1,null,"24214a8a",null));i["a"]=$.exports},"9b98":function(t,i,e){"use strict";e("aaaa")},aaaa:function(t,i,e){},b0dc:function(t,i,e){"use strict";e.d(i,"a",(function(){return o}));var s=e("66a5");const o=t=>Object(s["a"])({url:"/shopapi/blankFittings/list",method:"post",data:t})},cae2:function(t,i,e){"use strict";e("fa79")},cdeb:function(t,i,e){"use strict";e("e3f1")},e3f1:function(t,i,e){},f13c:function(t,i,e){ /*! * vue-scrollto v2.20.0 * (c) 2019 Randjelovic Igor * @license MIT */ (function(i,e){t.exports=e()})(0,(function(){"use strict";function t(i){return t="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(i)}function i(){return i=Object.assign||function(t){for(var i=1;i0?e=l:i=l}while(Math.abs(a)>o&&++c=s?m(i,u,t,e):0===p?u:f(i,o,o+a,t,e)}return function(t){return 0===t?0:1===t?1:p(d(t),i,o)}},v={ease:[.25,.1,.25,1],linear:[0,0,1,1],"ease-in":[.42,0,1,1],"ease-out":[0,0,.58,1],"ease-in-out":[.42,0,.58,1]},D=!1;try{var k=Object.defineProperty({},"passive",{get:function(){D=!0}});window.addEventListener("test",null,k)}catch(E){}var P={$:function(t){return"string"!==typeof t?t:document.querySelector(t)},on:function(t,i,e){var s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{passive:!1};i instanceof Array||(i=[i]);for(var o=0;o2&&void 0!==arguments[2]?arguments[2]:{};if("object"===t(L)?y=L:"number"===typeof L&&(y.duration=L),i=P.$(m),!i)return console.warn("[vue-scrollto warn]: Trying to scroll to an element that is not on the page: "+m);if(e=P.$(y.container||I.container),s=y.hasOwnProperty("duration")?y.duration:I.duration,r=y.hasOwnProperty("lazy")?y.lazy:I.lazy,o=y.easing||I.easing,n=y.hasOwnProperty("offset")?y.offset:I.offset,a=y.hasOwnProperty("force")?!1!==y.force:I.force,l=y.hasOwnProperty("cancelable")?!1!==y.cancelable:I.cancelable,c=y.onStart||I.onStart,d=y.onDone||I.onDone,u=y.onCancel||I.onCancel,p=void 0===y.x?I.x:y.x,h=void 0===y.y?I.y:y.y,"function"===typeof n&&(n=n(i,e)),f=E(e),g=B(e),O(),S=!1,!a){var x="body"===e.tagName.toLowerCase()?document.documentElement.clientHeight||window.innerHeight:e.offsetHeight,_=g,T=_+x,j=D-n,N=j+i.offsetHeight;if(j>=_&&N<=T)return void(d&&d(i))}if(c&&c(i),C||k)return"string"===typeof o&&(o=v[o]||v["ease"]),F=b.apply(b,o),P.on(e,w,$,{passive:!0}),window.requestAnimationFrame(R),function(){A=null,S=!0};d&&d(i)}return U},L=S(),y=[];function A(t){for(var i=0;i