(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6651b6cd"],{"0a63":function(t,e,i){t.exports=i.p+"static/img/edit-icon.e0002ab8.svg"},"1bfc":function(t,e,i){},"1c40":function(t,e,i){},"460b":function(t,e,i){},5046:function(t,e,i){"use strict";i.r(e);var s=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"page-content"},[s("div",{staticClass:"page-title"},[t._v("My custom accessories")]),t._l(t.myAccessoryList,(function(e){return s("div",{key:e.id,staticClass:"my-accessory-item"},[s("div",{staticClass:"item-left"},[s("div",{staticClass:"item-left-content"},[s("img",{staticClass:"item-left-content-left",attrs:{src:e.mainImageUrl},on:{click:function(i){return t.showImgListClick([e.mainImageUrl])}}}),s("div",{staticClass:"item-left-content-right"},[s("div",{staticClass:"product-name"},[t._v(t._s(e.title))]),s("div",{staticClass:"product-introduction",domProps:{innerHTML:t._s(e.blankProductContent)}}),s("div",{staticClass:"product-code"},[t._v("Attachment Design Code: "+t._s(e.productNo))]),s("div",{staticClass:"product-remark-box"},[s("el-tooltip",{attrs:{"popper-class":"tooltip-popper",effect:"dark",content:e.remark,placement:"top-start","open-delay":300,disabled:!e.remark}},[s("div",{staticClass:"product-remark"},[t._v("Remarks: "+t._s(e.remark))])]),s("img",{staticClass:"product-remark-edit",attrs:{alt:"edit-icon",src:i("0a63")},on:{click:function(i){return t.showRemarksDialogClick(e)}}})],1)])])]),s("div",{staticClass:"item-right"},[s("div",{staticClass:"item-right-content"},[s("div",{staticClass:"item-right-content-left"},[s("div",{directives:[{name:"show",rawName:"v-show",value:e.showInventory,expression:"item.showInventory"}],staticClass:"item-right-title"},[t._v("Your inventory")]),s("div",{directives:[{name:"show",rawName:"v-show",value:e.showInventory,expression:"item.showInventory"}],staticClass:"item-right-number"},[t._v(" "+t._s(e.inventoryNum)+" PSC ")])]),s("div",{staticClass:"item-right-content-right"},[s("div",{staticClass:"item-right-content-right-box"},[s("div",{staticClass:"item-right-content-right-operate"},[s("span",{staticClass:"text",on:{click:function(i){return t.openDetailClick(e)}}},[t._v(" Edit ")])]),s("div",{staticClass:"item-right-content-right-operate"},[s("span",{directives:[{name:"show",rawName:"v-show",value:e.showInventory,expression:"item.showInventory"}],staticClass:"text",on:{click:function(i){return t.showReplenishClick(e)}}},[t._v(" Replenish inventory ")])]),s("div",{staticClass:"item-right-content-right-operate"},[s("span",{staticClass:"text",on:{click:function(i){return t.showBindingDialogClick(e)}}},[t._v("Jewelry bound")])]),s("div",{staticClass:"item-right-content-right-operate"},[s("span",{staticClass:"delete",on:{click:function(i){return t.showDeleteDialogClick(e)}}},[t._v("Delete")])])])])])])])})),s("el-pagination",{directives:[{name:"show",rawName:"v-show",value:t.myAccessoryList,expression:"myAccessoryList"}],staticClass:"pagination",attrs:{"current-page":t.query.current,"page-size":t.query.size,total:t.query.total,align:"right",background:"",layout:"total, sizes, prev, pager, next, jumper"},on:{"current-change":t.handleCurrentChange}}),s("DeleteDialog",{attrs:{data:t.dataObject},model:{value:t.showDeleteDialog,callback:function(e){t.showDeleteDialog=e},expression:"showDeleteDialog"}}),t.showReplenishInventoryDialog?s("ReplenishInventoryDialog",{attrs:{data:t.dataObject,"create-order":t.createOrderFn},model:{value:t.showReplenishInventoryDialog,callback:function(e){t.showReplenishInventoryDialog=e},expression:"showReplenishInventoryDialog"}}):t._e(),t.showBindingDialog?s("BindingDialog",{attrs:{data:t.dataObject,"update-fn":t.updateData},model:{value:t.showBindingDialog,callback:function(e){t.showBindingDialog=e},expression:"showBindingDialog"}}):t._e(),t.showRemarksDialog?s("RemarksDialog",{attrs:{data:t.dataObject,"update-fn":t.updateData},model:{value:t.showRemarksDialog,callback:function(e){t.showRemarksDialog=e},expression:"showRemarksDialog"}}):t._e(),t.showDetail?s("Detail",{ref:"detailPage"}):t._e(),s("PaypalDialog",{attrs:{"jump-to-order-page":!1,"show-wallet-payment":!0,"pay-target":4,"order-ids":[t.orderId]},model:{value:t.showPaypal,callback:function(e){t.showPaypal=e},expression:"showPaypal"}}),s("ImgListDialog",{attrs:{"img-list":t.currentImgList,"append-to-body":""},model:{value:t.showImgList,callback:function(e){t.showImgList=e},expression:"showImgList"}})],2)},a=[],l=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("el-dialog",{staticClass:"dialog el-dialog__title",attrs:{title:"Delete customized brand attachments","append-to-body":!0,visible:t.dialogVisible,"close-on-click-modal":!1},on:{"update:visible":function(e){t.dialogVisible=e},close:t.close}},[i("div",{staticClass:"dialog-text",staticStyle:{"margin-bottom":"40px"}},[t._v("Your accessory is in stock.")]),i("div",{staticClass:"quantity"},[t._v(" Quantity: "),i("span",{staticClass:"quantity-color"},[t._v(" "+t._s(t.data.inventoryNum)+" PSC")])]),i("div",{staticClass:"dialog-text",staticStyle:{"margin-top":"40px"}},[t._v("Are you sure you want to delete it?")]),i("div",{staticClass:"button-box"},[i("el-button",{staticClass:"cancel-button",on:{click:t.close}},[t._v("Cancel")]),i("el-button",{staticClass:"confirm-button",on:{click:t.doDelete}},[t._v("Confirm")])],1)])},o=[],n=i("0145c"),c={inject:["reload"],name:"DeleteDialog",data(){return{dialogVisible:!1}},props:{value:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},watch:{value:{handler(t){this.dialogVisible=t},immediate:!0},dialogVisible:{handler(t){this.$emit("input",t)},immediate:!0}},methods:{async doDelete(){try{const t=await Object(n["b"])({id:this.data.id});200===t.code?this.$message.success("Delete success!"):this.$message.error(t.msg)}catch(t){this.$message.error(t.message)}finally{this.dialogVisible=!1,setTimeout(this.reload(),100)}},close(){this.dialogVisible=!1}}},r=c,d=(i("d6b9"),i("2877")),u=Object(d["a"])(r,l,o,!1,null,"819b36bc",null),h=u.exports,m=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("el-dialog",{staticClass:"dialog",attrs:{title:"Replenish inventory","append-to-body":!0,visible:t.dialogVisible,"close-on-click-modal":!1},on:{"update:visible":function(e){t.dialogVisible=e},close:t.close}},[i("div",{staticClass:"dialog-inner-box"},[i("el-image",{staticClass:"product-image",attrs:{alt:"product-image",src:t.data.mainImageUrl}}),i("div",{staticClass:"product-name"},[t._v(" "+t._s(t.data.title)+" ")]),i("div",{staticClass:"product-price"},[t._v(" "+t._s(t.data.price)+" $ ")]),i("div",{staticClass:"number-box"},[i("div",{staticClass:"number-title"},[t._v("Inventory increase")]),i("div",{staticClass:"input-box"},[i("el-input-number",{staticClass:"number-input",attrs:{min:t.min,size:"small"},model:{value:t.num,callback:function(e){t.num=e},expression:"num"}})],1)]),i("div",{staticClass:"total-price"},[i("div",{staticClass:"total-price-left"},[t._v("Total costs:")]),i("div",{staticClass:"total-price-right"},[t._v("$ "+t._s(t.totalPrice))])])],1),i("div",{staticClass:"button-box"},[i("el-button",{staticClass:"cancel-button",on:{click:t.close}},[t._v("Cancel")]),i("el-button",{staticClass:"confirm-button",attrs:{disabled:t.num<=0},on:{click:t.confirm}},[t._v("Confirm")])],1)])},g=[],p={inject:["reload"],name:"ReplenishInventoryDialog",data(){return{minusDisabled:!1,dialogVisible:!1,num:0}},props:{value:{type:Boolean,default:!1},data:{type:Object,default:()=>{}},createOrder:{type:Function,default:()=>{}}},computed:{totalPrice(){return 1e3*this.data.price*this.num/1e3},min(){const t=this.data.minStockingNum;return t||0}},watch:{value:{handler(t){this.dialogVisible=t},immediate:!0},dialogVisible:{handler(t){this.$emit("input",t)},immediate:!0}},methods:{plus(){let t=this.handelNumber(this.num);t++,this.num=t,this.$forceUpdate()},minus(){let t=this.handelNumber(this.num);t<=0?this.minusDisabled=!0:(t--,this.num=t,this.$forceUpdate())},handelNumber(t){return void 0===t&&(t=0),t},close(){this.dialogVisible=!1},confirm(){this.createOrder(this.data,this.num),this.close()}}},b=p,v=(i("538b"),Object(d["a"])(b,m,g,!1,null,"1eb398b0",null)),y=v.exports,f=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("el-dialog",{staticClass:"dialog el-dialog__title",attrs:{title:"Add note","append-to-body":!0,visible:t.dialogVisible,"close-on-click-modal":!1},on:{"update:visible":function(e){t.dialogVisible=e},close:t.close}},[i("div",[i("el-input",{staticClass:"remarks-input",attrs:{type:"textarea",autosize:!1,resize:"none",clearable:"",maxlength:t.maxlength,"show-word-limit":""},model:{value:t.data.remark,callback:function(e){t.$set(t.data,"remark",e)},expression:"data.remark"}})],1),i("div",{staticClass:"button-box"},[i("el-button",{staticClass:"cancel-button",on:{click:t.close}},[t._v("Cancel")]),i("el-button",{staticClass:"confirm-button",on:{click:t.confirm}},[t._v("Confirm")])],1)])},C=[],w={inject:["reload"],name:"RemarksDialog",props:{value:{type:Boolean,default:!1},data:{type:Object,default:null},updateFn:{type:Function,default:()=>{}}},data(){return{dialogVisible:!1,storedRemarks:null,maxlength:255}},watch:{value:{handler(t){this.dialogVisible=t},immediate:!0},dialogVisible:{handler(t){this.$emit("input",t)},immediate:!0}},mounted(){this.storedRemarks=this.data.remark},methods:{async confirm(){this.updateFn(this.data);try{const t=await Object(n["d"])({id:this.data.id,remark:this.data.remark});200===t.code?this.$message.success("update success"):this.$message.error(t.msg)}catch(t){this.$message.error(t.message)}finally{this.$message.success("Delete success!"),this.dialogVisible=!1}},close(){this.data.remark=this.storedRemarks,this.dialogVisible=!1}}},k=w,D=(i("cdf5"),Object(d["a"])(k,f,C,!1,null,"68569188",null)),_=D.exports,I=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("el-dialog",{staticClass:"dialog",attrs:{title:"Binding supported jewelry","append-to-body":!0,visible:t.dialogVisible,"close-on-click-modal":!1},on:{"update:visible":function(e){t.dialogVisible=e},close:t.close}},[i("div",{staticClass:"dialog-inner-box"},[i("div",{staticClass:"condition-container"},[i("div",{staticClass:"condition-title"},[t._v("Whether To Bind")]),i("div",{staticClass:"condition-input-box"},[i("el-select",{staticClass:"select",staticStyle:{width:"370px"},attrs:{placeholder:"All",clearable:""},on:{change:t.getPage},model:{value:t.query.isBindFittings,callback:function(e){t.$set(t.query,"isBindFittings",e)},expression:"query.isBindFittings"}},t._l(t.bounds,(function(t){return i("el-option",{key:t.val,attrs:{label:t.label,value:t.val}})})),1),i("el-input",{staticStyle:{width:"370px"},attrs:{placeholder:"Accessory product ID, product name sku",clearable:""},on:{clear:t.getPage},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.getPage.apply(null,arguments)}},model:{value:t.query.keyword,callback:function(e){t.$set(t.query,"keyword",e)},expression:"query.keyword"}})],1),i("el-table",{ref:"table",staticClass:"table",attrs:{height:500,data:t.jewelryList,"tooltip-effect":"dark"},on:{"selection-change":t.handleSelectionChange}},[i("el-table-column",{attrs:{type:"selection",width:"45"}}),i("el-table-column",{staticClass:"table-header",attrs:{label:"No.",width:"80",prop:"no"}}),i("el-table-column",{attrs:{label:"Product"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("div",{staticClass:"product-box"},[i("div",{staticClass:"image-box"},[i("img",{attrs:{alt:"product-image",src:e.row.mainImageUrl}})]),i("div",{staticClass:"text-box"},[i("div",{staticClass:"text"},[i("div",{staticClass:"product-name"},[t._v(t._s(e.row.title))]),i("div",{staticClass:"product-blank-content",domProps:{innerHTML:t._s(e.row.blankContent)}})])])])]}}])})],1),i("div",{staticClass:"pagination-box"},[i("div",{staticClass:"total-select"},[t._v(" "+t._s(t.selected)+"  selected ")]),i("el-pagination",{staticClass:"pagination",attrs:{"current-page":t.query.current,"page-size":t.query.size,total:t.query.total,align:"right",background:"",layout:"total, sizes, prev, pager, next, jumper"},on:{"current-change":t.handleCurrentChange,"size-change":t.handleSizeChange}})],1)],1)]),i("div",{staticClass:"button-box"},[i("el-button",{staticClass:"cancel-button",on:{click:t.close}},[t._v("Cancel")]),i("el-button",{staticClass:"confirm-button",on:{click:t.confirm}},[t._v("Confirm")])],1)])},x=[],j=i("2f69"),P={inject:["reload"],name:"BindingDialog",data(){return{minusDisabled:!1,totalPrice:0,selectNumber:0,dialogVisible:!1,bounds:[{label:"Bound",val:!0},{label:"Unbound",val:!1}],query:{keyword:"",current:1,size:100,category1:1,isBindFittings:null,total:100},selectedItems:[],jewelryList:[]}},props:{value:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},computed:{selected(){return this.selectedItems.length}},watch:{value:{handler(t){this.dialogVisible=t},immediate:!0},dialogVisible:{handler(t){this.$emit("input",t)},immediate:!0}},mounted(){this.getPage()},methods:{handleSelectionChange(t){this.selectedItems=t},close(){this.dialogVisible=!1},async confirm(){let t=this.data.fittingCustomJewelryIds;const e=[];this.selectedItems&&this.selectedItems.forEach(t=>{e.push(t.id)}),t.push(...e),t=[...new Set(t)];try{const e=await Object(n["c"])({id:this.data.id,fittingCustomJewelryIds:t});200===e.code?this.$message.success("Binding successful"):this.$message.error(e.msg)}catch(i){this.$message.error(i.message)}this.dialogVisible=!1,setTimeout(this.reload,100)},handleSizeChange(t){this.query.size=t,this.query.current=1,this.getPage()},handleCurrentChange(t){this.query.current=t,this.getPage()},async getPage(){const t={current:this.query.current,size:this.query.size,keyword:this.query.keyword,fittingsId:this.data.id,labelIds:this.query.labelIds,isBindFittings:this.query.isBindFittings},e=[];try{const i=await Object(j["k"])(t);if(200!==i.code)return;this.jewelryList=i.data.records,this.query.total=i.data.total,this.query.size=i.data.size,this.query.current=i.data.current;let s=this.query.size*(this.query.current-1)+1;this.jewelryList&&this.jewelryList.forEach(t=>{t.no=s,s++,t.bindCurrentFittings&&e.push(t)})}catch(i){this.$message.error(i.message)}finally{e.length>0&&this.$nextTick(()=>{e.forEach(t=>{this.$refs.table.toggleRowSelection(t,!0)})})}}}},$=P,q=(i("e04b"),Object(d["a"])($,I,x,!1,null,"1c4c5b04",null)),O=q.exports,V=i("5a0d"),B=i("de73"),R=i("7a6d"),L={name:"MyCustomAccessories",components:{DeleteDialog:h,ReplenishInventoryDialog:y,BindingDialog:O,RemarksDialog:_,Detail:V["a"],PaypalDialog:B["a"],ImgListDialog:R["a"]},data(){return{orderId:null,showPaypal:!1,showDetail:!1,query:{current:1,size:10,total:10},showDeleteDialog:!1,showReplenishInventoryDialog:!1,showBindingDialog:!1,showRemarksDialog:!1,dataObject:{},myAccessoryList:[],showImgList:!1,currentImgList:[]}},watch:{showDetail:{handler(t){t||(document.body.style.overflow="auto")}}},mounted(){this.getPage(),this.orderToReplenishInventory()},methods:{showImgListClick(t){t&&t.length>0&&(this.showImgList=!0,this.currentImgList=t)},async onSwitch(t){const e=t.id,i=t.useForAllOrder,s=await Object(n["i"])({id:e,enable:i});200!==s.code&&this.$message.error(s.msg)},updateData(t){const e=t.id;this.myAccessoryList.forEach(i=>{i.id===e&&(i=t)})},close(){this.showDetail=!1,this.$refs.detailPage.$destroy()},openDetailClick(t){this.setClickItemData(t),this.$store.commit("aopCustomize/setClosePage",this.close),this.showDetail=!0},async getPage(){const t=await Object(n["e"])({current:this.query.current,size:this.query.size});if(200!==t.code)return;const e=t.data;this.query.current=e.current,this.query.total=e.total,this.query.size=e.size,this.myAccessoryList=e.records,this.myAccessoryList.forEach(t=>{t.showInventory=1!==t.stockingStrategy}),document.body.style.overflow="auto"},async orderToReplenishInventory(){const t=JSON.parse(localStorage.getItem("toReplenishInventoryObject"));if(!t)return;const e=t.blankProductId,i=t.customProductId;let s=1;const a=await Object(n["e"])({current:1,size:s});s=a.data.total;const l=await Object(n["e"])({current:1,size:s}),o=l.data.records;for(let n=0;n{this.showReplenishClick(t)},100);break}}localStorage.removeItem("toReplenishInventoryObject")},showReplenishClick(t){this.setClickItemData(t),this.showReplenishInventoryDialog=!0},showBindingDialogClick(t){this.setClickItemData(t),this.showBindingDialog=!0},showRemarksDialogClick(t){this.setClickItemData(t),this.showRemarksDialog=!0},showDeleteDialogClick(t){this.setClickItemData(t),this.showDeleteDialog=!0},handleCurrentChange(t){this.query.current=t,this.getPage()},handleSizeChange(t){this.query.current=1,this.query.size=t,this.getPage()},setClickItemData(t){this.$store.commit("aopCustomize/setCustomProductId",t.id),this.dataObject=t},showPaypalDialog(){this.showPaypal=!0},async createOrderFn(t,e){if(0!==e)try{const i=await Object(n["a"])({customProductId:t.id,num:e});200===i.code?(this.orderId=i.data.orderId,this.showPaypalDialog()):this.$message.error(i.msg)}catch(i){this.$message.error(i.message)}}}},z=L,S=(i("e68c"),i("76d0"),Object(d["a"])(z,s,a,!1,null,"737891e0",null));e["default"]=S.exports},"538b":function(t,e,i){"use strict";i("e358")},"5a0d":function(t,e,i){"use strict";var s=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"detail-container"},[s("div",{staticClass:"header"},[s("div",{staticClass:"back",on:{click:t.closePage}},[s("img",{staticClass:"back-icon",attrs:{alt:"back-icon",src:i("ccb8")}}),s("span",{staticClass:"back-title"},[t._v("Back")])])]),s("ShippingPage")],1)},a=[],l=i("2f62"),o=i("01ad"),n={name:"Detail",components:{ShippingPage:o["a"]},data(){return{}},computed:{...Object(l["c"])("aopCustomize",["closePage"])},mounted(){document.body.style.overflow="hidden"}},c=n,r=(i("82c7"),i("2877")),d=Object(r["a"])(c,s,a,!1,null,"33c9312d",null);e["a"]=d.exports},"76d0":function(t,e,i){"use strict";i("460b")},"7a6d":function(t,e,i){"use strict";var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[t.isMobile?t._e():i("el-dialog",{attrs:{visible:t.dialogVisible,top:"5vh",width:"40%","append-to-body":t.appendToBody},on:{"update:visible":function(e){t.dialogVisible=e},close:t.close}},[i("ListBox",{attrs:{"img-list":t.imgList}})],1),t.isMobile?i("dialog-h5",{attrs:{visible:t.dialogVisible},on:{"update:visible":function(e){t.dialogVisible=e},close:t.close}},[i("ListBox",{attrs:{"img-list":t.imgList}})],1):t._e()],1)},a=[],l=i("c3a1"),o=i("5b9c"),n={name:"ImgListDialog",components:{ListBox:l["a"],DialogH5:o["a"]},props:{value:{type:Boolean,default:!1},imgList:{type:Array,default:()=>[]},appendToBody:{type:Boolean,default:!0},isMobile:{type:Boolean,default:!1}},data(){return{currentIndex:0,dialogVisible:!1}},watch:{value(t){t&&(this.dialogVisible=!0)},dialogVisible(t){this.$emit("input",t)}},methods:{close(){this.dialogVisible=!1}}},c=n,r=i("2877"),d=Object(r["a"])(c,s,a,!1,null,"3475e908",null);e["a"]=d.exports},"82c7":function(t,e,i){"use strict";i("8719")},8719:function(t,e,i){},"9a7f8":function(t,e,i){},cdf5:function(t,e,i){"use strict";i("1c40")},d6b9:function(t,e,i){"use strict";i("e64c")},e04b:function(t,e,i){"use strict";i("9a7f8")},e358:function(t,e,i){},e64c:function(t,e,i){},e68c:function(t,e,i){"use strict";i("1bfc")}}]);