(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-daaebf38"],{"01ae":function(t,e,i){"use strict";const a={INPUT:{text:"普通输入框",value:1},TEXTAREA:{text:"多行输入框",value:2}};e["a"]=a},1802:function(t,e,i){},"2da9":function(t,e,i){"use strict";var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("el-table",{ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:t.cartList,"tooltip-effect":"dark",stripe:""},on:{"selection-change":t.handleSelectionChange}},[t.showSelection?i("el-table-column",{attrs:{type:"selection",width:"55"}}):t._e(),i("el-table-column",{attrs:{label:"Product"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("div",{staticClass:"product"},[i("div",{staticClass:"product-info"},[i("div",{staticClass:"product-item"},[i("hover-img",{staticClass:"product-item-image",attrs:{"main-img":t.showImageUrl(e.row),"hover-img":e.row.suspendImageUrl||e.row.mainImageUrl}}),i("div",{staticClass:"product-item-name"},[i("div",{staticClass:"product-item-title"},[t._v(t._s(e.row.blankProductName))]),e.row.option1Name?i("option-info",{staticClass:"product-item-attr",attrs:{"option-name":e.row.option1Name,"option-value":e.row.option1Value}}):t._e(),e.row.option2Name?i("option-info",{staticClass:"product-item-attr",attrs:{"option-name":e.row.option2Name,"option-value":e.row.option2Value}}):t._e(),e.row.option3Name?i("option-info",{staticClass:"product-item-attr",attrs:{"option-name":e.row.option2Name,"option-value":e.row.option3Value}}):t._e()],1)],1),i("div",{staticClass:"product-price"},[e.row.discountPrice!==e.row.price?i("div",[t._v(" Price: $"+t._s(e.row.discountPrice)+" "),i("span",{staticClass:"line-through"},[t._v("$"+t._s(e.row.price))])]):i("div",[t._v(" Price: $"+t._s(e.row.price)+" ")])]),e.row.designInfo&&e.row.designInfo.printAreaList&&e.row.designInfo.printAreaList.length?i("div",{staticStyle:{width:"100%"}},t._l(e.row.designInfo.printAreaList,(function(e){return i("div",{key:e.printAreaId,staticClass:"print-area-list"},[i("div",[i("span",{staticStyle:{color:"red"}},[t._v(t._s(e.name)+":")]),i("span",{staticClass:"print-area-content"},[t._v(t._s(e.content))])]),e.fontName?i("div",{staticClass:"product-info-fontname"},[t._v(" font: "),i("span",{style:{fontFamily:e.fontUid}},[t._v(t._s(e.fontName))])]):t._e()])})),0):t._e()])])]}}])}),i("el-table-column",{attrs:{label:"Package",width:t.packageColumnWidth},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.blankFittingsId?i("div",{staticClass:"product-item"},[i("el-image",{staticClass:"product-item-image",attrs:{src:e.row.blankFittingsShowImageUrls[0],"preview-src-list":e.row.blankFittingsShowImageUrls}}),i("div",{staticClass:"product-item-name"},[i("div",{staticClass:"product-item-title"},[t._v(t._s(e.row.blankFittingsName))])])],1):t._e(),e.row.blankFittingsId?i("div",{staticClass:"product-price"},[t._v(" Price: $"+t._s(e.row.fittingsPrice)+" ")]):t._e()]}}])}),i("el-table-column",{attrs:{label:"Greeting Card",width:t.greetingCardColumnWidth},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.greetingCardDesignInfo?i("div",{staticClass:"product"},[i("div",{staticClass:"product-info"},[i("div",{staticClass:"product-item"},[i("el-image",{staticClass:"product-item-image",attrs:{src:e.row.greetingCardDesignInfo.blankGreetingCardShowImageUrls[0],"preview-src-list":e.row.greetingCardDesignInfo.blankGreetingCardShowImageUrls}}),i("div",{staticClass:"product-item-name"},[i("div",{staticClass:"product-item-title"},[t._v(t._s(e.row.greetingCardDesignInfo.blankGreetingCardName))])])],1),i("div",{staticClass:"product-price"},[t._v(" Price: $"+t._s(e.row.blankGreetingCardPrice)+" ")]),e.row.greetingCardDesignInfo.printAreas&&e.row.greetingCardDesignInfo.printAreas.length?i("div",{staticStyle:{width:"100%"}},t._l(e.row.greetingCardDesignInfo.printAreas,(function(a,r){return i("div",{key:e.row.id+a.name+r,staticClass:"print-area-list"},[i("div",[i("span",{staticStyle:{color:"#999999"}},[t._v(t._s(a.name)+":")]),i("span",{staticClass:"print-area-content"},[t._v(t._s(a.content))])]),i("div",{staticClass:"product-info-fontname"},[i("i",{staticClass:"el-icon-view",staticStyle:{cursor:"pointer"},on:{click:function(i){return t.toEditGreetingCardPrintAreas(e.$index)}}})])])})),0):t._e()])]):t._e()]}}])}),i("el-table-column",{attrs:{label:"Quantity",align:"center",width:t.quantityColumnWidth},scopedSlots:t._u([{key:"default",fn:function(e){return[t.editQuantity?i("el-input-number",{attrs:{min:1,max:9999},on:{change:function(i){return t.handleCartItemNumChange(e.row)}},model:{value:e.row.quantity,callback:function(i){t.$set(e.row,"quantity",i)},expression:"scope.row.quantity"}}):i("span",[t._v(t._s(e.row.quantity))])]}}])}),i("el-table-column",{attrs:{label:"Total($)",align:"center",width:t.totalColumnWidth},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(t._f("MoneyFormat")(e.row.quantity*(e.row.discountPrice+e.row.fittingsPrice+e.row.blankGreetingCardPrice)))+" ")]}}])})],1),i("GreetingCardPrintAreaEditDialog",{ref:"GreetingCardPrintAreaEditDialog",on:{save:t.saveGreetingCardPrintAreas}})],1)},r=[],n=i("f8d6"),s=i("9504"),o=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("div",{staticClass:"fc-999 font12"},[t._v(" "+t._s(t.optionName)+":"+t._s(t.optionValue)+" ")])])},l=[],c={name:"OptionInfo",props:{optionName:{type:String,default:null},optionValue:{type:String,default:()=>{}}}},d=c,u=(i("f600"),i("2877")),p=Object(u["a"])(d,o,l,!1,null,"01a1e64c",null),m=p.exports,g=i("2f62"),h=i("b492"),f={name:"CartTable",components:{OptionInfo:m,GreetingCardPrintAreaEditDialog:s["a"],HoverImg:h["a"]},props:{cartList:{type:Array,default:()=>[]},showSelection:{type:Boolean,default:!0},editQuantity:{type:Boolean,default:!0}},data(){return{editGreetingCardPrintAreaItemIndex:null}},computed:{...Object(g["b"])("app",{clientWidth:"clientWidth"}),packageColumnWidth(){return this.getColumnWidth(300)},greetingCardColumnWidth(){return this.getColumnWidth(300)},quantityColumnWidth(){return this.getColumnWidth(200)},totalColumnWidth(){return this.getColumnWidth(150)}},methods:{handleCartItemNumChange(t){var e={};e.id=t.id,e.quantity=t.quantity,Object(n["e"])(e)},handleSelectionChange(t){this.$emit("selection-change",t)},getColumnWidth(t){return this.clientWidth/1920*t},showImageUrl(t){return t.designInfo&&t.designInfo.knifeList&&t.designInfo.knifeList.length&&t.designInfo.knifeList[0].effectImageFileUrl||t.mainImageUrl},showImagePreviewUrls(t){var e=[];if(t.designInfo&&t.designInfo.knifeList&&t.designInfo.knifeList.length)for(const i of t.designInfo.knifeList)i.effectImageFileUrl&&e.push(i.effectImageFileUrl);return e.length||e.push(t.mainImageUrl),e},toEditGreetingCardPrintAreas(t){this.editGreetingCardPrintAreaItemIndex=t;var e=this.cartList[this.editGreetingCardPrintAreaItemIndex];this.$refs.GreetingCardPrintAreaEditDialog.show({printAreas:e.greetingCardDesignInfo.printAreas})},saveGreetingCardPrintAreas(t){var e=this.cartList[this.editGreetingCardPrintAreaItemIndex];e.greetingCardDesignInfo.printAreas=t;var i={};i.id=e.id,i.printAreas=t,Object(n["f"])(i)}}},C=f,v=(i("c6e4"),Object(u["a"])(C,a,r,!1,null,"61013716",null));e["a"]=v.exports},3063:function(t,e,i){},"686c":function(t,e,i){"use strict";i("1802")},"8d40":function(t,e,i){"use strict";i.r(e);var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"page default-main"},[i("div",{staticClass:"card list"},[i("div",{staticClass:"list-top"},[i("div",{staticClass:"list-top-item"},[i("el-input",{staticStyle:{width:"400px"},attrs:{placeholder:"Product name or product ID"},on:{change:t.reloadCartList},model:{value:t.query.keyword,callback:function(e){t.$set(t.query,"keyword",e)},expression:"query.keyword"}}),i("el-button",{staticClass:"list-top-button",attrs:{disabled:0===t.selectCarts.length},on:{click:t.bulkDeleteCartItem}},[t._v("Bulk delete")])],1),i("div",{staticClass:"list-top-item list-top-right"},[t.selectCarts&&t.selectCarts.length?i("div",{staticClass:"total-price"},[t._v("Total Price: $"+t._s(t.selectCartsTotalPrice))]):t._e(),i("el-button",{staticClass:"list-top-button",attrs:{disabled:0===t.selectCarts.length,type:"primary"},on:{click:t.onCheckout}},[t._v("Check out")])],1)]),i("cart-table",{attrs:{"cart-list":t.cartList},on:{"selection-change":t.handleSelectionChange}}),i("div",{staticClass:"list-bottom"},[i("div",{staticClass:"list-bottom-item"},[i("el-pagination",{attrs:{background:"",layout:"prev, pager, next, sizes","page-sizes":[10,20,30,40],total:t.query.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}}),t.selectCarts.length?i("div",[t._v(" Selected "+t._s(t.selectCarts.length)+" items ")]):t._e()],1),i("div",{staticClass:"list-bottom-item list-bottom-right"},[t.selectCarts&&t.selectCarts.length?i("div",{staticClass:"total-price"},[t._v("Total Price: $"+t._s(t.selectCartsTotalPrice))]):t._e(),i("el-button",{staticClass:"list-bottom-button",attrs:{disabled:0===t.selectCarts.length,type:"primary"},on:{click:t.onCheckout}},[t._v("Check out")])],1)])],1)])},r=[],n=i("f8d6"),s=i("ed08"),o=i("2da9"),l={name:"CartList",components:{CartTable:o["a"]},filters:{statusFilters(t,e){return e.find(e=>e.status===t).label}},data(){return{cartList:[],selectCarts:[],query:{keyword:"",status:"",startDate:"",endDate:"",total:0,current:1,size:10}}},computed:{selectCartsTotalPrice(){var t=0;if(this.selectCarts&&this.selectCarts.length)for(const e of this.selectCarts)t+=e.quantity*(e.discountPrice+e.fittingsPrice+e.blankGreetingCardPrice);return Object(s["d"])(t)},selectCartIds(){var t=[];for(const e of this.selectCarts)t.push(e.id);return t}},created(){this.getCartList()},methods:{async getCartList(){const t=Object.assign({},this.query),e=await Object(n["c"])(t);this.cartList=e.data.records,this.query.total=e.data.total},reloadCartList(){this.query.current=1,this.getCartList()},handleSelectionChange(t){this.selectCarts=t||[]},handleSizeChange(t){this.query.size=t,this.getCartList()},handleCurrentChange(t){this.query.current=t,this.getCartList()},bulkDeleteCartItem(){var t=this;this.$confirm("Are you sure you want to delete these?","Delete?",{confirmButtonText:"Delete",cancelButtonText:"Cancel",type:"warning"}).then(async()=>{t.doCartItemDelete(this.selectCartIds)})},async doCartItemDelete(t){this.loading=!0;try{var e={};e.ids=t,await Object(n["d"])(e),this.reloadCartList()}finally{this.loading=!1}},onCheckout(){this.toCreateOrder(this.selectCartIds)},toCreateOrder(t){this.callNewPage("/CartsConfirmOrder/"+t.join(","))}}},c=l,d=(i("f704"),i("2877")),u=Object(d["a"])(c,a,r,!1,null,"eae3de38",null);e["default"]=u.exports},9504:function(t,e,i){"use strict";var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("el-dialog",{attrs:{visible:t.visible,"append-to-body":t.appendToBody,"close-on-click-modal":!1},on:{"update:visible":function(e){t.visible=e}}},[i("el-form",{attrs:{"label-position":"right","label-width":"150px"}},t._l(t.printAreas,(function(e,a){return i("el-form-item",{key:e.name+a,attrs:{label:e.name}},[i("el-row",{attrs:{gutter:10}},[i("el-col",{attrs:{span:18}},[e.inputType===t.enums.printAreaInputTypeEnum.INPUT.value?i("el-input",{attrs:{"show-word-limit":"",maxlength:e.textNum,disabled:e.disabled},model:{value:e.content,callback:function(i){t.$set(e,"content",i)},expression:"printArea.content"}}):i("el-input",{attrs:{type:"textarea",autosize:{minRows:4,maxRows:4},"show-word-limit":"",maxlength:e.textNum,disabled:e.disabled},model:{value:e.content,callback:function(i){t.$set(e,"content",i)},expression:"printArea.content"}})],1),i("el-col",{attrs:{span:4}},[t.editable?i("i",{staticClass:"el-icon-edit",staticStyle:{cursor:"pointer","font-size":"1.5em"},on:{click:function(t){e.disabled=!e.disabled}}}):t._e()])],1)],1)})),1),i("div",{attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(e){t.visible=!1}}},[t._v("Cancel")]),i("el-button",{attrs:{type:"primary"},on:{click:t.doSave}},[t._v("Save")])],1)],1)},r=[],n=i("01ae"),s={name:"GreetingCardPrintAreaEditDialog",data(){return{enums:{printAreaInputTypeEnum:n["a"]},printAreas:[],visible:!1,appendToBody:!1,editable:!1}},methods:{show({printAreas:t,editable:e=!0,appendToBody:i=!1}){for(const a of t)a.disabled=!0;this.printAreas=JSON.parse(JSON.stringify(t)),this.editable=e,this.appendToBody=i,this.visible=!0},doSave(){this.$emit("save",this.printAreas),this.visible=!1}}},o=s,l=i("2877"),c=Object(l["a"])(o,a,r,!1,null,"59cecfb2",null);e["a"]=c.exports},b492:function(t,e,i){"use strict";var a=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"img-container",on:{mouseenter:function(e){t.isHover=!0},mouseleave:function(e){t.isHover=!1}}},[a("Transition",[a("my-img",t._b({directives:[{name:"show",rawName:"v-show",value:t.isHover&&t.hoverImg,expression:"isHover && hoverImg"}],staticClass:"i-img",attrs:{src:t.hoverImg,"image-style":{height:"100%"},onerror:"this.src='"+i("e803")+"'"}},"my-img",t.$attrs,!1))],1),a("Transition",[a("my-img",t._b({directives:[{name:"show",rawName:"v-show",value:!(t.isHover&&t.hoverImg),expression:"!(isHover && hoverImg)"}],staticClass:"i-img",attrs:{src:t.mainImg,"image-style":{height:"100%"},onerror:"this.src='"+i("e803")+"'"}},"my-img",t.$attrs,!1))],1)],1)},r=[],n={name:"HoverImg",props:{mainImg:{type:String,default:null},hoverImg:{type:String,default:null}},data(){return{isHover:!1}},computed:{imgSrc(){return this.hoverImg&&this.isHover?this.hoverImg:this.mainImg}}},s=n,o=(i("686c"),i("2877")),l=Object(o["a"])(s,a,r,!1,null,"850380da",null);e["a"]=l.exports},c6e4:function(t,e,i){"use strict";i("3063")},cdba:function(t,e,i){},d378:function(t,e,i){},ed08:function(t,e,i){"use strict";i.d(e,"b",(function(){return a})),i.d(e,"a",(function(){return r})),i.d(e,"c",(function(){return n})),i.d(e,"e",(function(){return s})),i.d(e,"d",(function(){return o}));i("b7ef"),i("907a"),i("3c5d"),i("fa9e"),i("77d9");const a=t=>{const e=t.split(","),i=e[0].match(/:(.*?);/)[1],a=atob(e[1]);let r=a.length;const n=new Uint8Array(r);while(r--)n[r]=a.charCodeAt(r);return new Blob([n],{type:i})},r=(t,e)=>(t.lastModifiedDate=new Date,t.name=e,t);function n(t,e){var i=t.split(","),a=i[0].match(/:(.*?);/)[1],r=atob(i[1]),n=r.length,s=new Uint8Array(n);while(n--)s[n]=r.charCodeAt(n);return new File([s],e,{type:a})}async function s(t){return new Promise(e=>{setTimeout(e,t)})}function o(t,e=2){if(isNaN(Number(t)))return t;const i=Number(t).toFixed(e);return Number(i.substring(0,i.toString().length-1))}},f600:function(t,e,i){"use strict";i("d378")},f704:function(t,e,i){"use strict";i("cdba")},f8d6:function(t,e,i){"use strict";i.d(e,"c",(function(){return r})),i.d(e,"a",(function(){return n})),i.d(e,"b",(function(){return s})),i.d(e,"d",(function(){return o})),i.d(e,"e",(function(){return l})),i.d(e,"f",(function(){return c}));var a=i("66a5");const r=t=>Object(a["a"])({url:"/shopapi/cart/list",method:"post",data:t}),n=t=>Object(a["a"])({url:"/shopapi/cart/add",method:"post",data:t}),s=t=>Object(a["a"])({url:"/shopapi/cart/batch_add",method:"post",data:t}),o=t=>Object(a["a"])({url:"/shopapi/cart/remove",method:"post",data:t}),l=t=>Object(a["a"])({url:"/shopapi/cart/update_num",method:"post",data:t}),c=t=>Object(a["a"])({url:"/shopapi/cart/update_greeting_card_print_areas",method:"post",data:t})}}]);