(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-31229720"],{"34ec":function(t,e,i){"use strict";i("570a")},"3ca6":function(t,e,i){},"4d66":function(t,e,i){"use strict";i("d243")},"4f85":function(t,e,i){"use strict";var o=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("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(e,o){return i("el-tag",{key:e.name+o,staticClass:"product-tag",style:{color:"black"},attrs:{color:e.checked?"gray":"white"},on:{click:function(e){return t.onLabelClick(o)}}},[t._v(t._s(e.name))])}))],2)},s=[],r=i("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 e of this.labels)e.checked=!1},onLabelClick(t){var e=Object.assign({},this.labels[t]);e.checked=!e.checked,this.$set(this.labels,t,e),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 e of this.labels)e.checked&&t.labelIds.push(e.id);this.$emit("change",t)}}},a=n,l=(i("34ec"),i("2877")),c=Object(l["a"])(a,o,s,!1,null,"3672090d",null);e["a"]=c.exports},"570a":function(t,e,i){},"5ec2":function(t,e,i){"use strict";i("3ca6")},"6d68":function(t,e,i){"use strict";i.d(e,"c",(function(){return s})),i.d(e,"d",(function(){return r})),i.d(e,"a",(function(){return n})),i.d(e,"b",(function(){return a}));var o=i("66a5");const s=t=>Object(o["a"])({url:"/shopapi/blankProduct/page",method:"post",data:t}),r=t=>Object(o["a"])({url:"/shopapi/blankProduct/type/list",method:"post",data:t}),n=t=>Object(o["a"])({url:"/shopapi/blankProduct/detail",method:"post",data:t}),a=t=>Object(o["a"])({url:"/shopapi/blankProduct/label/list",method:"post",data:t})},7848:function(t,e,i){"use strict";i("b763")},"8f03":function(t,e,i){"use strict";var o=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"product-list"},[t.title?i("div",{staticClass:"product-top"},[i("div",{staticClass:"product-title"},[t._v(t._s(t.title))])]):t._e(),i("div",{staticClass:"product-bottom"},[t.productList.length?t._l(t.productList,(function(e){return i("div",{key:e.id,staticClass:"product-item-box"},[i("div",{staticClass:"product-item"},[i("r-link",{attrs:{to:"/product/"+e.handle}},[i("ProductImg",{staticClass:"product-item-img",attrs:{"main-img":e.mainShowImageUrl,"hover-img":e.suspendImageUrl}}),i("div",{staticClass:"product-tag-box"},[t._l(e.labels,(function(e,o){return i("el-tag",{key:e.name+o,staticClass:"product-tag",style:{color:e.fontColor,border:e.fontColor},attrs:{color:e.bgColor}},[t._v(t._s(e.name))])})),e.isNew?i("el-tag",{staticClass:"product-tag",staticStyle:{border:"#4D7FAD",color:"#4D7FAD"},attrs:{color:"#DDEDF8"}},[t._v("New")]):t._e(),Number(e.productDiscount)>0?i("el-tag",{staticClass:"product-tag",staticStyle:{border:"#EC3E3E",color:"#EC3E3E"},attrs:{color:"#FFE1E1"}},[t._v("-"+t._s(100*e.productDiscount)+"%")]):t._e()],2),i("div",{staticClass:"product-item-info"},[i("div",{staticClass:"product-item-title surplus-hidden"},[t._v(t._s(e.fullName))]),i("div",{staticClass:"product-item-style"},[t._v(t._s(e.optionInfo))]),i("div",{staticClass:"product-item-msg",domProps:{innerHTML:t._s(e.blankContent)}}),i("div",{staticClass:"product-item-price"},[i("span",{staticClass:"product-item-price-num"},[t._v("$"+t._s(e.favorablePrice||e.price))])])])],1),i("div",{staticClass:"product-item-button"},[i("r-link",{staticStyle:{flex:"1"},attrs:{to:"/product/"+e.handle}},[i("el-button",{staticClass:"button-item"},[t._v("Get Sample")])],1),2!==t.currentShop.shopType?i("el-button",{staticClass:"button-item",staticStyle:{"margin-left":"5px"},attrs:{type:e.dropshiped?"":"primary",loading:e.dropshipedLoading},on:{click:function(i){i.stopPropagation(),e.dropshiped?t.dropshiperCancel(e):t.callNewPage("/Dropshinpper/"+e.id)}},nativeOn:{mouseenter:function(i){return t.showCancelFn(e,!0)},mouseleave:function(i){return t.showCancelFn(e,!1)}}},[e.dropshiped?i("span",[t._v(" "+t._s(e.showCancel?"Cancel":"Dropshiped ("+e.dropShipSkuNum+" sku)")+" ")]):i("span",[t._v("Dropship it ("+t._s(e.skuNum)+" sku)")])]):t._e()],1)],1)])})):[i("el-empty",{staticStyle:{margin:"0 auto"},attrs:{description:"No products"}})]],2)])},s=[],r=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("my-img",{staticStyle:{width:"100%",height:"100%",position:"absolute",top:"0",left:"0"},attrs:{"image-style":{width:"100%",height:"100%"},width:746,height:746,src:t.imgSrc,onerror:"this.src='"+i("e803")+"'"},on:{mouseenter:function(e){t.isHover=!0},mouseleave:function(e){t.isHover=!1}}})],1)},n=[],a={name:"ProductImg",props:{mainImg:{type:String,default:null},hoverImg:{type:String,default:null}},data(){return{isHover:!1}},computed:{imgSrc(){return this.isHover?this.hoverImg:this.mainImg}}},l=a,c=i("2877"),u=Object(c["a"])(l,r,n,!1,null,"7b926177",null),d=u.exports,p=i("2f69"),h=i("2f62"),f={name:"ProductList",components:{ProductImg:d},props:{title:{type:String,default:""},list:{type:Array,default:()=>[]}},data(){return{productList:[]}},computed:{...Object(h["b"])("user",{currentShop:"getCurrentShop"})},watch:{list:{handler(t){this.productList=t.map(t=>(t.isHover=!1,t.labels=t.labels||[],t))},immediate:!0,deep:!0}},methods:{showCancelFn(t,e){this.$set(t,"showCancel",e)},async dropshiperCancel(t){this.$set(t,"dropshipedLoading",!0),await Object(p["a"])(t.id),t.dropshiped=!1,this.$set(t,"dropshipedLoading",!1),this.$message.success("Cancel success")}}},m=f,b=(i("5ec2"),Object(c["a"])(m,o,s,!1,null,"0833fca8",null));e["a"]=b.exports},"8f8f":function(t,e,i){"use strict";var o=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.show?i("div",{ref:"bathcDistributionDialog",staticClass:"batch-distribution-dialog",attrs:{id:"batch-distribution-dialog"}},[i("el-card",{staticClass:"batch-distribution-dialog-card",attrs:{id:"batch-distribution-dialog-card",shadow:"always"}},[i("div",{staticClass:"batch-distribution-dialog-card-title",attrs:{id:"batch-distribution-dialog-title"}},[t._v("Bulk distribution")]),i("i",{staticClass:"el-icon-close close cursor-pointer",on:{click:function(e){return e.target!==e.currentTarget?null:t.hiddenDialog.apply(null,arguments)}}}),i("el-divider"),i("div",{directives:[{name:"show",rawName:"v-show",value:1===t.showComponent,expression:"showComponent === 1"}],staticClass:"batch-distribution-page"},[i("div",[t.loadBlankProductData?i("product-tags-selector",{on:{change:t.onSelectLabelChange}}):t._e(),i("el-row",{staticClass:"btn-row"},[i("el-button",{attrs:{disabled:!t.selectProducts.length},on:{click:t.toEditProfit}},[t._v("Edit profit")]),i("el-button",{attrs:{disabled:!t.selectProducts.length},on:{click:t.toEditComparePrice}},[t._v("Edit compare price")])],1),i("el-row",{staticClass:"table-title",attrs:{gutter:5}},[i("el-col",{attrs:{span:9}},[i("el-checkbox",{staticClass:"check",attrs:{size:"medium",indeterminate:t.selectAllIndeterminate},on:{change:t.onCheckAll}}),t.selectProducts.length?i("span",{staticClass:"check-text"},[t._v("Selected "+t._s(t.selectProducts.length))]):t._e(),i("span",[t._v("Undistributed product")])],1),i("el-col",{attrs:{span:8}},[i("span",[t._v("Profit margin")])]),i("el-col",{attrs:{span:3}},[i("span",[t._v("Profit")])]),i("el-col",{attrs:{span:4}},[i("span",[t._v("Compare price percentage")])])],1),t._l(t.productList,(function(e,o){return i("div",{key:e.id},[i("el-row",{staticClass:"product-item",attrs:{gutter:5}},[i("el-col",{attrs:{span:9}},[i("div",[i("el-checkbox",{staticClass:"check",on:{change:function(e){return t.onProductCheckChange(o)}},model:{value:t.productList[o].checked,callback:function(e){t.$set(t.productList[o],"checked",e)},expression:"productList[itemIndex].checked"}})],1),i("img",{staticClass:"product-item-image",attrs:{src:e.mainShowImageUrl||e.mainImageUrl}}),i("div",{staticClass:"product-item-name"},[i("div",{staticClass:"product-item-title"},[t._v(t._s(e.fullName||e.title))]),i("div",{staticClass:"product-item-title"},[t._v(t._s(e.minSkuPrice)+"-"+t._s(e.maxSkuPrice))]),i("div",{staticClass:"product-item-attr"},[t._v(t._s(e.optionInfo))])])]),i("el-col",{staticClass:"profile-margin",attrs:{span:8}},[i("el-row",[i("m-input-number",{staticClass:"input",attrs:{disabled:t.productList[o].custom,controls:!1,min:0,max:9999},model:{value:t.productList[o].bulkDistributionDefaultPriceRate,callback:function(e){t.$set(t.productList[o],"bulkDistributionDefaultPriceRate",t._n(e))},expression:"productList[itemIndex].bulkDistributionDefaultPriceRate"}},[i("span",{staticClass:"input-suffix",attrs:{slot:"suffix"},slot:"suffix"},[t._v("%")])]),i("span",{staticClass:"plus"},[t._v("+")]),i("m-input-number",{staticClass:"input",attrs:{disabled:t.productList[o].custom,controls:!1,min:0,max:9999},model:{value:t.productList[o].bulkDistributionDefaultPriceAdd,callback:function(e){t.$set(t.productList[o],"bulkDistributionDefaultPriceAdd",t._n(e))},expression:"productList[itemIndex].bulkDistributionDefaultPriceAdd"}},[i("span",{staticClass:"input-suffix",attrs:{slot:"suffix"},slot:"suffix"},[t._v("$")])])],1)],1),i("el-col",{staticClass:"profile",attrs:{span:3}},[i("span",[t._v(t._s(t._f("profileFilter")(t.productList[o])))])]),i("el-col",{staticClass:"compare-price-percentage",attrs:{span:4}},[i("el-row",[i("el-col",{attrs:{span:20}},[i("m-input-number",{attrs:{disabled:t.productList[o].custom,controls:!1,min:0,max:9999},model:{value:t.productList[o].bulkDistributionCompareAtPriceRate,callback:function(e){t.$set(t.productList[o],"bulkDistributionCompareAtPriceRate",e)},expression:"productList[itemIndex].bulkDistributionCompareAtPriceRate"}},[i("span",{attrs:{slot:"suffix"},slot:"suffix"},[t._v("%")])])],1),i("el-col",{attrs:{span:4}},[i("i",{staticClass:"el-icon-arrow-right more-btn",on:{click:function(e){return t.toEditMore(o)}}})])],1)],1),t.productList[o].custom?i("el-row",{staticStyle:{color:"red",float:"right"}},[t._v(" The value has been set in the distribution details ")]):t._e()],1)],1)})),t.productList.length?t._e():i("el-row",[i("el-empty")],1)],2),i("el-row",{staticClass:"bottom"},[i("el-button",{directives:[{name:"loading",rawName:"v-loading",value:t.continueLoading,expression:"continueLoading"}],staticClass:"continue-btn",attrs:{disabled:!t.selectProducts.length,type:"primary"},on:{click:t.toContinue}},[t._v("Continue")]),t.loadBlankProductData?i("el-pagination",{staticClass:"pagination",attrs:{"current-page":t.page.current,"page-size":t.page.size,layout:"total, prev, pager, next, jumper",total:t.page.total,background:"","hide-on-single-page":""},on:{"current-change":t.handleCurrentChange}}):t._e()],1)],1),i("dropship-detail",{directives:[{name:"show",rawName:"v-show",value:2===t.showComponent,expression:"showComponent === 2"}],ref:"dropshipDetail",on:{save:t.onDropshipDetailSave,back:t.onDropshipDetailBack}}),i("store-detail",{directives:[{name:"show",rawName:"v-show",value:3===t.showComponent,expression:"showComponent === 3"}],ref:"storeDetail",on:{save:t.onStoreDetailSave,back:t.onStoreDetailBack}})],1),i("el-dialog",{staticClass:"edit-profit-dialog",attrs:{visible:t.editProfitDialog.show,"close-on-click-modal":!1,"lock-scroll":!1,"append-to-body":"",title:"Edit profit"},on:{"update:visible":function(e){return t.$set(t.editProfitDialog,"show",e)}}},[i("el-form",[i("el-form-item",{staticClass:"profile-margin text-align-center"},[i("m-input-number",{staticClass:"input",attrs:{controls:!1,min:0,max:9999},model:{value:t.editProfitDialog.bulkDistributionDefaultPriceRate,callback:function(e){t.$set(t.editProfitDialog,"bulkDistributionDefaultPriceRate",t._n(e))},expression:"editProfitDialog.bulkDistributionDefaultPriceRate"}},[i("span",{staticClass:"input-suffix",attrs:{slot:"suffix"},slot:"suffix"},[t._v("%")])]),i("span",{staticClass:"plus"},[t._v("+")]),i("m-input-number",{staticClass:"input",attrs:{controls:!1,min:0,max:9999},model:{value:t.editProfitDialog.bulkDistributionDefaultPriceAdd,callback:function(e){t.$set(t.editProfitDialog,"bulkDistributionDefaultPriceAdd",t._n(e))},expression:"editProfitDialog.bulkDistributionDefaultPriceAdd"}},[i("span",{staticClass:"input-suffix",attrs:{slot:"suffix"},slot:"suffix"},[t._v("$")])])],1)],1),i("el-row",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(e){t.editProfitDialog.show=!1}}},[t._v("Close")]),i("el-button",{attrs:{type:"primary"},on:{click:t.doEditProfit}},[t._v("Edit")])],1)],1),i("el-dialog",{staticClass:"edit-compare-price-dialog",attrs:{visible:t.editComparePriceDialog.show,"close-on-click-modal":!1,"lock-scroll":!1,"append-to-body":"",title:"Edit compare price"},on:{"update:visible":function(e){return t.$set(t.editComparePriceDialog,"show",e)}}},[i("el-form",[i("el-form-item",{staticClass:"text-align-center"},[i("m-input-number",{attrs:{controls:!1,min:0,max:9999},model:{value:t.editComparePriceDialog.bulkDistributionCompareAtPriceRate,callback:function(e){t.$set(t.editComparePriceDialog,"bulkDistributionCompareAtPriceRate",e)},expression:"editComparePriceDialog.bulkDistributionCompareAtPriceRate"}},[i("span",{attrs:{slot:"suffix"},slot:"suffix"},[t._v("%")])])],1)],1),i("el-row",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(e){t.editComparePriceDialog.show=!1}}},[t._v("Close")]),i("el-button",{attrs:{type:"primary"},on:{click:t.doEditComparePrice}},[t._v("Edit")])],1)],1)],1):t._e()},s=[],r=i("6d68"),n=i("2f69"),a=i("4f85"),l=i("2f62"),c=i("f13c"),u=i.n(c),d=i("ed08"),p=i("b4c1"),h=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"dropshinpper-detail"},[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},model:{value:t.dropshinpperForm.mainImageUrl,callback:function(e){t.$set(t.dropshinpperForm,"mainImageUrl",e)},expression:"dropshinpperForm.mainImageUrl"}})],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-card"},[i("div",{staticClass:"dropshinpper-card-title"},[t._v("Description")]),i("Description",{attrs:{"custom-product-info":t.detailInfo.customProductInfo},on:{change:t.changeDescription}})],1),i("div",{staticClass:"dropshinpper-button"},[i("el-button",{on:{click:t.toBack}},[t._v("Back")]),i("el-button",{attrs:{type:"primary"},on:{click:t.toSave}},[t._v("Save")])],1)])],1)},f=[],m=i("1635"),b=i("48c2"),g=i("cd9e"),v={name:"DropshipDetail",components:{Mockups:m["a"],Variants:b["a"],Description:g["a"]},data(){return{detailInfo:{customProductInfo:{tags:[]},images:[{url:""}],level1Fittings:[{id:""}],level2Fittings:[{id:""}],level1Fittingses:[],level2Fittingses:[],level3Fittings:[{id:""}],variantList:[{retailPrice:0,profit:0,profitMargin:0}]},dropshinpperForm:{blankProductId:0,mainImageUrl:"",title:"",description:"",isAddMertic:!0,tags:[],variantList:[],hiddenInStore:!1,blankFittingsLevel:1,collectionId:""},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"}],variantList:[{required:!0,message:"The VariantList field is required",trigger:"blur"}]}}},methods:{init({detail:t,form:e}){this.detailInfo=t,this.dropshinpperForm=e},changeStore(t){this.dropshinpperForm=Object.assign(this.dropshinpperForm,t)},changeVariants(t){this.dropshinpperForm.variantList=t},changeDescription(t){this.dropshinpperForm=Object.assign(this.dropshinpperForm,t)},toBack(){this.$emit("back")},toSave(){this.$refs.dropshinpperForm.validate(t=>{t&&this.$emit("save",this.dropshinpperForm)})}}},D=v,C=(i("9b98"),i("2877")),k=Object(C["a"])(D,h,f,!1,null,"fb70e02e",null),y=k.exports,w=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"dropshinpper-detail"},[i("el-form",{ref:"dropshinpperForm",attrs:{model:t.dropshinpperForm,rules:t.dropshinpperRules,"label-width":"100px","label-position":"top"}},[i("div",{staticClass:"dropshinpper-card"},[i("div",{staticClass:"dropshinpper-card-title"},[t._v("Store details")]),i("StoreDetails",{attrs:{"greeting-cards":t.greetingCards,"fittings-id":t.dropshinpperForm.fittingsId,"blank-fittings-level":t.dropshinpperForm.blankFittingsLevel,"collection-id":t.dropshinpperForm.collectionId,"hidden-in-store":t.dropshinpperForm.hiddenInStore,"blank-greeting-card-id":t.dropshinpperForm.blankGreetingCardId,"level-fittings":t.fittingses},on:{"update:fittingsId":function(e){return t.$set(t.dropshinpperForm,"fittingsId",e)},"update:fittings-id":function(e){return t.$set(t.dropshinpperForm,"fittingsId",e)},"update:blankFittingsLevel":function(e){return t.$set(t.dropshinpperForm,"blankFittingsLevel",e)},"update:blank-fittings-level":function(e){return t.$set(t.dropshinpperForm,"blankFittingsLevel",e)},"update:collectionId":function(e){return t.$set(t.dropshinpperForm,"collectionId",e)},"update:collection-id":function(e){return t.$set(t.dropshinpperForm,"collectionId",e)},"update:hiddenInStore":function(e){return t.$set(t.dropshinpperForm,"hiddenInStore",e)},"update:hidden-in-store":function(e){return t.$set(t.dropshinpperForm,"hiddenInStore",e)},"update:blankGreetingCardId":function(e){return t.$set(t.dropshinpperForm,"blankGreetingCardId",e)},"update:blank-greeting-card-id":function(e){return t.$set(t.dropshinpperForm,"blankGreetingCardId",e)}}})],1),i("div",{staticClass:"dropshinpper-button"},[i("el-button",{attrs:{disabled:t.doing},on:{click:t.toBack}},[t._v("Previous")]),i("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)},I=[],P=i("afad"),S=i("b0dc"),x=i("623f"),_={name:"StoreDetail",components:{StoreDetails:P["a"]},data(){return{fittingses:[],greetingCards:[],dropshinpperForm:{hiddenInStore:!1,blankFittingsLevel:1,collectionId:"",fittingsId:null,blankGreetingCardId: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(),this.loadGreetingCards()},methods:{async loadGreetingCards(){var t=await Object(x["h"])({});this.greetingCards=t.data||[]},loadBlankFittings(){Object(S["a"])({fittingAll:!0}).then(t=>{if(200===t.code){var e=t.data.records||[];this.fittingses=e,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,blankGreetingCardId:this.dropshinpperForm.blankGreetingCardId}),this.doing=!0)})}}},L=_,F=(i("4d66"),Object(C["a"])(L,w,I,!1,null,"d988bffa",null)),$=F.exports,A={name:"BatchDistributionDialog",components:{ProductTagsSelector:a["a"],MInputNumber:p["a"],DropshipDetail:y,StoreDetail:$},filters:{profileFilter(t){if(null==t.bulkDistributionDefaultPriceRate||null==t.bulkDistributionDefaultPriceAdd){if(t.dropShippingForm){let e=-1/0,i=1/0;for(const o of t.dropShippingForm.variantList){const t=Number(o.retailPrice)-Number(o.costs);t>e&&(e=t),to&&(o=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 e=await Object(r["c"])(t);this.productLoading=!1,this.page.total=e.data.total,this.productList=[];for(const i of e.data.records)i.checked=!1,i.bulkDistributionDefaultPriceRate=100*this.userInfo.bulkDistributionDefaultPriceRate,i.bulkDistributionDefaultPriceAdd=this.userInfo.bulkDistributionDefaultPriceAdd,i.bulkDistributionCompareAtPriceRate=100*this.userInfo.bulkDistributionCompareAtPriceRate,this.productList.push(i);this.scrollToTop()},scrollToTop(){u.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:e}){this.isSelectNew=t,this.selectLabelIds=e,this.reloadProducts()},onCheckAll(t){if(t)for(const e of this.productList)e.checked=!0;else for(const e of this.productList)e.checked=!1;this.selectAllIndeterminate=!1,this.productList.splice()},onProductCheckChange(){this.productList.splice();let t=0;for(const e of this.productList)e.checked&&(t+=1);this.selectAll=t>0&&t===this.productList.length,this.selectAllIndeterminate=t>0&&t{const e=Number(t.retailPrice)-Number(t.costs),i=Number(t.profit)/Number(t.costs)*100;t.profit=e,t.profitMargin=i})),t},async toEditMore(t){var e=this.productList[t];await this.loadProductDetail(e),null!=e.bulkDistributionDefaultPriceRate&&null!=e.bulkDistributionDefaultPriceAdd&&e.dropShippingForm.variantList.forEach(t=>{const i=t.costs*e.bulkDistributionDefaultPriceRate/100+e.bulkDistributionDefaultPriceAdd,o=Number(t.profit)/Number(t.costs)*100;t.retailPrice=Object(d["d"])(t.costs+i),t.profit=i,t.profitMargin=o}),null!=e.bulkDistributionCompareAtPriceRate&&e.dropShippingForm.variantList.forEach(t=>{t.compareAtPrice=t.costs*e.bulkDistributionCompareAtPriceRate/100,t.compareAtPrice=Object(d["d"])(t.compareAtPrice)}),this.$refs.dropshipDetail.init({detail:e.dropShippingDetailInfo,form:e.dropShippingForm}),this.dropShippingDetailForm.productInfoIndex=t,this.dropShippingDetailForm.productInfo=e,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:e,fittingsId:i,blankGreetingCardId:o,hiddenInStore:s}){var r={},a=[];r.records=a;for(const n of this.selectProducts){var l={};l.blankProductId=n.id,n.dropShippingForm&&(l.mainImageUrl=n.dropShippingForm.mainImageUrl,l.title=n.dropShippingForm.title,l.description=n.dropShippingForm.description,l.isAddMertic=n.dropShippingForm.isAddMertic,l.tags=n.dropShippingForm.tags,l.variantList=n.dropShippingForm.variantList),l.blankGreetingCardId=o,l.hiddenInStore=s,l.blankFittingsLevel=t,l.fittingsId=i,l.collectionId=e,l.bulkDistributionDefaultPriceRate=n.bulkDistributionDefaultPriceRate,l.bulkDistributionDefaultPriceRate&&(l.bulkDistributionDefaultPriceRate=Object(d["d"])(l.bulkDistributionDefaultPriceRate/100)),l.bulkDistributionDefaultPriceAdd=n.bulkDistributionDefaultPriceAdd,l.bulkDistributionCompareAtPriceRate=n.bulkDistributionCompareAtPriceRate,l.bulkDistributionCompareAtPriceRate&&(l.bulkDistributionCompareAtPriceRate=Object(d["d"])(l.bulkDistributionCompareAtPriceRate/100)),a.push(l)}var c=await Object(n["i"])(r);200===c.code?(c=await Object(n["o"])({customProductIds:c.data}),200===c.code?(this.$message.success("Bulk distribution success!"),this.hiddenDialog(),this.$emit("success"),this.callNewPage("/DropshinpperList")):this.$message.error(c.msg)):this.$message.error(c.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}}},N=A,E=(i("7848"),Object(C["a"])(N,o,s,!1,null,"8321f0da",null));e["a"]=E.exports},"9b98":function(t,e,i){"use strict";i("aaaa")},aaaa:function(t,e,i){},b0dc:function(t,e,i){"use strict";i.d(e,"a",(function(){return s}));var o=i("66a5");const s=t=>Object(o["a"])({url:"/shopapi/blankFittings/list",method:"post",data:t})},b4c1:function(t,e,i){"use strict";var o=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:["el-input-number",t.inputNumberSize?"el-input-number--"+t.inputNumberSize:"",{"is-disabled":t.inputNumberDisabled},{"is-without-controls":!t.controls},{"is-controls-right":t.controlsAtRight}],on:{dragstart:function(t){t.preventDefault()}}},[t.controls?i("span",{directives:[{name:"repeat-click",rawName:"v-repeat-click",value:t.decrease,expression:"decrease"}],staticClass:"el-input-number__decrease",class:{"is-disabled":t.minDisabled},attrs:{role:"button"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.decrease.apply(null,arguments)}}},[i("i",{class:"el-icon-"+(t.controlsAtRight?"arrow-down":"minus")})]):t._e(),t.controls?i("span",{directives:[{name:"repeat-click",rawName:"v-repeat-click",value:t.increase,expression:"increase"}],staticClass:"el-input-number__increase",class:{"is-disabled":t.maxDisabled},attrs:{role:"button"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.increase.apply(null,arguments)}}},[i("i",{class:"el-icon-"+(t.controlsAtRight?"arrow-up":"plus")})]):t._e(),i("el-input",{ref:"input",attrs:{value:t.displayValue,placeholder:t.placeholder,disabled:t.inputNumberDisabled,size:t.inputNumberSize,max:t.max,min:t.min,name:t.name,label:t.label},on:{blur:t.handleBlur,focus:t.handleFocus,input:t.handleInput,change:t.handleInputChange},nativeOn:{keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"])?null:(e.preventDefault(),t.increase.apply(null,arguments))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?null:(e.preventDefault(),t.decrease.apply(null,arguments))}]}},[t._t("suffix",null,{slot:"suffix"})],2)],1)},s=[],r=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:["textarea"===t.type?"el-textarea":"el-input",t.inputSize?"el-input--"+t.inputSize:"",{"is-disabled":t.inputDisabled,"is-exceed":t.inputExceed,"el-input-group":t.$slots.prepend||t.$slots.append,"el-input-group--append":t.$slots.append,"el-input-group--prepend":t.$slots.prepend,"el-input--prefix":t.$slots.prefix||t.prefixIcon,"el-input--suffix":t.$slots.suffix||t.suffixIcon||t.clearable||t.showPassword}],on:{mouseenter:function(e){t.hovering=!0},mouseleave:function(e){t.hovering=!1}}},["textarea"!==t.type?[t.$slots.prepend?i("div",{staticClass:"el-input-group__prepend"},[t._t("prepend")],2):t._e(),"textarea"!==t.type?i("input",t._b({ref:"input",staticClass:"el-input__inner",attrs:{tabindex:t.tabindex,type:t.showPassword?t.passwordVisible?"text":"password":t.type,disabled:t.inputDisabled,readonly:t.readonly,autocomplete:t.autoComplete||t.autocomplete,"aria-label":t.label},on:{compositionstart:t.handleCompositionStart,compositionupdate:t.handleCompositionUpdate,compositionend:t.handleCompositionEnd,input:t.handleInput,focus:t.handleFocus,blur:t.handleBlur,change:t.handleChange}},"input",t.$attrs,!1)):t._e(),t.$slots.prefix||t.prefixIcon?i("span",{staticClass:"el-input__prefix"},[t._t("prefix"),t.prefixIcon?i("i",{staticClass:"el-input__icon",class:t.prefixIcon}):t._e()],2):t._e(),t.getSuffixVisible()?i("span",{staticClass:"el-input__suffix"},[i("span",{staticClass:"el-input__suffix-inner"},[t.showClear&&t.showPwdVisible&&t.isWordLimitVisible?t._e():[t._t("suffix"),t.suffixIcon?i("i",{staticClass:"el-input__icon",class:t.suffixIcon}):t._e()],t.showClear?i("i",{staticClass:"el-input__icon el-icon-circle-close el-input__clear",on:{mousedown:function(t){t.preventDefault()},click:t.clear}}):t._e(),t.showPwdVisible?i("i",{staticClass:"el-input__icon el-icon-view el-input__clear",on:{click:t.handlePasswordVisible}}):t._e(),t.isWordLimitVisible?i("span",{staticClass:"el-input__count"},[i("span",{staticClass:"el-input__count-inner"},[t._v(" "+t._s(t.textLength)+"/"+t._s(t.upperLimit)+" ")])]):t._e()],2),t.validateState?i("i",{staticClass:"el-input__icon",class:["el-input__validateIcon",t.validateIcon]}):t._e()]):t._e(),t.$slots.append?i("div",{staticClass:"el-input-group__append"},[t._t("append")],2):t._e()]:i("textarea",t._b({ref:"textarea",staticClass:"el-textarea__inner",style:t.textareaStyle,attrs:{tabindex:t.tabindex,disabled:t.inputDisabled,readonly:t.readonly,autocomplete:t.autoComplete||t.autocomplete,"aria-label":t.label},on:{compositionstart:t.handleCompositionStart,compositionupdate:t.handleCompositionUpdate,compositionend:t.handleCompositionEnd,input:t.handleInput,focus:t.handleFocus,blur:t.handleBlur,change:t.handleChange}},"textarea",t.$attrs,!1)),t.isWordLimitVisible&&"textarea"===t.type?i("span",{staticClass:"el-input__count"},[t._v(t._s(t.textLength)+"/"+t._s(t.upperLimit))]):t._e()],2)},n=[];function a(t,e,i){this.$children.forEach(o=>{var s=o.$options.componentName;s===t?o.$emit.apply(o,[e].concat(i)):a.apply(o,[t,e].concat([i]))})}var l={methods:{dispatch(t,e,i){var o=this.$parent||this.$root,s=o.$options.componentName;while(o&&(!s||s!==t))o=o.$parent,o&&(s=o.$options.componentName);o&&o.$emit.apply(o,[e].concat(i))},broadcast(t,e,i){a.call(this,t,e,i)}}},c=i("2b0e");let u=t=>{var e={};return t&&"[object Function]"===e.toString.call(t)};"object"===typeof Int8Array||!c["default"].prototype.$isServer&&"function"===typeof document.childNodes||(u=function(t){return"function"===typeof t||!1});Object.prototype.hasOwnProperty;var d={mounted(){},methods:{getMigratingConfig(){return{props:{},events:{}}}}};let p;const h="\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important\n",f=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function m(t){const e=window.getComputedStyle(t),i=e.getPropertyValue("box-sizing"),o=parseFloat(e.getPropertyValue("padding-bottom"))+parseFloat(e.getPropertyValue("padding-top")),s=parseFloat(e.getPropertyValue("border-bottom-width"))+parseFloat(e.getPropertyValue("border-top-width")),r=f.map(t=>`${t}:${e.getPropertyValue(t)}`).join(";");return{contextStyle:r,paddingSize:o,borderSize:s,boxSizing:i}}function b(t,e=1,i=null){p||(p=document.createElement("textarea"),document.body.appendChild(p));let{paddingSize:o,borderSize:s,boxSizing:r,contextStyle:n}=m(t);p.setAttribute("style",`${n};${h}`),p.value=t.value||t.placeholder||"";let a=p.scrollHeight;const l={};"border-box"===r?a+=s:"content-box"===r&&(a-=o),p.value="";let c=p.scrollHeight-o;if(null!==e){let t=c*e;"border-box"===r&&(t=t+o+s),a=Math.max(t,a),l.minHeight=t+"px"}if(null!==i){let t=c*i;"border-box"===r&&(t=t+o+s),a=Math.min(t,a)}return l.height=a+"px",p.parentNode&&p.parentNode.removeChild(p),p=null,l}var g=function(t){for(let e=1,i=arguments.length;ethis.upperLimit}},watch:{value(t){this.$nextTick(this.resizeTextarea),this.validateEvent&&this.dispatch("ElFormItem","el.form.change",[t])},nativeInputValue(){this.setNativeInputValue()},type(){this.$nextTick(()=>{this.setNativeInputValue(),this.resizeTextarea(),this.updateIconOffset()})}},methods:{focus(){this.getInput().focus()},blur(){this.getInput().blur()},getMigratingConfig(){return{props:{icon:"icon is removed, use suffix-icon / prefix-icon instead.","on-icon-click":"on-icon-click is removed."},events:{click:"click is removed."}}},handleBlur(t){this.focused=!1,this.$emit("blur",t),this.validateEvent&&this.dispatch("ElFormItem","el.form.blur",[this.value])},select(){this.getInput().select()},resizeTextarea(){if(this.$isServer)return;const{autosize:t,type:e}=this;if("textarea"!==e)return;if(!t)return void(this.textareaCalcStyle={minHeight:b(this.$refs.textarea).minHeight});const i=t.minRows,o=t.maxRows;this.textareaCalcStyle=b(this.$refs.textarea,i,o)},setNativeInputValue(){const t=this.getInput();t&&t.value!==this.nativeInputValue&&(t.value=this.nativeInputValue)},handleFocus(t){this.focused=!0,this.$emit("focus",t)},handleCompositionStart(){this.isComposing=!0},handleCompositionUpdate(t){const e=t.target.value,i=e[e.length-1]||"";this.isComposing=!v(i)},handleCompositionEnd(t){this.isComposing&&(this.isComposing=!1,this.handleInput(t))},handleInput(t){this.isComposing||t.target.value!==this.nativeInputValue&&(this.$emit("input",t.target.value),this.$nextTick(this.setNativeInputValue))},handleChange(t){this.$emit("change",t.target.value)},calcIconOffset(t){let e=[].slice.call(this.$el.querySelectorAll(".el-input__"+t)||[]);if(!e.length)return;let i=null;for(let r=0;r{this.focus()})},getInput(){return this.$refs.input||this.$refs.textarea},getSuffixVisible(){return this.$slots.suffix||this.suffixIcon||this.showClear||this.showPassword||this.isWordLimitVisible||this.validateState&&this.needStatusIcon}},created(){this.$on("inputSelect",this.select)},mounted(){this.setNativeInputValue(),this.resizeTextarea(),this.updateIconOffset()},updated(){this.$nextTick(this.updateIconOffset)}},C=D,k=i("2877"),y=Object(k["a"])(C,r,n,!1,null,null,null),w=y.exports;w.install=function(t){t.component(w.name,w)};var I=w,P=function(t){return{methods:{focus(){this.$refs[t].focus()}}}};const S=c["default"].prototype.$isServer,x=(S||Number(document.documentMode),function(){return!S&&document.addEventListener?function(t,e,i){t&&e&&i&&t.addEventListener(e,i,!1)}:function(t,e,i){t&&e&&i&&t.attachEvent("on"+e,i)}}()),_=function(){return!S&&document.removeEventListener?function(t,e,i){t&&e&&t.removeEventListener(e,i,!1)}:function(t,e,i){t&&e&&t.detachEvent("on"+e,i)}}(),L=function(t,e,i){var o=function(){i&&i.apply(this,arguments),_(t,e,o)};x(t,e,o)};var F={bind(t,e,i){let o,s=null;const r=()=>i.context[e.expression].apply(),n=()=>{Date.now()-o<100&&r(),clearInterval(s),s=null};x(t,"mousedown",t=>{0===t.button&&(o=Date.now(),L(document,"mouseup",n),clearInterval(s),s=setInterval(r,100))})}},$={name:"MInputNumber",directives:{repeatClick:F},components:{ElInput:I},mixins:[P("input")],inject:{elForm:{default:""},elFormItem:{default:""}},props:{step:{type:Number,default:1},stepStrictly:{type:Boolean,default:!1},max:{type:Number,default:1/0},min:{type:Number,default:-1/0},value:{},disabled:Boolean,size:String,controls:{type:Boolean,default:!0},controlsPosition:{type:String,default:""},name:String,label:String,placeholder:String,precision:{type:Number,validator(t){return t>=0&&t===parseInt(t,10)}}},data(){return{currentValue:0,userInput:null}},computed:{minDisabled(){return this._decrease(this.value,this.step)this.max},numPrecision(){const{value:t,step:e,getPrecision:i,precision:o}=this,s=i(e);return void 0!==o?(s>o&&console.warn("[Element Warn][InputNumber]precision should not be less than the decimal places of step"),o):Math.max(i(t),s)},controlsAtRight(){return this.controls&&"right"===this.controlsPosition},_elFormItemSize(){return(this.elFormItem||{}).elFormItemSize},inputNumberSize(){return this.size||this._elFormItemSize||(this.$ELEMENT||{}).size},inputNumberDisabled(){return this.disabled||!!(this.elForm||{}).disabled},displayValue(){if(null!==this.userInput)return this.userInput;let t=this.currentValue;if("number"===typeof t){if(this.stepStrictly){const e=this.getPrecision(this.step),i=Math.pow(10,e);t=Math.round(t/this.step)*i*this.step/i}void 0!==this.precision&&(t=t.toFixed(this.precision))}return t}},watch:{value:{immediate:!0,handler(t){let e=void 0===t?t:Number(t);if(void 0!==e){if(isNaN(e))return;if(this.stepStrictly){const t=this.getPrecision(this.step),i=Math.pow(10,t);e=Math.round(e/this.step)*i*this.step/i}void 0!==this.precision&&(e=this.toPrecision(e,this.precision))}e>=this.max&&(e=this.max),e<=this.min&&(e=this.min),this.currentValue=e,this.userInput=null,this.$emit("input",e)}}},mounted(){const t=this.$refs.input.$refs.input;t.setAttribute("role","spinbutton"),t.setAttribute("aria-valuemax",this.max),t.setAttribute("aria-valuemin",this.min),t.setAttribute("aria-valuenow",this.currentValue),t.setAttribute("aria-disabled",this.inputNumberDisabled)},updated(){if(!this.$refs||!this.$refs.input)return;const t=this.$refs.input.$refs.input;t.setAttribute("aria-valuenow",this.currentValue)},methods:{toPrecision(t,e){return void 0===e&&(e=this.numPrecision),parseFloat(Math.round(t*Math.pow(10,e))/Math.pow(10,e))},getPrecision(t){if(void 0===t)return 0;const e=t.toString(),i=e.indexOf(".");let o=0;return-1!==i&&(o=e.length-i-1),o},_increase(t,e){if("number"!==typeof t&&void 0!==t)return this.currentValue;const i=Math.pow(10,this.numPrecision);return this.toPrecision((i*t+i*e)/i)},_decrease(t,e){if("number"!==typeof t&&void 0!==t)return this.currentValue;const i=Math.pow(10,this.numPrecision);return this.toPrecision((i*t-i*e)/i)},increase(){if(this.inputNumberDisabled||this.maxDisabled)return;const t=this.value||0,e=this._increase(t,this.step);this.setCurrentValue(e)},decrease(){if(this.inputNumberDisabled||this.minDisabled)return;const t=this.value||0,e=this._decrease(t,this.step);this.setCurrentValue(e)},handleBlur(t){this.$emit("blur",t)},handleFocus(t){this.$emit("focus",t)},setCurrentValue(t){const e=this.currentValue;"number"===typeof t&&void 0!==this.precision&&(t=this.toPrecision(t,this.precision)),t>=this.max&&(t=this.max),t<=this.min&&(t=this.min),e!==t&&(this.userInput=null,this.$emit("input",t),this.$emit("change",t,e),this.currentValue=t)},handleInput(t){this.userInput=t},handleInputChange(t){const e=""===t?void 0:Number(t);isNaN(e)&&""!==t||this.setCurrentValue(e),this.userInput=null},select(){this.$refs.input.select()}}},A=$,N=Object(k["a"])(A,o,s,!1,null,null,null);e["a"]=N.exports},b763:function(t,e,i){},c4a0:function(t,e,i){"use strict";i.r(e);var o=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"product-page"},[t.productTypeLoad?i("div",{staticClass:"product-type-list"},t._l(t.typeList,(function(e){return i("div",{key:e.id,staticClass:"product-type-item div-hover",on:{click:function(i){return t.selectType(e)}}},[i("my-img",{staticClass:"product-type-img",attrs:{src:e.fileUrl,alt:"product type img"}}),i("div",{class:["product-type-text",{decoration:t.currentType.id===e.id}]},[t._v(t._s(e.name))])],1)})),0):i("el-skeleton",[i("template",{slot:"template"},[i("div",{staticClass:"product-type-list"},t._l(5,(function(t){return i("div",{key:t,staticClass:"product-type-item div-hover"},[i("el-skeleton-item",{staticStyle:{width:"150px",height:"150px"},attrs:{variant:"image"}})],1)})),0)])],2),t.currentType.advertiseFileUrl?i("img",{staticClass:"product-banner",attrs:{src:t.currentType.advertiseFileUrl,alt:"banner"}}):i("el-skeleton",[i("template",{slot:"template"},[i("el-skeleton-item",{staticStyle:{width:"100%",height:"500px"},attrs:{variant:"image"}})],1)],2),i("div",{staticClass:"product-list-box",attrs:{id:"product-list-box"}},[i("el-row",{staticClass:"search-form",attrs:{type:"flex",justify:"space-between"}},[i("div",[i("el-input",{staticClass:"keyword-input",attrs:{placeholder:"Product name or product ID","max-length":"50"},on:{change:t.reloadProduct},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.reloadProduct.apply(null,arguments)}},model:{value:t.form.keyword,callback:function(e){t.$set(t.form,"keyword","string"===typeof e?e.trim():e)},expression:"form.keyword"}}),t.userInfo.login&&2!==t.currentShop.shopType?i("el-button",{staticClass:"bulk-distribution-button",attrs:{type:"primary"},on:{click:t.showBulkDistributionDialog}},[i("i",{staticClass:"el-icon-s-unfold"}),t._v("Bulk distribution")]):t._e()],1),i("el-select",{on:{change:t.reloadProduct},model:{value:t.form.isDropshipped,callback:function(e){t.$set(t.form,"isDropshipped",e)},expression:"form.isDropshipped"}},[i("el-option",{attrs:{value:null,label:"ALL"}}),i("el-option",{attrs:{value:!1,label:"Not distributed"}}),i("el-option",{attrs:{value:!0,label:"Distributed"}})],1)],1),i("el-row",[i("product-tags-selector",{on:{change:t.onSelectLabelChange}})],1),i("ProductList",{directives:[{name:"loading",rawName:"v-loading",value:t.productLoading,expression:"productLoading"}],attrs:{list:t.productList}}),i("el-pagination",{staticClass:"pagination",attrs:{"current-page":t.page.current,"page-size":t.page.size,layout:"total, prev, pager, next, jumper",total:t.page.total,background:"","hide-on-single-page":""},on:{"current-change":t.handleCurrentChange}})],1),t.batchDistributionDialog.show?i("batch-distribution",{attrs:{show:t.batchDistributionDialog.show},on:{"update:show":function(e){return t.$set(t.batchDistributionDialog,"show",e)}}}):t._e()],1)},s=[],r=i("6d68"),n=i("8f03"),a=i("f13c"),l=i.n(a),c=i("8f8f"),u=i("4f85"),d=i("2f62"),p={name:"ProductsPricing",components:{ProductList:n["a"],BatchDistribution:c["a"],ProductTagsSelector:u["a"]},data(){return{typeList:[],currentType:{},productList:[],productLoading:!1,form:{keyword:null,isDropshipped:null,isNew:!1,labelIds:[]},page:{total:0,current:1,size:16},batchDistributionDialog:{show:!1},productTypeLoad:!1,hasDeactivated:!1}},computed:{...Object(d["b"])("user",{currentShop:"getCurrentShop",userInfo:"getUserBaseInfo"})},async mounted(){this.ssrCountSet(1),await this.getTypeList(),this.getProductList().finally(()=>{this.ssrCountDown()})},activated(){this.hasDeactivated&&this.getProductList()},deactivated(){this.hasDeactivated=!0},methods:{showBulkDistributionDialog(){this.batchDistributionDialog.show=!0},onSelectLabelChange({isSelectNew:t,labelIds:e}){this.form.isNew=t,this.form.labelIds=e,this.reloadProduct()},async getTypeList(){const t=await Object(r["d"])();this.typeList=t.data.records,this.currentType=this.typeList[0],this.productTypeLoad=!0},async getProductList(){const t={typeId:this.currentType.id,...this.page,...this.form};this.productLoading=!0;const e=await Object(r["c"])(t);this.productLoading=!1,this.page.total=e.data.total,this.productList=e.data.records,this.scrollToList()},scrollToList(){l.a.scrollTo("#product-list-box",800,{offset:-120,easing:"ease-in-out"})},selectType(t){this.currentType=this.typeList.find(e=>e.id===t.id),this.reloadProduct()},reloadProduct(){this.page.current=1,this.getProductList()},handleCurrentChange(t){this.page.current=t,this.getProductList()}}},h=p,f=(i("fb1b"),i("2877")),m=Object(f["a"])(h,o,s,!1,null,"acc917a8",null);e["default"]=m.exports},d243:function(t,e,i){},f13c:function(t,e,i){ /*! * vue-scrollto v2.20.0 * (c) 2019 Randjelovic Igor * @license MIT */ (function(e,i){t.exports=i()})(0,(function(){"use strict";function t(e){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(e)}function e(){return e=Object.assign||function(t){for(var e=1;e0?i=l:e=l}while(Math.abs(a)>s&&++c=o?m(e,d,t,i):0===p?d:f(e,s,s+a,t,i)}return function(t){return 0===t?0:1===t?1:p(u(t),e,s)}},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 C=Object.defineProperty({},"passive",{get:function(){D=!0}});window.addEventListener("test",null,C)}catch(O){}var k={$:function(t){return"string"!==typeof t?t:document.querySelector(t)},on:function(t,e,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{passive:!1};e instanceof Array||(e=[e]);for(var s=0;s2&&void 0!==arguments[2]?arguments[2]:{};if("object"===t(S)?x=S:"number"===typeof S&&(x.duration=S),e=k.$(m),!e)return console.warn("[vue-scrollto warn]: Trying to scroll to an element that is not on the page: "+m);if(i=k.$(x.container||w.container),o=x.hasOwnProperty("duration")?x.duration:w.duration,r=x.hasOwnProperty("lazy")?x.lazy:w.lazy,s=x.easing||w.easing,n=x.hasOwnProperty("offset")?x.offset:w.offset,a=x.hasOwnProperty("force")?!1!==x.force:w.force,l=x.hasOwnProperty("cancelable")?!1!==x.cancelable:w.cancelable,c=x.onStart||w.onStart,u=x.onDone||w.onDone,d=x.onCancel||w.onCancel,p=void 0===x.x?w.x:x.x,h=void 0===x.y?w.y:x.y,"function"===typeof n&&(n=n(e,i)),f=O(i),b=E(i),T(),P=!1,!a){var F="body"===i.tagName.toLowerCase()?document.documentElement.clientHeight||window.innerHeight:i.offsetHeight,$=b,A=$+F,j=D-n,R=j+e.offsetHeight;if(j>=$&&R<=A)return void(u&&u(e))}if(c&&c(e),I||C)return"string"===typeof s&&(s=v[s]||v["ease"]),L=g.apply(g,s),k.on(i,y,N,{passive:!0}),window.requestAnimationFrame(V),function(){_=null,P=!0};u&&u(e)}return z},S=P(),x=[];function _(t){for(var e=0;e