(window.webpackJsonp=window.webpackJsonp||[]).push([[8,29],{551:function(e,t,r){e.exports={}},562:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"h",(function(){return l})),r.d(t,"g",(function(){return d})),r.d(t,"f",(function(){return _})),r.d(t,"e",(function(){return f})),r.d(t,"b",(function(){return v})),r.d(t,"d",(function(){return m})),r.d(t,"c",(function(){return h}));r(40),r(53),r(563),r(521),r(546),r(321),r(11),r(17),r(77);var n=r(528);function o(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return 0===e?t?"$0.00":"0.00":t?"$".concat(e):"".concat(e)}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;return Math.round(function(e){return parseFloat((e*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:100)).toPrecision(12))}(e,t))/t}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=Number(e);return Number.isNaN(r)?e:Object(n.a)(Math.trunc(Object(n.d)(Object(n.d)(r,t),100)),100)}var d=function(e,t,r,n){var o=Object.entries(r).filter((function(t){return e>=t[1]})),l="website_qty1";return o.length&&(l=o.pop()[0]),c(n[t][l],e)},_=function(e,form,t){return c(Object.entries(form).reduce((function(e,r){var s=0;if(/\d+/.test(r[0])&&r[1].enable){var o=r[1].colorForm.filter((function(i){return i.id===r[1].printService})),l=1;o.length&&(l=o[0].colorNumber);var c=r[1].decorationList.filter((function(i){return i.id===r[1].printService})),d=0;c.length&&(d=Object(n.c)(Number(c[0].website_setup),Object(n.d)(Number(c[0].supplier_setup),l-1))),s=Object(n.c)(s,d)}else if(r[1].length){var _=t[r[0]].filter((function(e){return r[1].includes(e.id)}));if(_.length){var f=_.reduce((function(e,t){var r=Number(t.website_setup);return[5,6].includes(t.website_setup_id)&&(r=0),Object(n.c)(e,Number.isNaN(r)?0:r)}),0);s=Object(n.c)(s,f)}}return e=Object(n.c)(e,s)}),0))},f=function(e,form,t){var r=Object.entries(t).filter((function(t){return e>=t[1]})),o="website_qty".concat(r.length),l="supplier_qty".concat(r.length),d=Object.entries(form).reduce((function(e,t){if("POA"===e)return e;var r=0;if(/\d+/.test(t[0])&&t[1].enable){var d=t[1].colorForm.filter((function(i){return i.id===t[1].printService})),_=1;d.length&&(_=d[0].colorNumber);var f=t[1].decorationList.filter((function(i){return i.id===t[1].printService})),v=c(f[0][o]);if(999===v||111===v||"number"!=typeof v)return"POA";var m=c(f[0][l]);if(999===m||111===m||"number"!=typeof m)return"POA";var h=0;f.length&&(h=Object(n.c)(v,Object(n.d)(m,_-1))),r=Object(n.c)(r,h)}return e=Object(n.c)(e,r)}),0);return c(d,e)},v=function(e,form,t,r){var o=Object.entries(t).filter((function(t){return e>=t[1]})),l="website_qty".concat(o.length),d=Object.entries(form).reduce((function(e,t){if("POA"===e)return e;var o=0;return/\d+/.test(t[0])||"packaging"===t[0]||(o=r[t[0]].filter((function(e){return t[1].includes(e.id)})).reduce((function(e,t){if("POA"===e)return e;var r=c(t[l]);return 999===r||111===r||"number"!=typeof r?(r=0,"POA"):e=Object(n.c)(e,r)}),0)),Object(n.c)(e,o)}),0);return c(d,e)},m=function(e,form,t,r){var o=Object.entries(t).filter((function(t){return e>=t[1]})),l="website_qty".concat(o.length),d=Object.entries(form).reduce((function(e,t){if("POA"===e)return e;var o=0;return/\d+/.test(t[0])||"packaging"!==t[0]||(o=r[t[0]].filter((function(e){return t[1].includes(e.id)})).reduce((function(e,t){if("POA"===e)return e;var r=c(t[l]);return 999===r||111===r||"number"!=typeof r?(r=0,"POA"):e=Object(n.c)(e,r)}),0)),Object(n.c)(e,o)}),0);return c(d,e)},h=function(e,t,r,o){var l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,d=Math.ceil(Object(n.d)(+o.unit_w_local,e)),_=Object(n.c)(1,Object(n.a)(Object(n.c)(+t.express_freight,+t.fuel),100)),f=Object(n.c)(1,Object(n.a)(Object(n.c)(+t.bag_freight,+t.fuel),100)),v=0;if(1===r.type)if(d>20){var m=Object(n.b)(d,20),h=Object(n.d)(m,+r.basic),D=Object(n.c)(+r.pickup,h);v=Object(n.d)(D,_)}else v=Object(n.d)(+r.pickup,_);else if(2===r.type){var S=Object(n.d)(d,+r.basic),w=Object(n.c)(+r.pickup,S);v=Object(n.d)(w,f)}else v=0;return c(v,l)}},587:function(e,t,r){e.exports={}},589:function(e,t,r){"use strict";r(551)},614:function(e,t,r){"use strict";r.r(t);r(521);var n=r(588),o=r.n(n),l={props:{title:{type:String,default:"Send Email"},sendbtnCext:{type:String,default:"SUBMIT REQUEST"},isSendPdf:{type:Boolean,default:!1},labelShow:{type:Boolean,default:!0},emailForm:{},rules:{},labelWidth:Number,visible:{type:Boolean,default:!1}},methods:{copyUrl:function(e){var t=this,r=new o.a(".".concat(e));r.on("success",(function(e){t.$message.success("link copied to clipboard"),r.destroy()})),r.on("error",(function(e){t.$message.error("The browser does not support automatic replication"),r.destroy()}))},handleClose:function(){this.$emit("update:visible",!1)}}},c=(r(589),r(22)),component=Object(c.a)(l,(function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{"lock-scroll":!1,title:e.title,visible:e.visible,width:"700px","before-close":e.handleClose,"close-on-click-modal":!1,top:"0"},on:{"update:visible":function(t){e.visible=t}}},[t("el-form",{ref:"ruleForm",attrs:{model:e.emailForm,rules:e.rules}},e._l(e.emailForm,(function(r,n){return t("el-form-item",{key:n,attrs:{label:e.labelShow?n:"","label-width":e.labelWidth+"px",prop:n}},[t("el-input",{attrs:{readonly:""},model:{value:e.emailForm[n],callback:function(t){e.$set(e.emailForm,n,t)},expression:"emailForm[key]"}}),t("el-button",{class:n,attrs:{"data-clipboard-text":e.emailForm[n],type:"primary"},on:{click:function(t){return t.preventDefault(),e.copyUrl(n)}}},[e._v("copy link")])],1)})),1)],1)}),[],!1,null,"1381fc6c",null);t.default=component.exports},629:function(e,t,r){"use strict";r(587)},684:function(e,t,r){e.exports={}},706:function(e,t,r){"use strict";r.r(t);r(98),r(40),r(64),r(521),r(523),r(11),r(17),r(47),r(32);var n=r(562),o={name:"OrderDetailPart",props:{isShow:{type:Boolean,default:!0}},data:function(){return{orderDetail:{},isLoading:!0,packageTable:[],urlDialogShow:!1,shareDialogVisible:!1,shareForm:{Link:""},Tracking_URL:"",stepConfig:{"Order Confirmed":1,"Factory Confirmed":2,"GZ WH":3,Transshipment:4,"AU WH":5,"AUWH - Client":6,"Completed Sales Order":7},packageQty:0,productQty:0}},computed:{comCurrency:function(){return this.orderDetail.Currency},comOrderState:function(){return"Cancelled"===this.orderDetail.Order_Stage?0:"Completed Sales Order"!==this.orderDetail.Order_Stage?this.stepConfig[this.orderDetail.Order_Stage]:this.orderDetail.shipping_isDelivered?7:6}},mounted:function(){this.getOrderDetail()},methods:{getOrderDetail:function(){var e=this,path="",data={};if(this.isShow){var t=this.$store.state.userInfo.id,r=this.$route.query,n=r.crm,o=r.id;path="/crmdata/orders_detail",this.shareForm.Link="https://www.trackship.com.au/orderShare/".concat(t,"/").concat(n,"/").concat(o),data={accounts_id:n,id:o}}else{var l=this.$route.params;path="/crmdata/showOrdersDetail",data={user_id:l.uid,accounts_id:l.aid,id:l.id}}this.$axios.post(path,data).then((function(t){var r,n;null!==t.result?(e.orderDetail=t.result,null!==(r=e.orderDetail.shipping_tracking)&&void 0!==r&&r.length&&e.orderDetail.shipping_tracking.forEach((function(t){var r;"Delivered"===t.Package_Status?(!e.orderDetail.Delivered_time&&e.$set(e.orderDetail,"Delivered_time",t.Delivered_Date),t.Delivered_Date>e.orderDetail.Delivered_time&&e.$set(e.orderDetail,"Delivered_time",t.Delivered_Date),e.$set(e.orderDetail,"shipping_isDelivered",!0)):e.$set(e.orderDetail,"shipping_isDelivered",!1),null!==(r=t.test_pkg_details)&&void 0!==r&&r.length&&t.test_pkg_details.forEach((function(r){e.$set(r,"Courier",t.Courier),e.$set(r,"Tracking_No",t.Tracking_No),e.$set(r,"Package_Status",t.Package_Status),e.$set(r,"Tracking_URL",t.Tracking_URL),e.packageQty+=+r.Quantity_to_pack}))})),null!==(n=e.orderDetail.sales_orders_details)&&void 0!==n&&n.length&&(e.isShow?e.orderDetail.sales_orders_details.forEach((function(t){e.$set(t,"showMore",!0),e.productQty+=+t.quantity})):e.orderDetail.sales_orders_details=e.orderDetail.sales_orders_details.filter((function(e){return"PC Setup Service"!==e.product_Product_Code&&"PC Freight"!==e.product_Product_Code})).map((function(t){return e.$set(t,"showMore",!0),e.productQty+=+t.quantity,t}))),e.isLoading=!1):e.$router.replace("/")}))},transformNumber:function(e){return Object(n.h)(Number(e)).toFixed(2)},formatStepDesc:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.$utils.formatTime(e,"DD/MM/YYYY",t)},toggleShow:function(e){e.showMore=!e.showMore},openTracking_URL:function(e){this.Tracking_URL=e,this.urlDialogShow=!0}}},l=o,c=(r(800),r(22)),component=Object(c.a)(l,(function(){var e,t=this,r=t._self._c;return r("div",{staticClass:"com-main com-margin-auto"},[t.isLoading?r("div",{directives:[{name:"loading",rawName:"v-loading",value:!0,expression:"true"}],staticClass:"com-loading"}):[r("section",{staticClass:"main-header"},[r("div",{staticClass:"main-header-mid flex between"},[r("h1",[t._v("Job Nameļ¼š"+t._s(t.orderDetail.Sales_Order_Title_Job_Name))]),t._v(" "),r("img",{staticClass:"user_logo",attrs:{src:t.orderDetail.user_logo}})]),t._v(" "),r("div",{staticClass:"main-header-mid flex between"},[r("ul",{staticClass:"left"},[t.isShow?r("li",{staticClass:"left-i",on:{click:function(e){t.shareDialogVisible=!0}}},[r("i",{staticClass:"el-icon-share"}),t._v(" "),r("span",[t._v("Client Tracking Share")])]):t._e(),t._v(" "),null!==(e=t.orderDetail.crm_pr_res)&&void 0!==e&&e.length?r("li",{staticClass:"left-i"},[r("image-list",{attrs:{data:t.orderDetail.crm_pr_res}})],1):t._e()]),t._v(" "),r("ul",{staticClass:"right"},[t.orderDetail.Job_Group&&t.isShow?r("li",[t._v("Order Type: "+t._s(t.orderDetail.Job_Group))]):t._e(),t._v(" "),r("li",[t._v("Order No: "+t._s(t.orderDetail.Reference))]),t._v(" "),r("li",[t._v("Order Date: "+t._s(t.formatStepDesc(t.orderDetail.Sales_Order_Created)))]),t._v(" "),t.orderDetail.Expected_Delivery_Date?r("li",[t._v("ETA: "+t._s(t.formatStepDesc(t.orderDetail.Expected_Delivery_Date)))]):t._e(),t._v(" "),t.isShow?r("li",[t._v("Payment Status: "+t._s(t.orderDetail.Payment_Status1))]):t._e()])]),t._v(" "),r("div",{staticClass:"steps"},[r("el-steps",{attrs:{active:t.comOrderState,"align-center":"","finish-status":"success","process-status":"wait"}},[r("el-step",{attrs:{title:"Confirmed",description:t.formatStepDesc(t.orderDetail.Order_Confirm)}}),t._v(" "),r("el-step",{attrs:{title:"In Production",description:t.formatStepDesc(t.orderDetail.Sampling_Factory_Confirm)}}),t._v(" "),r("el-step",{attrs:{title:"QC Inspection",description:t.formatStepDesc(t.orderDetail.GZ_WH)}}),t._v(" "),r("el-step",{attrs:{title:"International Shipment",description:t.formatStepDesc(t.orderDetail.International_transshipment)}}),t._v(" "),r("el-step",{attrs:{title:"AU Warehouse",description:t.formatStepDesc(t.orderDetail.AU_WH)}}),t._v(" "),r("el-step",{attrs:{title:t.packageQty