(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7420fc6c"],{"01ae":function(t,e,r){"use strict";const s={INPUT:{text:"普通输入框",value:1},TEXTAREA:{text:"多行输入框",value:2}};e["a"]=s},1802:function(t,e,r){},"2f68":function(t,e,r){"use strict";r("f211")},"329e":function(t,e,r){"use strict";r.d(e,"j",(function(){return a})),r.d(e,"g",(function(){return i})),r.d(e,"a",(function(){return o})),r.d(e,"b",(function(){return n})),r.d(e,"d",(function(){return d})),r.d(e,"e",(function(){return l})),r.d(e,"f",(function(){return c})),r.d(e,"h",(function(){return u})),r.d(e,"i",(function(){return m})),r.d(e,"c",(function(){return p})),r.d(e,"k",(function(){return f})),r.d(e,"l",(function(){return h}));var s=r("66a5");const a=t=>Object(s["a"])({url:"/shopapi/order/page",method:"post",data:t}),i=t=>Object(s["a"])({url:"/shopapi/order/detail",method:"post",data:t}),o=t=>Object(s["a"])({url:"/shopapi/order/price/calculate",method:"post",data:t}),n=t=>Object(s["a"])({url:"/shopapi/order/price/calculateForOrder",method:"post",data:t}),d=t=>Object(s["a"])({url:"/shopapi/order/create",method:"post",data:t}),l=t=>Object(s["a"])({url:"/shopapi/order/create_for_design",method:"post",data:t}),c=t=>Object(s["a"])({url:"/shopapi/order/create_from_cart",method:"post",data:t}),u=t=>Object(s["a"])({url:"/shopapi/order/importOrder",method:"post",data:t}),m=t=>Object(s["a"])({url:"/shopapi/order/onHold",method:"post",data:t}),p=t=>Object(s["a"])({url:"/shopapi/order/cancel",method:"post",data:t}),f=t=>Object(s["a"])({url:"/shopapi/order/shipping/update",method:"post",data:t}),h=t=>Object(s["a"])({url:"/shopapi/order/item/greeting_card/print_areas/update",method:"post",data:t})},"431d":function(t,e,r){},6666:function(t,e,r){"use strict";r("8f5b")},"686c":function(t,e,r){"use strict";r("1802")},"6b29":function(t,e,r){"use strict";r.d(e,"a",(function(){return a})),r.d(e,"c",(function(){return i})),r.d(e,"b",(function(){return o})),r.d(e,"d",(function(){return n}));var s=r("66a5");const a=t=>Object(s["a"])({url:"/shopapi/pay/paypal/create",method:"post",data:t}),i=t=>Object(s["a"])({url:"/shopapi/pay/paypal/execute",method:"post",data:t}),o=t=>Object(s["a"])({url:"/shopapi/pay/paypal/subscription/create/param",method:"post",data:t}),n=t=>Object(s["a"])({url:"/shopapi/pay/paypal/subscription/status",method:"post",data:t})},"6fa3":function(t,e,r){"use strict";r("a7ff")},7057:function(t,e,r){},"7a6d":function(t,e,r){"use strict";var s=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[t.isMobile?t._e():r("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}},[r("ListBox",{attrs:{"img-list":t.imgList}})],1),t.isMobile?r("dialog-h5",{attrs:{visible:t.dialogVisible},on:{"update:visible":function(e){t.dialogVisible=e},close:t.close}},[r("ListBox",{attrs:{"img-list":t.imgList}})],1):t._e()],1)},a=[],i=r("c3a1"),o=r("5b9c"),n={name:"ImgListDialog",components:{ListBox:i["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}}},d=n,l=r("2877"),c=Object(l["a"])(d,s,a,!1,null,"3475e908",null);e["a"]=c.exports},"7b32":function(t,e,r){"use strict"; /*! * paypal-js v5.1.4 (2022-11-29T23:08:21.847Z) * Copyright 2020-present, PayPal, Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ function s(t,e){var r=document.querySelector('script[src="'.concat(t,'"]'));if(null===r)return null;var s=d(t,e),a=r.cloneNode();if(delete a.dataset.uidAuto,Object.keys(a.dataset).length!==Object.keys(s.dataset).length)return null;var i=!0;return Object.keys(a.dataset).forEach((function(t){a.dataset[t]!==s.dataset[t]&&(i=!1)})),i?r:null}function a(t){var e=t.url,r=t.attributes,s=t.onSuccess,a=t.onError,i=d(e,r);i.onerror=a,i.onload=s,document.head.insertBefore(i,document.head.firstElementChild)}function i(t){var e="https://www.paypal.com/sdk/js";t.sdkBaseURL&&(e=t.sdkBaseURL,delete t.sdkBaseURL),l(t);var r=Object.keys(t).filter((function(e){return"undefined"!==typeof t[e]&&null!==t[e]&&""!==t[e]})).reduce((function(e,r){var s=t[r].toString();return"data-"===r.substring(0,5)?e.dataAttributes[r]=s:e.queryParams[r]=s,e}),{queryParams:{},dataAttributes:{}}),s=r.queryParams,a=r.dataAttributes;return{url:"".concat(e,"?").concat(o(s)),dataAttributes:a}}function o(t){var e="";return Object.keys(t).forEach((function(r){0!==e.length&&(e+="&"),e+=r+"="+t[r]})),e}function n(t){var e=t.split("/* Original Error:")[1];return e?e.replace(/\n/g,"").replace("*/","").trim():t}function d(t,e){void 0===e&&(e={});var r=document.createElement("script");return r.src=t,Object.keys(e).forEach((function(t){r.setAttribute(t,e[t]),"data-csp-nonce"===t&&r.setAttribute("nonce",e["data-csp-nonce"])})),r}function l(t){var e=t["merchant-id"],r=t["data-merchant-id"],s="",a="";return Array.isArray(e)?e.length>1?(s="*",a=e.toString()):s=e.toString():"string"===typeof e&&e.length>0?s=e:"string"===typeof r&&r.length>0&&(s="*",a=r),t["merchant-id"]=s,t["data-merchant-id"]=a,t}function c(t,e){if(void 0===e&&(e=m()),f(t,e),"undefined"===typeof window)return e.resolve(null);var r=i(t),a=r.url,o=r.dataAttributes,n=o["data-namespace"]||"paypal",d=p(n);return s(a,o)&&d?e.resolve(d):u({url:a,attributes:o},e).then((function(){var t=p(n);if(t)return t;throw new Error("The window.".concat(n," global variable is not available."))}))}function u(t,e){void 0===e&&(e=m()),f(t,e);var r=t.url,s=t.attributes;if("string"!==typeof r||0===r.length)throw new Error("Invalid url.");if("undefined"!==typeof s&&"object"!==typeof s)throw new Error("Expected attributes to be an object.");return new e((function(t,e){if("undefined"===typeof window)return t();a({url:r,attributes:s,onSuccess:function(){return t()},onError:function(){var t=new Error('The script "'.concat(r,'" failed to load.'));return window.fetch?fetch(r).then((function(r){return 200===r.status&&e(t),r.text()})).then((function(t){var r=n(t);e(new Error(r))})).catch((function(t){e(t)})):e(t)}})}))}function m(){if("undefined"===typeof Promise)throw new Error("Promise is undefined. To resolve the issue, use a Promise polyfill.");return Promise}function p(t){return window[t]}function f(t,e){if("object"!==typeof t||null===t)throw new Error("Expected an options object.");if("undefined"!==typeof e&&"function"!==typeof e)throw new Error("Expected PromisePonyfill to be a function.")}r.d(e,"a",(function(){return c}))},"82bd":function(t,e,r){"use strict";var s=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticStyle:{"text-align":"center"},attrs:{id:"paypal-button-container2"}})},a=[],i=r("7b32"),o=r("6b29"),n={name:"PaypalButton",props:{value:{type:Boolean,default:!1},orderIds:{type:Array,default:()=>[]},payTarget:{type:Number,default:1}},data(){return{paypal:null}},inject:["reload"],watch:{},created(){},mounted(){this.paypalReady()},methods:{close(){const t=document.querySelector("#paypal-button-container2");t.removeChild(t.lastElementChild)},async paypalReady(){var t=this;try{this.paypal=await Object(i["a"])({"client-id":"Ad_2nWfHg-jljIyJdtNKa_8Vt9CzTPSn99w5REF3BFBV13lrA1QUF7HV5uSN3dwfV1Gag-YUMKfQyl2B"})}catch(e){console.error("failed to load the PayPal JS SDK script",e)}this.paypal&&await this.paypal.Buttons({env:"production",commit:!0,style:{size:"large",color:"blue",shape:"rect",label:"buynow"},locale:"en_US",createOrder:function(){return t.ceatePayPals()},onApprove:(e,r)=>{const s={paymentId:e.paymentID,payerId:e.payerID};return t.executePaypals(s)},onError:t=>{console.log(t,"paypal err")}}).render("#paypal-button-container2")},async ceatePayPals(){var t="https://www.artshiney.com";const e={orderIds:this.orderIds,payTarget:this.payTarget,cancelUrl:`${t}/Orders/${this.orderIds[0]}`,returnUrl:`${t}/Orders/${this.orderIds[0]}`},r=await Object(o["a"])(e);return r.data.token},async executePaypals(t){const e=await Object(o["c"])(t);1===e.data.status?(this.$message.success("Pay success"),setTimeout(()=>{this.callNewPage("/Orders/"+this.orderIds[0])},500)):this.$message.success(e.data.failReason)}}},d=n,l=r("2877"),c=Object(l["a"])(d,s,a,!1,null,"5d1437cf",null);e["a"]=c.exports},"8a5a":function(t,e,r){"use strict";r.r(e);var s=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"order-detail default-main"},[r("BackPage",{attrs:{path:"/Orders",text:"Orders"}}),r("div",{staticClass:"order-detail-title"},[t._v("Order Details")]),r("div",{staticClass:"order-detail-handle"},[r("div",{staticClass:"order-detail-handle-left"},[t.orderHisInfos&&t.orderHisInfos.length?r("div",{staticClass:"order-detail-date"},[t._v(t._s(t.orderHisInfos[t.orderHisInfos.length-1].addDate))]):t._e(),r("div",{staticClass:"order-detail-tag"},[t._v(t._s(t._f("statusFilters")(t.orderInfo.status)))])]),r("div",{staticClass:"order-detail-handle-right",on:{click:function(e){t.showHandle=!t.showHandle}}},[r("div",{staticClass:"page-name"},[t._v("More Actions")]),r("i",{staticClass:"el-icon-arrow-down page-icon"}),r("div",{directives:[{name:"show",rawName:"v-show",value:t.showHandle,expression:"showHandle"}],staticClass:"marks"}),r("transition",{attrs:{name:"show-handle"}},[r("div",{directives:[{name:"show",rawName:"v-show",value:t.showHandle,expression:"showHandle"}],staticClass:"handle-box"},[r("div",{class:["handle-item","div-hover",{"no-click":1!==t.orderInfo.status&&2!==t.orderInfo.status}],on:{click:function(e){(1===t.orderInfo.status||2===t.orderInfo.status)&&(t.showEditAddress=!0)}}},[r("i",{staticClass:"handle-item-icon el-icon-truck"}),r("div",{staticClass:"handle-item-label"},[t._v("Edit shipping address")])]),r("div",{class:["handle-item","div-hover",{"no-click":1!==t.orderInfo.status&&2!==t.orderInfo.status&&3!==t.orderInfo.status&&4!==t.orderInfo.status}],on:{click:function(e){(1===t.orderInfo.status||2===t.orderInfo.status||3===t.orderInfo.status||4===t.orderInfo.status)&&t.onHoldOrder()}}},[r("i",{staticClass:"handle-item-icon el-icon-upload2"}),r("div",{staticClass:"handle-item-label"},[t._v("Set On hold")])]),r("div",{class:["handle-item","div-hover",{"no-click":1!==t.orderInfo.status}],on:{click:function(e){1===t.orderInfo.status&&t.cancelOrder()}}},[r("i",{staticClass:"handle-item-icon el-icon-close"}),r("div",{staticClass:"handle-item-label"},[t._v("Cancel order")])])])])],1)]),r("div",{staticClass:"order-detail-main"},[r("div",{staticClass:"order-detail-left"},[r("DetailCount",{staticClass:"order-detail-card",attrs:{"order-info":t.orderInfo}}),r("DetailProduct",{staticClass:"order-detail-card",attrs:{"order-item-infos":t.orderItemInfos,"order-his-infos":t.orderHisInfos}})],1),r("div",{staticClass:"order-detail-right"},[r("DetailAddress",{staticClass:"order-detail-card",attrs:{"order-info":t.orderInfo,"product-title":t.orderItemInfos[0].title}}),r("DetailPrice",{staticClass:"order-detail-card",attrs:{"order-info":t.orderInfo}}),1===t.orderInfo.status?r("el-button",{staticStyle:{width:"100%","margin-top":"32px"},attrs:{type:"primary"},on:{click:function(e){t.showPaypal=!0}}},[t._v("Paypal")]):t._e()],1)]),r("EditAddress",{attrs:{"order-info":t.orderInfo},model:{value:t.showEditAddress,callback:function(e){t.showEditAddress=e},expression:"showEditAddress"}}),r("PaypalDialog",{attrs:{"order-ids":[t.orderId]},model:{value:t.showPaypal,callback:function(e){t.showPaypal=e},expression:"showPaypal"}})],1)},a=[],i=r("329e"),o=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"order-detail-count"},[s("div",{staticClass:"order-detail-count-item"},[s("div",{staticClass:"order-detail-count-item-title"},[t._v("Shine Order No.")]),s("div",{staticClass:"order-detail-count-item-content"},[s("div",{staticClass:"order-detail-count-item-content-num"},[t._v(t._s(t.orderInfo.orderNo))]),s("img",{staticClass:"order-detail-count-item-content-icon div-hover",attrs:{src:r("a75f"),alt:"copy"},on:{click:t.copyOrder}})])]),2!==t.currentShop.shopType?s("div",{staticClass:"order-detail-count-item"},[s("div",{staticClass:"order-detail-count-item-title"},[t._v("Shopify")]),s("div",{staticClass:"order-detail-count-item-content"},[s("div",{staticClass:"order-detail-count-item-content-num"},[t._v(t._s(t.orderInfo.serverOrderNo))])])]):t._e()])},n=[],d=r("2f62"),l={name:"DetailCount",props:{orderInfo:{type:Object,default:()=>({})}},computed:{...Object(d["b"])("user",{currentShop:"getCurrentShop"})},methods:{copyOrder(){const t=this.orderInfo.orderNo,e=document.createElement("input");document.body.appendChild(e),e.value=t,e.select(),document.execCommand("copy"),this.$message.success("Copy success"),document.body.removeChild(e)}}},c=l,u=(r("6fa3"),r("2877")),m=Object(u["a"])(c,o,n,!1,null,"f8640eaa",null),p=m.exports,f=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"detail-product-info"},[r("table",{staticClass:"shipping-rates-table"},[t._m(0),r("tbody",[t._l(t.orderItemInfos,(function(e,s){return[r("tr",{key:e.id},[r("td",{staticClass:"product-item-td"},[r("div",{staticClass:"product-item"},[r("hover-img",{staticClass:"product-item-img div-hover",attrs:{"main-img":e.imageUrl,"hover-img":e.hoverImageUrl||e.imageUrl,alt:"product image"},nativeOn:{click:function(r){return t.showImgList(e.imageList)}}}),r("div",{staticClass:"product-item-content"},[r("div",{staticClass:"product-info-name"},[t._v(t._s(e.title))]),r("div",{staticClass:"product-info-sku"},[t._v("$"+t._s(e.sku))]),t._l(e.printAreas,(function(e,s){return r("div",{key:e.name+s,staticClass:"product-info-printArea"},[r("div",[r("span",{staticStyle:{color:"red"}},[t._v(t._s(e.name)+":")]),r("span",{staticClass:"print-area-content"},[t._v(t._s(e.content))])]),e.fontName?r("div",{staticClass:"product-info-fontname"},[t._v(" font: "),r("span",{style:{fontFamily:e.fontUid}},[t._v(t._s(e.fontName))])]):t._e()])}))],2)],1)]),r("td",{staticClass:"product-item-td"},[t._v(t._s(e.quantity))]),r("td",{staticClass:"product-item-td"},[t._v("$"+t._s(e.goodsTotalPrice))])]),e.fittings?r("tr",{key:e.fittings.id},[r("td",{staticClass:"product-item-td"},[r("div",{staticClass:"product-item"},[e.fittings.showImageUrls&&e.fittings.showImageUrls.length>0?r("my-img",{staticClass:"product-item-img div-hover",attrs:{src:e.fittings.showImageUrls[0],alt:"product image"},nativeOn:{click:function(r){return t.showImgList(e.fittings.showImageUrls)}}}):t._e(),r("div",{staticClass:"product-item-content"},[r("div",{staticClass:"product-info-name"},[t._v(t._s(e.fittings.name))])])],1)]),r("td",{staticClass:"product-item-td"},[t._v(t._s(e.fittings.quantity))]),r("td",{staticClass:"product-item-td"},[t._v("$"+t._s(e.fittings.totalPrice))])]):t._e(),e.blankGreetingCard?r("tr",{key:e.blankGreetingCard.id},[r("td",{staticClass:"product-item-td"},[r("div",{staticClass:"product-item"},[e.blankGreetingCard.showImageUrls&&e.blankGreetingCard.showImageUrls.length>0?r("my-img",{staticClass:"product-item-img div-hover",attrs:{src:e.blankGreetingCard.showImageUrls[0],alt:"product image"},nativeOn:{click:function(r){return t.showImgList(e.blankGreetingCard.showImageUrls)}}}):t._e(),r("div",{staticClass:"product-item-content"},[r("div",{staticClass:"product-info-name"},[t._v(t._s(e.blankGreetingCard.name))]),t._l(e.greetingCardPrintAreas,(function(e,a){return r("div",{key:e.name+a,staticClass:"product-info-printArea"},[r("div",[r("span",{staticStyle:{color:"red"}},[t._v(t._s(e.name)+":")]),r("span",{staticClass:"print-area-content"},[t._v(t._s(e.content))])]),r("div",{staticClass:"product-info-fontname"},[r("i",{staticClass:"el-icon-view",staticStyle:{cursor:"pointer"},on:{click:function(e){return t.toEditGreetingCardPrintAreaInfo(s)}}})])])}))],2)],1)]),r("td",{staticClass:"product-item-td"},[t._v(t._s(e.blankGreetingCard.quantity))]),r("td",{staticClass:"product-item-td"},[t._v("$"+t._s(e.blankGreetingCard.totalPrice))])]):t._e(),r("tr",{key:s+"divider"},[r("td",[r("el-divider")],1),r("td",[r("el-divider")],1),r("td",[r("el-divider")],1)])]}))],2)]),r("el-button",{staticClass:"detail-product-button",on:{click:function(e){t.showHistory=!t.showHistory}}},[t._v("Status details"),r("i",{staticClass:"el-icon-sort",staticStyle:{"margin-left":"20px"}})]),r("transition",{attrs:{name:"show-history"}},[r("div",{directives:[{name:"show",rawName:"v-show",value:t.showHistory,expression:"showHistory"}],staticClass:"order-history"},t._l(t.orderHisInfos,(function(e){return r("div",{key:e.addDate,staticClass:"order-history-item-box"},[r("div",{staticClass:"order-history-line-box"},[r("i",{staticClass:"order-history-line"}),r("i",{staticClass:"order-history-dot"})]),r("div",{staticClass:"order-history-item"},[r("div",{staticClass:"order-history-item-status"},[t._v(t._s(t._f("statusFilters")(e.status)))]),r("div",{staticClass:"order-history-item-date"},[t._v(t._s(e.addDate))]),e.status===t.enums.orderStatusEnum.PARTIALLY_FULFILLED.value&&!t.isAllFulfilled||e.status===t.enums.orderStatusEnum.FULFILLED.value?r("div",{staticClass:"order-history-item-tracking"},t._l(t.trackings,(function(e){return r("div",{key:e.trackingNumber},[t._v(" Package tracking number: "),r("span",{staticClass:"link",on:{click:function(r){return t.openTrackingUrl(e.trackingUrl)}}},[t._v(t._s(e.trackingNumber))])])})),0):t._e()])])})),0)]),r("ImgListDialog",{attrs:{"img-list":t.currentImgList},model:{value:t.showFittings,callback:function(e){t.showFittings=e},expression:"showFittings"}}),r("GreetingCardPrintAreaEditDialog",{ref:"GreetingCardPrintAreaEditDialog",on:{save:t.saveGreetingCardPrintAreaInfo}})],1)},h=[function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("thead",[r("tr",{staticStyle:{"text-align":"left"}},[r("th",{staticClass:"detail-product-info-title"},[t._v("Order details")]),r("th",{staticClass:"detail-product-info-title quantity"},[t._v("QTY")]),r("th",{staticClass:"detail-product-info-title total"},[t._v("PRICE per item")])])])}];const v=t=>{switch(t){case 1:return"Awaiting your payment";case 2:return"Confirmed";case 3:return"In production";case 4:return"Partial Shipment";case 5:return"All Shipments";case 6:return"On hold";case 7:return"Cancelled";default:return""}};var g=r("7a6d"),b=r("b492");const y={PENDING:{text:"未付款",value:1},CONFIRMED:{text:"已付款",value:2},IN_PRODUCTION:{text:"进入生产",value:3},PRODUCT_COMPLETE:{text:"生产完成",value:4},PACKAGE:{text:"打包完成",value:5},OUT_STACK:{text:"出库",value:6},FULFILLED:{text:"已发货",value:7},ON_HOLD:{text:"问题订单",value:98},CANCELLED:{text:"取消",value:99}};var I=y;const C={CANCELLED:{text:"取消",value:7},CONFIRMED:{text:"已付款",value:2},FULFILLED:{text:"全部发货",value:5},IN_PRODUCTION:{text:"进入生产",value:3},ON_HOLD:{text:"问题订单",value:6},PARTIALLY_FULFILLED:{text:"部分发货",value:4},PENDING:{text:"未付款",value:1}};var w=C,_=r("9504"),A={name:"DetailProduct",components:{ImgListDialog:g["a"],GreetingCardPrintAreaEditDialog:_["a"],HoverImg:b["a"]},filters:{statusFilters:v},props:{orderItemInfos:{type:Array,default:()=>[]},orderHisInfos:{type:Array,default:()=>[]}},data(){return{showHistory:!0,showFittings:!1,currentImgList:[],enums:{orderItemStatusEnum:I,orderStatusEnum:w},editGreetingCardPrintAreaItemIndex:null}},computed:{trackings(){var t=[];if(this.orderItemInfos&&this.orderItemInfos.length)for(const r of this.orderItemInfos)if(r.trackingNumber&&r.trackingUrl){var e=!1;for(const s of t)s.trackingNumber===r.trackingNumber&&(e=!0);e||t.push({trackingNumber:r.trackingNumber,trackingUrl:r.trackingUrl})}return t},isAllFulfilled(){var t=!1;if(this.orderHisInfos&&this.orderHisInfos.length)for(const e of this.orderHisInfos)if(e.status===w.FULFILLED.value){t=!0;break}return t}},methods:{showImgList(t){this.currentImgList=t,this.showFittings=!0},openTrackingUrl(t){window.open(t,"_blank")},toEditGreetingCardPrintAreaInfo(t){this.editGreetingCardPrintAreaItemIndex=t;var e=this.orderItemInfos[this.editGreetingCardPrintAreaItemIndex];this.$refs.GreetingCardPrintAreaEditDialog.show({printAreas:e.greetingCardPrintAreas,editable:e.itemStatus===I.PENDING.value})},saveGreetingCardPrintAreaInfo(t){var e=this.orderItemInfos[this.editGreetingCardPrintAreaItemIndex];e.greetingCardPrintAreas=t,this.$forceUpdate();var r={};r.id=e.id,r.greetingCardPrintAreas=t,Object(i["l"])(r)}}},P=A,k=(r("2f68"),Object(u["a"])(P,f,h,!1,null,"3ef26784",null)),x=k.exports,O=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"detail-address"},[r("div",{staticClass:"detail-address-title bold"},[t._v(t._s(t.productTitle))]),r("div",{staticClass:"detail-address-item bold"},[t._v(t._s(t.orderInfo.addressToFirstName)+" "+t._s(t.orderInfo.addressToLastName))]),r("div",{staticClass:"detail-address-item"},[t._v(t._s(t.orderInfo.addressToAddress1))]),r("div",{staticClass:"detail-address-item"},[t._v(t._s(t.orderInfo.addressToAddress2))]),r("div",{staticClass:"detail-address-item"},[t._v(t._s(t.orderInfo.addressToCity+" "+t.orderInfo.addressToRegion+" "+t.orderInfo.addressToZip))]),r("div",{staticClass:"detail-address-item"},[t._v(t._s(t.orderInfo.phone))]),r("div",{staticClass:"detail-address-item bold address"},[t._v("Shipping methhod")]),r("el-tooltip",{staticClass:"item",attrs:{disabled:1===t.orderInfo.status,content:"The logistics method cannot be switched after the order is paid, if you need to change, please contact us!",placement:"top-start",effect:"light"}},[r("el-radio-group",{staticStyle:{display:"flex","flex-direction":"column"},attrs:{disabled:1!==t.orderInfo.status},on:{change:t.logisticsTypeChange},model:{value:t.orderInfo.logisticsType,callback:function(e){t.$set(t.orderInfo,"logisticsType",e)},expression:"orderInfo.logisticsType"}},[r("el-radio",{staticClass:"detail-address-item delivery",attrs:{label:1}},[t._v("Standard Delivery")]),t.express?r("el-radio",{staticClass:"detail-address-item delivery",attrs:{label:2}},[t._v("Express Delivery")]):t._e()],1)],1)],1)},T=[],N={name:"DetailAddress",props:{orderInfo:{type:Object,default:()=>({})},productTitle:{type:String,default:""}},data(){return{express:!1}},inject:["reload"],computed:{calculateParams(){return{orderId:this.orderInfo.id,countryId:this.orderInfo.addressToCountryId}}},watch:{async calculateParams(t){const e=await Object(i["b"])(t);this.express=e.data.express}},methods:{async logisticsTypeChange(t){const e={id:this.orderInfo.id,firstName:this.orderInfo.addressToFirstName,lastName:this.orderInfo.addressToLastName,email:this.orderInfo.addressToEmail,phone:this.orderInfo.addressToPhone,countryId:this.orderInfo.addressToCountryId,province:this.orderInfo.addressToRegion,address1:this.orderInfo.addressToAddress1,address2:this.orderInfo.addressToAddress2,city:this.orderInfo.addressToCity,zipCode:this.orderInfo.addressToZip,logsiticsType:t};try{await Object(i["k"])(e),this.reload()}catch(t){console.log(t)}}}},E=N,F=(r("ba95"),Object(u["a"])(E,O,T,!1,null,"ed4b6b32",null)),L=F.exports,D=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"detail-price"},[r("div",{staticClass:"detail-billing"},[t._v("Billing")]),r("div",{staticClass:"detail-item"},[r("div",{staticClass:"detail-label"},[t._v("Product cost:")]),r("div",{staticClass:"detail-value"},[t._v("$"+t._s(t.orderInfo.goodsTotalPrice+t.orderInfo.fittingsTotalPrice+t.orderInfo.blankGreetingCardTotalPrice))])]),r("div",{staticClass:"detail-item"},[r("div",{staticClass:"detail-label"},[t._v("Shipping:")]),r("div",{staticClass:"detail-value"},[t._v("$"+t._s(t.orderInfo.logisticsTotalPrice))])]),r("div",{staticClass:"detail-item"},[r("div",{staticClass:"detail-label"},[t._v("Discount:")]),r("div",{staticClass:"detail-value"},[t._v("$"+t._s(t.orderInfo.goodsDiscount))])]),r("div",{staticClass:"detail-item"},[r("div",{staticClass:"detail-label"},[t._v("Total costs:")]),r("div",{staticClass:"detail-value"},[t._v("$"+t._s(t.orderInfo.totalPrice))])])])},j=[],H={name:"DetailPrice",props:{orderInfo:{type:Object,default:()=>({})}}},S=H,$=(r("d05a"),Object(u["a"])(S,D,j,!1,null,"570f0540",null)),U=$.exports,B=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("el-dialog",{attrs:{visible:t.dialogVisible,"close-on-click-modal":!1,top:"2vh"},on:{"update:visible":function(e){t.dialogVisible=e}}},[r("div",{staticClass:"dialog-title",attrs:{slot:"title"},slot:"title"},[t._v("Edit shipping address")]),r("el-row",{attrs:{gutter:50}},[r("el-form",{ref:"orderForm",attrs:{model:t.orderForm,rules:t.orderRules,"label-width":"100px","label-position":"top"}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"Full name",prop:"firstName"}},[r("el-input",{model:{value:t.orderForm.firstName,callback:function(e){t.$set(t.orderForm,"firstName",e)},expression:"orderForm.firstName"}})],1)],1),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"Last name",prop:"lastName"}},[r("el-input",{model:{value:t.orderForm.lastName,callback:function(e){t.$set(t.orderForm,"lastName",e)},expression:"orderForm.lastName"}})],1)],1),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"Email(optional)"}},[r("el-input",{model:{value:t.orderForm.email,callback:function(e){t.$set(t.orderForm,"email",e)},expression:"orderForm.email"}})],1)],1),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"Phone",prop:"phone"}},[r("el-input",{model:{value:t.orderForm.phone,callback:function(e){t.$set(t.orderForm,"phone",e)},expression:"orderForm.phone"}})],1)],1),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"Country",prop:"countryId"}},[r("el-select",{staticStyle:{width:"100%"},attrs:{filterable:"",placeholder:""},on:{change:t.countryChange},model:{value:t.orderForm.countryId,callback:function(e){t.$set(t.orderForm,"countryId",e)},expression:"orderForm.countryId"}},t._l(t.countryInfoList,(function(t){return r("el-option",{key:t.id,attrs:{label:t.enName,value:t.id}})})),1)],1)],1),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"State/Province"}},[t.provinceInfoList&&t.provinceInfoList.length?r("el-select",{staticStyle:{width:"100%"},attrs:{filterable:"",placeholder:""},model:{value:t.orderForm.province,callback:function(e){t.$set(t.orderForm,"province",e)},expression:"orderForm.province"}},t._l(t.provinceInfoList,(function(t){return r("el-option",{key:t.id,attrs:{label:t.enName,value:t.enName}})})),1):r("el-input",{staticClass:"current-selection--single",attrs:{type:"text",autocomplete:"off"},model:{value:t.orderForm.province,callback:function(e){t.$set(t.orderForm,"province",e)},expression:"orderForm.province"}})],1)],1),r("el-col",{attrs:{span:24}},[r("el-form-item",{attrs:{label:"Address1",prop:"address1"}},[r("el-input",{model:{value:t.orderForm.address1,callback:function(e){t.$set(t.orderForm,"address1",e)},expression:"orderForm.address1"}})],1)],1),r("el-col",{attrs:{span:24}},[r("el-form-item",{attrs:{label:"Address2 (optional)"}},[r("el-input",{model:{value:t.orderForm.address2,callback:function(e){t.$set(t.orderForm,"address2",e)},expression:"orderForm.address2"}})],1)],1),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"City"}},[r("el-input",{model:{value:t.orderForm.city,callback:function(e){t.$set(t.orderForm,"city",e)},expression:"orderForm.city"}})],1)],1),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"Postal/ZIP Code",prop:"zipCode"}},[r("el-input",{model:{value:t.orderForm.zipCode,callback:function(e){t.$set(t.orderForm,"zipCode",e)},expression:"orderForm.zipCode"}})],1)],1),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"Shipping Methods",prop:"zipCode"}},[r("el-radio-group",{staticStyle:{display:"flex","flex-direction":"column"},model:{value:t.orderForm.logsiticsType,callback:function(e){t.$set(t.orderForm,"logsiticsType",e)},expression:"orderForm.logsiticsType"}},[r("el-radio",{staticClass:"detail-address-item delivery",attrs:{label:1}},[t._v("Standard Delivery")]),t.express?r("el-radio",{staticClass:"detail-address-item delivery",attrs:{label:2}},[t._v("Express Delivery")]):t._e()],1)],1)],1)],1)],1),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:t.close}},[t._v("close")]),r("el-button",{attrs:{loading:t.submitLoading,type:"primary"},on:{click:function(e){return t.submit("orderForm")}}},[t._v("Edit")])],1)],1)},G=[],R=r("623f"),V=r("931c"),Q={name:"EditAddress",props:{value:{type:Boolean,default:!1},orderInfo:{type:Object,default:()=>({})}},data(){return{dialogVisible:!1,submitLoading:!1,orderForm:{},orderRules:{firstName:[{required:!0,message:"Please fill firstName",trigger:"blur"}],lastName:[{required:!0,message:"Please fill lastName",trigger:"blur"}],email:[{required:!0,message:"Please fill email",trigger:"blur"},{validator:V["a"],trigger:"blur"}],phone:[{required:!0,message:"Please fill phone",trigger:"blur"}],countryId:[{required:!0,message:"Please fill country"}],province:[{required:!0,message:"Please fill province",trigger:"blur"}],address1:[{required:!0,message:"Please fill address1",trigger:"blur"}],address2:[{required:!0,message:"Please fill address2",trigger:"blur"}],city:[{required:!0,message:"Please fill city",trigger:"blur"}],zipCode:[{required:!0,message:"Please fill zipCode",trigger:"blur"}]},countryInfoList:[],provinceInfoList:[],express:!1}},inject:["reload"],watch:{value(t){this.dialogVisible=t},dialogVisible(t){this.$emit("input",t)},orderInfo:{handler(t){this.orderForm={id:t.id,firstName:t.addressToFirstName,lastName:t.addressToLastName,email:t.addressToEmail,phone:t.addressToPhone,countryId:t.addressToCountryId,province:t.addressToRegion||"",address1:t.addressToAddress1,address2:t.addressToAddress2,city:t.addressToCity,zipCode:t.addressToZip,logsiticsType:t.logisticsType},t.addressToCountryId&&(this.getProvincesList(),this.initDelivery())},immediate:!1}},created(){this.getCountrysList()},methods:{async getCountrysList(){const t=await Object(R["b"])();this.countryInfoList=t.data.countryInfoList},countryChange(){this.orderForm.province="",this.getProvincesList(),this.initDelivery()},async getProvincesList(){const t=await Object(R["i"])({countryId:this.orderForm.countryId});this.provinceInfoList=t.data.provinceInfoList},async initDelivery(){const t={orderId:this.orderForm.id,countryId:this.orderForm.countryId},e=await Object(i["b"])(t);this.express=e.data.express},close(){this.dialogVisible=!1},submit(t){this.$refs[t].validate(async t=>{if(t){this.submitLoading=!0;try{await Object(i["k"])(this.orderForm),this.$message.success("submit successful"),setTimeout(()=>{this.close(),this.reload()},500)}finally{this.submitLoading=!1}}})}}},q=Q,M=Object(u["a"])(q,B,G,!1,null,"76889a7a",null),K=M.exports,z=r("de73"),J={name:"OrderDetail",components:{DetailCount:p,DetailProduct:x,DetailAddress:L,DetailPrice:U,EditAddress:K,PaypalDialog:z["a"]},filters:{statusFilters:v},data(){return{orderId:"",orderNo:"",showHandle:!1,orderHisInfos:[{addDate:"",status:1}],orderInfo:{},orderItemInfos:[{fittings:{showImageUrl:"",name:""},imageUrl:"",title:"",sku:"",quantity:"",goodsTotalPrice:""}],trackings:[],showPaypal:!1,showEditAddress:!1}},created(){this.orderNo=this.$route.params.no,this.getOrder()},methods:{async getOrder(){const t=await Object(i["g"])({orderNo:this.orderNo});this.orderHisInfos=t.data.orderHisInfos.reverse(),this.orderInfo=t.data.orderInfo,this.orderId=this.orderInfo.id,this.orderItemInfos=t.data.orderItemInfos},onHoldOrder(){this.$confirm("Whether to on hold the order in question?","tip",{confirmButtonText:"Yes",cancelButtonText:"Cancel",type:"warning"}).then(async()=>{await Object(i["i"])({orderId:this.orderId}),this.getOrder(),this.$message({type:"success",message:"success!"})}).catch(()=>{this.$message({type:"info",message:"cancel"})})},async cancelOrder(){this.$confirm("Whether to cancel the order?","tip",{confirmButtonText:"Yes",cancelButtonText:"Cancel",type:"warning"}).then(async()=>{await Object(i["c"])({orderId:this.orderId}),this.getOrder(),this.$message({type:"success",message:"success!"})}).catch(()=>{this.$message({type:"info",message:"cancel"})})}}},Y=J,X=(r("6666"),Object(u["a"])(Y,s,a,!1,null,"f0ff3588",null));e["default"]=X.exports},"8f5b":function(t,e,r){},9504:function(t,e,r){"use strict";var s=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("el-dialog",{attrs:{visible:t.visible,"append-to-body":t.appendToBody,"close-on-click-modal":!1},on:{"update:visible":function(e){t.visible=e}}},[r("el-form",{attrs:{"label-position":"right","label-width":"150px"}},t._l(t.printAreas,(function(e,s){return r("el-form-item",{key:e.name+s,attrs:{label:e.name}},[r("el-row",{attrs:{gutter:10}},[r("el-col",{attrs:{span:18}},[e.inputType===t.enums.printAreaInputTypeEnum.INPUT.value?r("el-input",{attrs:{"show-word-limit":"",maxlength:e.textNum,disabled:e.disabled},model:{value:e.content,callback:function(r){t.$set(e,"content",r)},expression:"printArea.content"}}):r("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(r){t.$set(e,"content",r)},expression:"printArea.content"}})],1),r("el-col",{attrs:{span:4}},[t.editable?r("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),r("div",{attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(e){t.visible=!1}}},[t._v("Cancel")]),r("el-button",{attrs:{type:"primary"},on:{click:t.doSave}},[t._v("Save")])],1)],1)},a=[],i=r("01ae"),o={name:"GreetingCardPrintAreaEditDialog",data(){return{enums:{printAreaInputTypeEnum:i["a"]},printAreas:[],visible:!1,appendToBody:!1,editable:!1}},methods:{show({printAreas:t,editable:e=!0,appendToBody:r=!1}){for(const s of t)s.disabled=!0;this.printAreas=JSON.parse(JSON.stringify(t)),this.editable=e,this.appendToBody=r,this.visible=!0},doSave(){this.$emit("save",this.printAreas),this.visible=!1}}},n=o,d=r("2877"),l=Object(d["a"])(n,s,a,!1,null,"59cecfb2",null);e["a"]=l.exports},a75f:function(t,e){t.exports="data:image/webp;base64,UklGRmoCAABXRUJQVlA4WAoAAAAQAAAALwAALwAAQUxQSBoCAAABoEPbtmHbmsGzbdu2bdu2bdu2bdu2bfO7gouHCkZQPBX9MCImQM4xyo/fff29iWfz/fXd48vHkOfym38Q0h+by7tLf5gAHk7tonIY1u+H54/u4OPo+Ye/WzDKO1Q2AWN6AYWwwHQDMMvbZAgD1idQiBOsB4w0luNAfwWwP3BYUnlgvQK5HigjbQYjQTASGLBZMX7AdAV0OvyIUQUoEJQCQIXx8F2B/RuG74bDwTkM22/D/ODMh+vvYXRwRsN7oENwOoAZOOv/Z+kHTx6c310ReB2CKLNNgM+LK0dxUvvlBUIwG2djc+M4dpL8y2KC+fyHBfhxvHPyUA0Gs4TitNgcZrFeHp05JIvhsaxRqiz+bAPsThKC4fAjjsVaYPJ9G+7H8K8M0NhJUob+501gtOmbPsNmV5JS3IbH72G0T6vBiOJBXcC8DvN9qgJU8bIYPm+Hwz7FCIPFruK0PgysHw5/+6Tt8NlF/f0/AMKyVAAK+NQGKGCX4DS2RhXFCIPpPsUxYbLdaayvx6eQtBmMBP7oNNy3qQ68n1xAtgWAzT71BjJYNsP7OHLeDYz3Jw3QX1KMMJgsl2n+BrYn8UO34byk1kABNyoTBoQtLu3DaDBTSIfhudyX+Rtr2Pnl43u3d6wsKQdwu/tyYLQHJdlu8dpb0mHsjRRepAKrDU+rJaV4bhNWR35GKTF4/fnX7w2Hx3kkKc745xibc8gtVlA4ICoAAAAwAwCdASowADAAPm02mEikIyKhI4gAgA2JaQAAG4G9Pg4AAP77nMAAAAA="},a7ff:function(t,e,r){},b492:function(t,e,r){"use strict";var s=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"img-container",on:{mouseenter:function(e){t.isHover=!0},mouseleave:function(e){t.isHover=!1}}},[s("Transition",[s("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='"+r("e803")+"'"}},"my-img",t.$attrs,!1))],1),s("Transition",[s("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='"+r("e803")+"'"}},"my-img",t.$attrs,!1))],1)],1)},a=[],i={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}}},o=i,n=(r("686c"),r("2877")),d=Object(n["a"])(o,s,a,!1,null,"850380da",null);e["a"]=d.exports},ba95:function(t,e,r){"use strict";r("431d")},d05a:function(t,e,r){"use strict";r("7057")},de73:function(t,e,r){"use strict";var s=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("el-dialog",{attrs:{visible:t.dialogVisible,"close-on-click-modal":!1,top:"30vh"},on:{"update:visible":function(e){t.dialogVisible=e},close:t.close}},[r("PaypalButton",{ref:"PaypalButton",attrs:{"order-ids":t.orderIds,"pay-target":t.payTarget}})],1)},a=[],i=r("82bd"),o={name:"PaypalDialog",components:{PaypalButton:i["a"]},props:{value:{type:Boolean,default:!1},orderIds:{type:Array,default:()=>[]},payTarget:{type:Number,default:1}},data(){return{dialogVisible:!1}},watch:{value:{handler(t){this.dialogVisible=t},immediate:!0},dialogVisible:{handler(t){this.$emit("input",t)},immediate:!0}},mounted(){},methods:{close(){this.dialogVisible=!1,this.$emit("close")}}},n=o,d=r("2877"),l=Object(d["a"])(n,s,a,!1,null,"69e4bf62",null);e["a"]=l.exports},f211:function(t,e,r){}}]);