(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4e1cdc93"],{"0145c":function(t,e,s){"use strict";s.d(e,"e",(function(){return i})),s.d(e,"f",(function(){return o})),s.d(e,"h",(function(){return r})),s.d(e,"a",(function(){return n})),s.d(e,"d",(function(){return u})),s.d(e,"b",(function(){return c})),s.d(e,"c",(function(){return l})),s.d(e,"i",(function(){return d})),s.d(e,"g",(function(){return h}));var a=s("66a5");const i=t=>Object(a["a"])({url:"/shopapi/custom/product/fittings/page",method:"post",data:t}),o=t=>Object(a["a"])({url:"/shopapi/custom/product/fittings/detail",method:"post",data:t}),r=t=>Object(a["a"])({url:"/shopapi/custom/product/fittings/modify",method:"post",data:t}),n=t=>Object(a["a"])({url:"/shopapi/custom/product/fittings/inventory_order/create",method:"post",data:t}),u=t=>Object(a["a"])({url:"/shopapi/custom/product/fittings/remark/edit",method:"post",data:t}),c=t=>Object(a["a"])({url:"/shopapi/custom/product/fittings/remove",method:"post",data:t}),l=t=>Object(a["a"])({url:"/shopapi/custom/product/fittings/bindJewelery/edit",method:"post",data:t}),d=t=>Object(a["a"])({url:"/shopapi/custom/product/fittings/useForAllOrder/edit",method:"post",data:t}),h=t=>Object(a["a"])({url:"/shopapi/custom/product/fittings/bind_fittings_list",method:"post",data:t})},"01ad":function(t,e,s){"use strict";var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"shipping-container default-scrollbar"},[s("MockUps",{model:{value:t.imageList,callback:function(e){t.imageList=e},expression:"imageList"}}),s("ProductDescription",{model:{value:t.inputData,callback:function(e){t.inputData=e},expression:"inputData"}}),t.showLinkComponent?s("LinkToDistributedJewelry",{model:{value:t.fittingCustomJewelryIds,callback:function(e){t.fittingCustomJewelryIds=e},expression:"fittingCustomJewelryIds"}}):t._e(),s("FooterButton")],1)},i=[],o=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"mock-up-container"},[s("div",{staticClass:"image-list-area"},[s("div",{staticClass:"big-image"},[s("span",{staticClass:"big-image-title"},[t._v("Mockups")]),s("ImageItem",{staticStyle:{"margin-top":"10px"},attrs:{url:t.bigImageUrl,"is-big-image":!0}})],1),s("div",{staticClass:"list"},[s("span",{staticClass:"list-title"},[t._v("Title image and mockup views")]),s("div",{staticClass:"image-list default-scrollbar"},t._l(t.value,(function(e){return s("ImageItem",{key:e.id,attrs:{url:e.imageUrl,"show-mask":!e.showOnServer,"is-big-image":!1},on:{changeMainShowImage:function(s){return t.changeMainShowImage(e)},showMaskClick:function(s){return t.showMaskClick(e)}}})})),1)])])])},r=[],n=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"image"},[t.showMask&&!t.isBigImage?s("div",{staticClass:"mask"},[t.showMask&&!t.isBigImage?s("span",{staticClass:"mask-text"},[t._v(" Not visible in the store ")]):t._e()]):t._e(),s("img",{class:t.isBigImage?"image-area-big":"image-area-small",attrs:{src:t.url},on:{click:t.changeMainShowImage}})])},u=[],c={name:"ImageItem",props:{url:{type:String,default:""},isBigImage:{type:Boolean,default:!1},showMask:{type:Boolean,default:!1}},methods:{showMaskClick(){this.$emit("showMaskClick")},changeMainShowImage(){this.isBigImage||this.$emit("changeMainShowImage")}}},l=c,d=(s("1c70"),s("2877")),h=Object(d["a"])(l,n,u,!1,null,null,null),p=h.exports,m={name:"MockUps",components:{ImageItem:p},props:{value:{type:Array,default:()=>[]}},data(){return{bigImageUrl:"",hasInit:!1}},watch:{value:{handler(t){(t||this.hasInit)&&(this.hasInit=!0,this.bigImageUrl=t[0].imageUrl)}}},methods:{changeMainShowImage(t){this.bigImageUrl=t.imageUrl,this.value.forEach(t=>{t.bigImage=!1}),t.bigImage=!0},showMaskClick(t){t.showOnServer=!t.showOnServer}}},g=m,b=(s("ba5b"),Object(d["a"])(g,o,r,!1,null,null,null)),f=b.exports,v=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"description-container"},[s("div",{staticClass:"description-body"},[s("div",{staticClass:"title"},[t._v("Product Name")]),s("el-input",{staticClass:"description-title-input",attrs:{placeholder:"Retro Fashion Tiger Eye Stone Beads With O - Shaped Chain Design Hand Jewelry Necklace Set",required:!0,clearable:""},model:{value:t.value.productName,callback:function(e){t.$set(t.value,"productName",e)},expression:"value.productName"}}),s("div",{staticClass:"description-title"},[t._v("Remark")]),s("el-input",{staticClass:"description-title-input",attrs:{clearable:""},model:{value:t.value.remark,callback:function(e){t.$set(t.value,"remark",e)},expression:"value.remark"}})],1)])},k=[],y={name:"ProductDescription",props:{value:{type:Object,default:()=>({})}},data(){return{productName:"",remark:""}},watch:{value:{handler(t){t&&(this.productName=t.productName,this.remark=t.remark)}}},methods:{}},C=y,w=(s("a585"),Object(d["a"])(C,v,k,!1,null,"61d6d060",null)),I=w.exports,O=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"container"},[s("div",{staticClass:"body"},[t._m(0),s("div",{staticClass:"row"},[s("div",{staticClass:"status-box"},[s("div",{staticClass:"status"},[t._v("Product Status")]),s("el-select",{staticClass:"selection",attrs:{placeholder:"All",clearable:""},on:{change:t.getPage},model:{value:t.query.status,callback:function(e){t.$set(t.query,"status",e)},expression:"query.status"}},t._l(t.statusOptions,(function(t){return s("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),s("div",{staticClass:"search-input-box"},[s("el-input",{attrs:{placeholder:"Template name, product serial number","suffix-icon":"el-icon-search"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.search.apply(null,arguments)}},model:{value:t.query.keyword,callback:function(e){t.$set(t.query,"keyword",e)},expression:"query.keyword"}})],1)]),s("div",{staticClass:"row"},t._l(t.tags,(function(e){return s("el-tag",{key:e.id,style:{backgroundColor:-1!==t.selectedTags.indexOf(e.id)?"#409EFF":"#F2F2F2"},on:{click:function(s){return t.tagClick(e.id)}}},[s("div",{staticClass:"tag-label"},[t._v(t._s(e.name))])])})),1),s("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"table",staticClass:"table",attrs:{id:"table",data:t.tableData},on:{"selection-change":t.handleSelectionChange}},[s("el-table-column",{attrs:{type:"selection",width:t.selectionWidth,align:"center"}}),s("el-table-column",{attrs:{label:"Product",width:t.productWidth},scopedSlots:t._u([{key:"default",fn:function(e){return[s("div",{staticClass:"product"},[s("img",{staticClass:"product-img",attrs:{src:e.row.mainImageUrl,alt:"Product Image"}}),s("div",{staticClass:"product-name"},[t._v(t._s(e.row.title))])])]}}])}),s("el-table-column",{attrs:{prop:"skuInfo",label:"Sku",width:t.skuWidth}}),s("el-table-column",{attrs:{label:"Status",width:t.statusWidth},scopedSlots:t._u([{key:"default",fn:function(e){return["Publish"===e.row.status?s("div",{staticClass:"publish-box"},[t._v(" "+t._s(e.row.status)+" ")]):t._e(),"Scheduled"===e.row.status?s("div",{staticClass:"scheduled-box"},[t._v(" "+t._s(e.row.status)+" ")]):t._e(),"Draft"===e.row.status?s("div",{staticClass:"draft-box"},[t._v(" "+t._s(e.row.status)+" ")]):t._e()]}}])})],1),s("el-pagination",{staticStyle:{"margin-top":"15px"},attrs:{background:"",layout:"total, sizes, prev, pager, next, jumper","page-sizes":[10,20,30,40,50,100],"current-page":t.query.current,"page-size":t.query.size,total:t.query.total,align:"right"},on:{"update:currentPage":function(e){return t.$set(t.query,"current",e)},"update:current-page":function(e){return t.$set(t.query,"current",e)},"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)])},j=[function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"row"},[s("div",{staticClass:"title"},[t._v("Link to distributed jewelry")])])}],_=s("6d68"),P=s("2f69"),S=s("2f62"),x={name:"LinkToDistributedJewelry",props:{fittingCustomJewelryIds:{type:Array,default:()=>[]}},data(){return{loading:!1,mockupCheckbox:!1,selectedTags:[],query:{current:1,size:100,total:10,status:null,keyword:"",isBindFittings:null,labelIds:[]},statusOptions:[{value:1,label:"Draft"},{value:2,label:"Publish"}],tags:[],tableData:[],statuses:{1:"Draft",2:"Publish",97:"Scheduled",99:"Scheduled"},selectionWidth:50,selectedIds:[]}},computed:{...Object(S["c"])("aopCustomize",["customProductId"]),tableWidth(){const t=document.getElementById("table");return t?t.offsetWidth-this.selectionWidth:0},productWidth(){return.5*this.tableWidth},skuWidth(){return.25*this.tableWidth},statusWidth(){return.25*this.tableWidth}},watch:{selectedIds:{handler(t){this.$emit("input",t)}},selectedTags:{handler(t){this.query.labelIds=t,this.getPage()}}},mounted(){this.getTags(),this.getPage()},methods:{tagClick(t){-1!==this.selectedTags.indexOf(t)?this.selectedTags=this.selectedTags.filter(e=>e!==t):this.selectedTags.push(t)},check(){this.mockupCheckbox=!this.mockupCheckbox},handleSizeChange(t){this.query.current=1,this.query.size=t,this.getPage()},handleCurrentChange(t){this.query.current=t,this.getPage()},handleSelectionChange(t){const e=[];t.forEach(t=>{e.push(t.id)}),this.selectedIds=e},search(){this.query.current=1,this.getPage()},async getTags(){const t=await Object(_["b"])();200===t.code&&(this.tags=t.data.records)},async getPage(){if(!this.customProductId)return;const t={current:this.query.current,size:this.query.size,keyword:this.query.keyword,fittingsId:this.customProductId,labelIds:this.query.labelIds};null!==this.query.status&&(t.status=this.query.status),null!==this.query.isBindFittings&&(t.isBindFittings=this.query.isBindFittings);const e=[];try{this.loading=!0;const s=await Object(P["k"])(t);if(200!==s.code)return;this.tableData=s.data.records,this.query.total=s.data.total,this.query.size=s.data.size,this.query.current=s.data.current,this.tableData&&this.tableData.length>0&&this.tableData.forEach(t=>{t.status=this.statuses[t.status];let s="";t.option1Num&&(s+=t.option1Num+" "+t.option1Name),t.option2Num&&(s+=" * "+t.option2Num+" "+t.option2Name),t.option3Num&&(s+=" * "+t.option3Num+" "+t.option3Name),t.skuInfo=s,t.bindCurrentFittings&&e.push(t)})}catch(s){this.$message.error(s.message)}finally{this.loading=!1,this.$refs.table.$forceUpdate(),e.length>0&&this.$nextTick(()=>{e.forEach(t=>{this.$refs.table.toggleRowSelection(t,!0)})})}}}},q=x,$=(s("ab13"),Object(d["a"])(q,O,j,!1,null,"ff057df2",null)),D=$.exports,N=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"footer-button-container"},[s("div",{staticClass:"button-box"},[s("div",{staticClass:"button",on:{click:t.cancel}},[s("span",{staticClass:"save-text"},[t._v("Cancel")])]),s("div",{staticClass:"button",on:{click:t.save}},[s("span",{staticClass:"save-text"},[t._v("Save")])])])])},z=[],B={name:"FooterButton",computed:{...Object(S["c"])("aopCustomize",["save","closePage"])},methods:{cancel(){this.closePage()}}},M=B,E=(s("5fc8"),Object(d["a"])(M,N,z,!1,null,null,null)),T=E.exports,F=s("0145c"),L={inject:["reload"],name:"ShippingPage",components:{LinkToDistributedJewelry:D,ProductDescription:I,MockUps:f,FooterButton:T},data(){return{imageList:[],inputData:{productName:"",remark:""},fittingCustomJewelryIds:[],showLinkComponent:!1}},computed:{...Object(S["c"])("aopCustomize",["customProductId","notCustomizable","blankProductId","closePage"]),...Object(S["b"])("user",["getCurrentShop"])},mounted(){this.showLinkComponent=1===this.getCurrentShop.shopType,document.getElementsByClassName("shipping-container")[0].style.overflowY="auto",document.getElementsByClassName("shipping-container")[0].style.overflowX="hidden",this.$store.commit("aopCustomize/setSaveFn",this.save)},beforeDestroy(){document.body.style.overflow="hidden"},created(){this.getDetail()},methods:{async getDetail(){if(this.notCustomizable&&this.blankProductId){const t=await Object(P["d"])({blankProductId:this.blankProductId});if(200!==t.code)return;this.$store.commit("aopCustomize/setCustomProductId",t.data)}if(this.customProductId){const t=await Object(F["f"])({customProductId:this.customProductId});if(200!==t.code)return;this.imageList=t.data.imageList,this.inputData.productName=t.data.title,this.inputData.remark=t.data.remark}},async save(){const t=[];this.imageList.forEach(e=>{const s={id:e.id,showOnServer:e.showOnServer};e.bigImage?t.unshift(s):t.push(s)});const e={id:this.customProductId,title:this.inputData.productName,remark:this.inputData.remark,fittingCustomJewelryIds:this.fittingCustomJewelryIds,imageList:t};try{const t=await Object(F["h"])(e);200===t.code?(this.$message.success("save success"),setTimeout(()=>{this.reload()},200)):this.$message.error(t.msg)}catch(s){this.$message.error(s.message)}finally{document.body.style.overflow="auto",this.$store.commit("aopCustomize/setStep",1),this.$store.commit("aopCustomize/setCustomProductId",null),this.$store.commit("aopCustomize/setNotCustomizable",!1),this.$store.commit("aopCustomize/setBlankProductId",null),this.isOpen=!1,this.callNewPage("/MyCustomAccessories")}}}},W=L,J=(s("2320"),Object(d["a"])(W,a,i,!1,null,null,null));e["a"]=J.exports},"0da5":function(t,e,s){},"1c70":function(t,e,s){"use strict";s("ee1f")},2320:function(t,e,s){"use strict";s("0da5")},"2f69":function(t,e,s){"use strict";s.d(e,"k",(function(){return i})),s.d(e,"c",(function(){return o})),s.d(e,"b",(function(){return r})),s.d(e,"h",(function(){return n})),s.d(e,"i",(function(){return u})),s.d(e,"n",(function(){return c})),s.d(e,"o",(function(){return l})),s.d(e,"l",(function(){return d})),s.d(e,"m",(function(){return h})),s.d(e,"q",(function(){return p})),s.d(e,"g",(function(){return m})),s.d(e,"r",(function(){return g})),s.d(e,"a",(function(){return b})),s.d(e,"j",(function(){return f})),s.d(e,"p",(function(){return v})),s.d(e,"e",(function(){return k})),s.d(e,"f",(function(){return y})),s.d(e,"d",(function(){return C}));var a=s("66a5");const i=t=>Object(a["a"])({url:"/shopapi/custom/product/page",method:"post",data:t}),o=(t,e={})=>Object(a["a"])({url:"/shopapi/custom/product/detail/"+t,method:"post",data:e}),r=()=>Object(a["a"])({url:"/shopapi/custom/product/customCollectionList",method:"post"}),n=t=>Object(a["a"])({url:"/shopapi/custom/product/modify",method:"post",data:t}),u=t=>Object(a["a"])({url:"/shopapi/custom/product/modifys",method:"post",data:t}),c=t=>Object(a["a"])({url:"/shopapi/custom/product/publishStatus",method:"post",data:t}),l=t=>Object(a["a"])({url:"/shopapi/custom/product/publishStatuses",method:"post",data:t}),d=t=>Object(a["a"])({url:"/shopapi/custom/product/publish",method:"post",data:t}),h=t=>Object(a["a"])({url:"/shopapi/custom/product/publishes",method:"post",data:t}),p=t=>Object(a["a"])({url:"/shopapi/custom/product/remove/"+t,method:"post"}),m=t=>Object(a["a"])({url:"/shopapi/custom/product/hideOnServer/"+t,method:"post"}),g=t=>Object(a["a"])({url:"/shopapi/custom/product/showOnServer/"+t,method:"post"}),b=t=>Object(a["a"])({url:"/shopapi/custom/product/cancel/"+t,method:"post"}),f=t=>Object(a["a"])({url:"/shopapi/custom/product/modifys",method:"post",data:t}),v=t=>Object(a["a"])({url:"/shopapi/custom/product/publishes",method:"post",data:t}),k=t=>Object(a["a"])({url:"/shopapi/custom/product/fittings/modifys",method:"post",data:t}),y=t=>Object(a["a"])({url:"/shopapi/custom/product/greeting_card/modifys",method:"post",data:t}),C=t=>Object(a["a"])({url:"/shopapi/custom/product/dropship",method:"post",data:t})},"47d0":function(t,e,s){},"5a6e":function(t,e,s){},"5f29":function(t,e,s){},"5fc8":function(t,e,s){"use strict";s("5f29")},"6d68":function(t,e,s){"use strict";s.d(e,"c",(function(){return i})),s.d(e,"d",(function(){return o})),s.d(e,"a",(function(){return r})),s.d(e,"b",(function(){return n}));var a=s("66a5");const i=t=>Object(a["a"])({url:"/shopapi/blankProduct/page",method:"post",data:t}),o=t=>Object(a["a"])({url:"/shopapi/blankProduct/type/list",method:"post",data:t}),r=t=>Object(a["a"])({url:"/shopapi/blankProduct/detail",method:"post",data:t}),n=t=>Object(a["a"])({url:"/shopapi/blankProduct/label/list",method:"post",data:t})},"8aba":function(t,e,s){},a585:function(t,e,s){"use strict";s("47d0")},ab13:function(t,e,s){"use strict";s("8aba")},ba5b:function(t,e,s){"use strict";s("5a6e")},ccb8:function(t,e,s){t.exports=s.p+"static/img/back.bd2c025c.svg"},ee1f:function(t,e,s){}}]);