9a550b0.js 19 KB

12
  1. (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)},687:function(e,t,r){e.exports={}},709: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(806),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<t.productQty?"Shipped":"Domestic Delivery",description:t.formatStepDesc(t.orderDetail.AU_WH_Client)}}),t._v(" "),r("el-step",{attrs:{title:"Delivered",description:t.formatStepDesc(t.orderDetail.Delivered_time)}})],1)],1)]),t._v(" "),r("section",{staticClass:"main-custom"},[r("p",{staticClass:"sharing-title"},[t._v("Customer information")]),t._v(" "),r("div",[r("p",{staticClass:"sharing-subtitle"},[t._v(t._s(t.isShow?"Billing":"Supplier")+" Address")]),t._v(" "),r("div",{staticClass:"sharing-address"},[r("p",[t._v(t._s(t.orderDetail.Account_Name_name))]),t._v(" "),r("p",[t._v(t._s(t.orderDetail.Billing_Unit_Building_Name))]),t._v(" "),r("p",[t._v(t._s(t.orderDetail.Billing_Street))]),t._v(" "),r("p",[t._v(t._s(t.orderDetail.Billing_City))]),t._v(" "),r("p",[t._v(t._s(t.orderDetail.Billing_State))]),t._v(" "),r("p",[t._v(t._s(t.orderDetail.Billing_Code))]),t._v(" "),r("p",[t._v(t._s(t.orderDetail.Billing_Country))])])]),t._v(" "),r("div",[r("p",{staticClass:"sharing-subtitle"},[t._v("Shipping Address")]),t._v(" "),r("div",{staticClass:"sharing-address"},[r("p",[t._v(t._s(t.orderDetail.Shipping_Unit_Building_Name))]),t._v(" "),r("p",[t._v(t._s(t.orderDetail.Shipping_Street))]),t._v(" "),r("p",[t._v(t._s(t.orderDetail.Shipping_City))]),t._v(" "),r("p",[t._v(t._s(t.orderDetail.Shipping_State))]),t._v(" "),r("p",[t._v(t._s(t.orderDetail.Shipping_Code))]),t._v(" "),r("p",[t._v(t._s(t.orderDetail.Shipping_Country))])])])]),t._v(" "),r("section",[r("p",{staticClass:"sharing-title"},[t._v("Shipping information")]),t._v(" "),r("el-table",{staticStyle:{width:"100%"},attrs:{data:t.orderDetail.shipping_tracking,"header-cell-style":{background:"#F7F8FC",color:"#101010",fontWeight:"normal"}}},[r("el-table-column",{staticStyle:{padding:"0"},attrs:{type:"expand"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("el-table",{staticStyle:{"margin-left":"50px",width:"calc(100% - 50px)"},attrs:{data:e.row.test_pkg_details,"header-cell-style":{background:"#F7F8FC",color:"#101010",fontWeight:"normal"}}},[r("el-table-column",{attrs:{prop:"Product_name",label:"Item & Description"}}),t._v(" "),r("el-table-column",{attrs:{prop:"Quantity_to_pack",label:"QTY",width:"450"}})],1)]}}])}),t._v(" "),r("el-table-column",{attrs:{prop:"Title",label:"Job Name"}}),t._v(" "),r("el-table-column",{attrs:{prop:"Courier",label:"Carrier"}}),t._v(" "),r("el-table-column",{attrs:{prop:"Tracking_No",label:"Tracking#"}}),t._v(" "),r("el-table-column",{attrs:{prop:"Package_Status",label:"Shipment Status"}}),t._v(" "),r("el-table-column",{attrs:{label:"Delivery Address",width:"250"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("span",[t._v("\n "+t._s(e.row.Shipping_Unit_Building_Name)),r("br"),t._v("\n "+t._s(e.row.Shipping_Street)),r("br"),t._v("\n "+t._s(e.row.Shipping_City)),r("br"),t._v("\n "+t._s(e.row.Shipping_State)+"\n ")])]}}])}),t._v(" "),r("el-table-column",{attrs:{prop:"Tracking_URL",label:"",width:"200"},scopedSlots:t._u([{key:"default",fn:function(e){return e.row.Tracking_URL?[r("el-button",{staticStyle:{"background-color":"rgb(0, 33, 59)",color:"#fff"},attrs:{size:"mini",plain:""},nativeOn:{click:function(r){return t.openTracking_URL(e.row.Tracking_URL)}}},[t._v("TRACK SHIPMENT")])]:void 0}}],null,!0)})],1)],1),t._v(" "),r("section",{staticClass:"orderTable"},[r("p",{staticClass:"sharing-title"},[t._v("Products Information")]),t._v(" "),r("el-table",{staticStyle:{width:"100%"},attrs:{data:t.orderDetail.sales_orders_details,"header-cell-style":{background:"#fff",color:"#101010",fontWeight:"normal"}}},[r("el-table-column",{attrs:{type:"index",label:"S.NO",width:"70"}}),t._v(" "),r("el-table-column",{attrs:{label:"Product Name","min-width":"300"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("p",{staticClass:"colorBlue"},[t._v(t._s(e.row.product_name))]),t._v(" "),r("p",{domProps:{innerHTML:t._s(e.row.product_description)}})]}}])}),t._v(" "),r("el-table-column",{attrs:{prop:"quantity",label:"Quantity",align:"left",width:t.isShow?125:200}}),t._v(" "),t.isShow?[r("el-table-column",{attrs:{prop:"list_price",label:"List Price(".concat(t.comCurrency,")"),width:"125"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t.transformNumber(e.row.list_price))+"\n ")]}}],null,!1,1277873987)}),t._v(" "),r("el-table-column",{attrs:{prop:"amount",label:"Amount(".concat(t.comCurrency,")"),width:"125"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t.transformNumber(e.row.amount))+"\n ")]}}],null,!1,1491352927)}),t._v(" "),r("el-table-column",{attrs:{prop:"Tax",label:"Tax(".concat(t.comCurrency,")"),width:"125"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t.transformNumber(e.row.Tax))+"\n ")]}}],null,!1,572486302)}),t._v(" "),r("el-table-column",{attrs:{prop:"Discount",label:"Discount(".concat(t.comCurrency,")"),width:"125"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t.transformNumber(e.row.Discount))+"\n ")]}}],null,!1,623994030)}),t._v(" "),r("el-table-column",{attrs:{prop:"net_total",label:"Total(".concat(t.comCurrency,")"),width:"125"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t.transformNumber(e.row.net_total))+"\n ")]}}],null,!1,379704593)})]:t._e()],2),t._v(" "),t.isShow?r("div",{staticClass:"table-wrap"},[r("table",{staticClass:"total"},[r("tr",[r("td",[t._v("Sub Total")]),r("td",[t._v(t._s(t.comCurrency)+" "+t._s(t.transformNumber(t.orderDetail.Sub_Total)))])]),t._v(" "),r("tr",[r("td",[t._v("Total Taxes")]),r("td",[t._v(t._s(t.comCurrency)+" "+t._s(t.transformNumber(t.orderDetail.Tax_Total)))])]),t._v(" "),r("tr",[r("td",[t._v("Total Discount")]),r("td",[t._v(t._s(t.comCurrency)+" "+t._s(t.transformNumber(t.orderDetail.Total_Including_Discount)))])]),t._v(" "),r("tr",[r("td",[t._v("Adjustment")]),r("td",[t._v(t._s(t.comCurrency)+" "+t._s(t.transformNumber(t.orderDetail.Total_Adjustment)))])]),t._v(" "),r("tr",[r("td",[t._v("Grand Total")]),r("td",[t._v(t._s(t.comCurrency)+" "+t._s(t.transformNumber(t.orderDetail.Grand_Total)))])])])]):t._e(),t._v(" "),t.isShow?[r("p",{staticClass:"notes-1"},[t._v("Notes")]),t._v(" "),r("p",{staticClass:"notes-2"},[t._v("Terms & conditions")]),t._v(" "),r("p",{staticClass:"notes-2"},[t._v("Artwork Approval")]),t._v(" "),r("p",{staticClass:"notes-3"},[t._v(t._s(t.orderDetail.Subject))])]:t._e()],2)],t._v(" "),r("el-dialog",{attrs:{"lock-scroll":!1,visible:t.urlDialogShow,center:"",width:"850px",top:"20vh"},on:{"update:visible":function(e){t.urlDialogShow=e}}},[r("iframe",{staticStyle:{width:"100%",height:"500px"},attrs:{src:t.Tracking_URL,frameborder:"0"}})]),t._v(" "),r("export-dialog",{attrs:{emailForm:t.shareForm,visible:t.shareDialogVisible,title:"Client Tracking Share (no pricing displayed)",labelShow:!1},on:{"update:visible":function(e){t.shareDialogVisible=e}}})],2)}),[],!1,null,"6efb1ea1",null);t.default=component.exports;installComponents(component,{ImageList:r(715).default,ExportDialog:r(614).default})},715:function(e,t,r){"use strict";r.r(t);r(64);var n={components:{ElImageViewer:r(556).a},props:{data:{type:Array,default:function(){return[]}}},data:function(){return{currentPre:0,showViewer:!1}},computed:{comImg:function(){return this.data.map((function(i){return i.cdn_url}))}},methods:{scroll:function(e){var t=this.$refs.list;t.scrollLeft+=e*t.clientWidth},closeViewer:function(){this.showViewer=!1},handleViwer:function(i){this.currentPre=i,this.showViewer=!0}}},o=(r(629),r(22)),component=Object(o.a)(n,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"wrap flex row"},[t("i",{staticClass:"el-icon-arrow-left",on:{click:function(t){return e.scroll(-1)}}}),e._v(" "),t("div",{ref:"list",staticClass:"list"},e._l(e.data,(function(r,n){return t("el-image",{key:n,staticClass:"image",attrs:{src:r.cdn_url,fit:"cover"},on:{click:function(t){return e.handleViwer(n)}}})})),1),e._v(" "),t("i",{staticClass:"el-icon-arrow-right",on:{click:function(t){return e.scroll(1)}}}),e._v(" "),e.showViewer?t("ElImageViewer",{attrs:{"initial-index":e.currentPre,"on-close":e.closeViewer,"url-list":e.comImg}}):e._e()],1)}),[],!1,null,"d262f43e",null);t.default=component.exports},806:function(e,t,r){"use strict";r(687)}}]);
  2. //# sourceMappingURL=9a550b0.js.map