12 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([[7,47,52,55,56,57],{545:function(t,e,n){"use strict";function r(t,e){return void 0===e&&(e=15),+parseFloat(Number(t).toPrecision(e))}function o(t){var e=t.toString().split(/[eE]/),n=(e[0].split(".")[1]||"").length-+(e[1]||0);return n>0?n:0}function l(t){if(-1===t.toString().indexOf("e"))return Number(t.toString().replace(".",""));var e=o(t);return e>0?r(Number(t)*Math.pow(10,e)):Number(t)}function c(t){v&&(t>Number.MAX_SAFE_INTEGER||t<Number.MIN_SAFE_INTEGER)&&console.warn(t+" is beyond boundary when transfer to integer, the results may not be accurate")}function d(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=e[0];return e.slice(1).reduce((function(e,n){return t(e,n)}),r)}}n.d(e,"c",(function(){return f})),n.d(e,"b",(function(){return h})),n.d(e,"d",(function(){return m})),n.d(e,"a",(function(){return y}));var m=d((function(t,e){var n=l(t),r=l(e),d=o(t)+o(e),m=n*r;return c(m),m/Math.pow(10,d)})),f=d((function(t,e){var n=Math.pow(10,Math.max(o(t),o(e)));return(m(t,n)+m(e,n))/n})),h=d((function(t,e){var n=Math.pow(10,Math.max(o(t),o(e)));return(m(t,n)-m(e,n))/n})),y=d((function(t,e){var n=l(t),d=l(e);return c(n),c(d),m(n/d,r(Math.pow(10,o(e)-o(t))))}));var v=!0},547:function(t,e,n){"use strict";var r=n(2),o=n(99).find,l=n(218),c="find",d=!0;c in[]&&Array(1)[c]((function(){d=!1})),r({target:"Array",proto:!0,forced:d},{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),l(c)},550:function(t,e,n){t.exports={}},551:function(t,e,n){"use strict";var r=n(2),o=n(99).findIndex,l=n(218),c="findIndex",d=!0;c in[]&&Array(1)[c]((function(){d=!1})),r({target:"Array",proto:!0,forced:d},{findIndex:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),l(c)},554:function(t,e,n){"use strict";n.r(e);n(535),n(537),n(11),n(22),n(36);var r=n(556),o=n(557),l=n(558),c={name:"Tinymce",props:{id:{type:String,default:function(){return"vue-tinymce-"+ +new Date+(1e3*Math.random()).toFixed(0)}},value:{type:String,default:""},toolbar:{type:Array,required:!1,default:function(){return[]}},menubar:{type:String,default:"file edit insert view format table"},height:{type:[Number,String],required:!1,default:360},width:{type:[Number,String],required:!1,default:"auto"}},data:function(){return{hasChange:!1,hasInit:!1,tinymceId:this.id,fullscreen:!1,languageTypeList:{en:"en",zh:"zh_CN",es:"es_MX",ja:"ja"}}},computed:{language:function(){return this.languageTypeList[this.$store.getters.language]},containerWidth:function(){var t=this.width;return/^[\d]+(\.[\d]+)?$/.test(t)?"".concat(t,"px"):t}},watch:{value:function(t){var e=this;!this.hasChange&&this.hasInit&&this.$nextTick((function(){return window.tinymce.get(e.tinymceId).setContent(t||"")}))},language:function(){var t=this;this.destroyTinymce(),this.$nextTick((function(){return t.initTinymce()}))}},mounted:function(){this.init()},activated:function(){window.tinymce&&this.initTinymce()},deactivated:function(){this.destroyTinymce()},destroyed:function(){this.destroyTinymce()},methods:{init:function(){var t=this;Object(l.default)("//cdn.jsdelivr.net/npm/tinymce-all-in-one@4.9.3/tinymce.min.js",(function(e){e?t.$message.error(e.message):t.initTinymce()}))},initTinymce:function(){var t=this,e=this;window.tinymce.init({language:this.language,selector:"#".concat(this.tinymceId),height:this.height,body_class:"panel-body ",object_resizing:!1,toolbar:this.toolbar.length>0?this.toolbar:o.default,menubar:this.menubar,plugins:r.default,end_container_on_empty_block:!0,powerpaste_word_import:"clean",code_dialog_height:450,code_dialog_width:1e3,advlist_bullet_styles:"square",advlist_number_styles:"default",imagetools_cors_hosts:["www.tinymce.com","codepen.io"],default_link_target:"_blank",link_title:!1,nonbreaking_force_tab:!0,init_instance_callback:function(n){e.value&&n.setContent(e.value),e.hasInit=!0,n.on("NodeChange Change KeyUp SetContent",(function(){t.hasChange=!0,t.$emit("input",n.getContent())}))},setup:function(t){t.on("FullscreenStateChanged",(function(t){e.fullscreen=t.state}))},convert_urls:!1})},destroyTinymce:function(){var t=window.tinymce.get(this.tinymceId);this.fullscreen&&t.execCommand("mceFullScreen"),t&&t.destroy()},setContent:function(t){window.tinymce.get(this.tinymceId).setContent(t)},getContent:function(){window.tinymce.get(this.tinymceId).getContent()},imageSuccessCBK:function(t){var e=this;t.forEach((function(t){return window.tinymce.get(e.tinymceId).insertContent('<img class="wscnph" src="'.concat(t.url,'" >'))}))}}},d=(n(566),n(21)),component=Object(d.a)(c,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"tinymce-container",class:{fullscreen:t.fullscreen},style:{width:t.containerWidth}},[e("textarea",{staticClass:"tinymce-textarea",attrs:{id:t.tinymceId}})])}),[],!1,null,"a9d38a5e",null);e.default=component.exports},556:function(t,e,n){"use strict";n.r(e);e.default=["advlist autolink autosave code colorpicker colorpicker contextmenu directionality fullscreen hr insertdatetime link lists nonbreaking noneditable paste preview print save spellchecker tabfocus table template textcolor textpattern visualblocks visualchars wordcount"]},557:function(t,e,n){"use strict";n.r(e);e.default=["searchreplace bold italic underline strikethrough alignleft aligncenter alignright outdent indent blockquote undo redo removeformat subscript superscript code codesample","hr bullist numlist link image charmap preview anchor pagebreak insertdatetime media table emoticons forecolor backcolor fullscreen"]},558:function(t,e,n){"use strict";n.r(e);n(43),n(79),n(67),n(81),n(65),n(42),n(11),n(22),n(38),n(32),n(37);function r(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,a){if(t){if("string"==typeof t)return o(t,a);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?o(t,a):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,l=function(){};return{s:l,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:l}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,c=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw c}}}}function o(t,a){(null==a||a>t.length)&&(a=t.length);for(var e=0,n=Array(a);e<a;e++)n[e]=t[e];return n}var l=[];e.default=function(t,e){var n=document.getElementById(t),o=e||function(){};if(!n){var script=document.createElement("script");script.src=t,script.id=t,document.body.appendChild(script),l.push(o);var c="onload"in script?function(script){script.onload=function(){this.onerror=this.onload=null;var t,e=r(l);try{for(e.s();!(t=e.n()).done;){(0,t.value)(null,script)}}catch(t){e.e(t)}finally{e.f()}l=null},script.onerror=function(){this.onerror=this.onload=null,o(new Error("Failed to load "+t),script)}}:function(script){script.onreadystatechange=function(){if("complete"===this.readyState||"loaded"===this.readyState){this.onreadystatechange=null;var t,e=r(l);try{for(e.s();!(t=e.n()).done;){(0,t.value)(null,script)}}catch(t){e.e(t)}finally{e.f()}l=null}}};c(script)}n&&o&&(window.tinymce?o(null,n):l.push(o))}},566:function(t,e,n){"use strict";n(550)},594:function(t,e,n){t.exports={}},595:function(t,e,n){t.exports={}},596:function(t,e,n){t.exports={}},597:function(t,e,n){t.exports={}},598:function(t,e,n){t.exports={}},603:function(t,e,n){"use strict";n.r(e);n(42),n(48),n(44),n(62),n(60),n(535),n(11),n(98);var r={props:{borderType:{type:String,default:"noBorder"},fontSize:{type:Number,default:14},marginTop:{type:Number,default:0},marginBottom:{type:Number,default:10},liWidth:{type:Number,default:0},liHeight:{type:Number,default:28},marginRight:{type:Number,default:0},currTab:{type:[Number,String],default:0},tabList:{type:[Array,Object],default:function(){return[]}},allPrintTab:{type:[Array,Object],default:function(){return[]}}},data:function(){return{textColor:"red"}},computed:{comRemaining:function(){var t=this.tabList.map((function(i){return i.name}));return this.allPrintTab.filter((function(element){return!t.includes(element)}))}},methods:{selTab:function(i){this.$emit("update:currTab",i),this.$emit("handle")}}},o=(n(634),n(21)),component=Object(o.a)(r,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"tabs",style:{marginTop:t.marginTop+"px",marginBottom:t.marginBottom+"px",fontSize:t.fontSize+"px"}},[Array.isArray(t.tabList)?e("ul",{class:t.borderType},[t._l(t.tabList,(function(n,i){return[!n.hasOwnProperty("isShow")||n.isShow?e("li",{key:n.name,class:{active:i===t.currTab},style:{minWidth:t.liWidth+"px",height:t.liHeight+"px",lineHeight:t.liHeight+"px",marginRight:t.marginRight+"px"},on:{click:function(e){return t.selTab(i)}}},[e("div",[t._v(t._s(n.name))])]):t._e()]})),t._l(t.comRemaining,(function(n){return e("li",{key:n,staticClass:"unclickable",style:{minWidth:t.liWidth+"px",lineHeight:t.liHeight+"px",marginRight:t.marginRight+"px"}},[e("div",[t._v(t._s(n))])])}))],2):e("ul",t._l(Object.keys(t.tabList),(function(n,i){return e("li",{key:i,class:{active:i===t.currTab},style:{minWidth:t.liWidth+"px",marginRight:t.marginRight+"px"},on:{click:function(e){return t.selTab(n)}}},[e("div",[t._v(t._s(n))])])})),0)])}),[],!1,null,"8a32da06",null);e.default=component.exports},631:function(t,e,n){"use strict";n(594)},632:function(t,e,n){"use strict";n(595)},633:function(t,e,n){"use strict";n(596)},634:function(t,e,n){"use strict";n(597)},635:function(t,e,n){"use strict";n(598)},670:function(t,e,n){t.exports={}},684:function(t,e,n){"use strict";n.r(e);var r=n(209);n(97),n(42),n(43),n(79),n(67),n(81),n(63),n(64),n(32),n(37);function o(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.includes(r))continue;n[r]=t[r]}return n}(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(r=0;r<s.length;r++)n=s[r],e.includes(n)||{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}var l=n(24),c=(n(44),n(547),n(551),n(775),n(62),n(60),n(65),n(777),n(535),n(537),n(48),n(11),n(22),n(38),n(98),n(49),n(36),n(45)),d=n(669),m=n.n(d),f=n(545),h=n(700),y=n(701),v=n(702),_=n(703),O=n(220),w=["decoration","additionlist"];function C(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,a){if(t){if("string"==typeof t)return j(t,a);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?j(t,a):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,l=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw l}}}}function j(t,a){(null==a||a>t.length)&&(a=t.length);for(var e=0,n=Array(a);e<a;e++)n[e]=t[e];return n}function x(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function S(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?x(Object(n),!0).forEach((function(e){Object(l.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var D={components:{NewPriceTable:h.default,TotalTable:y.default,UnitTable:v.default,MailTable:_.default,"dialog-XX-success":O.default},props:{pageData:{type:Object,default:function(){return{}}},id:{type:Number,default:null}},data:function(){return{quoteLoadState:0,curWeek:0,allPrintTab:[],priceList:[],initZeroObj:{},initSetupObj:{},initUnitObj:{},initChangeUnitObj:{},initFrightObj:{},initTotalObj:{},xxContentVisible:!1,setup_switch:!1,freight_switch:!1,weight:{},undecorated_columns:[{label:"MODEL",prop:"model",type:"text",align:"left",width:150,extraWidth:50,isFirstColumn:!0},{label:"SETUP",prop:"website_setup"}],decoration_columns:[{label:"PRINT OPTION",prop:"dec_code",type:"radioInput",align:"left",width:150,extraWidth:50},{label:"SETUP",prop:"website_setup"}],addon_columns:[{label:"Addon",prop:"name",type:"text",width:150,extraWidth:50,isFirstColumn:!0},{label:"Setup",prop:"website_setup"}],buy_columns:[{label:"QTY",prop:"project",isFirstColumn:!0}],unit_columns:[{label:"QTY",prop:"total",align:"left",isText:!0}],buyData:[{project:"Setup"},{project:"Unit"},{project:"Freight"},{project:"Total"}],unitData:[{total:"Unit Rate %"},{total:"Setup %"},{total:"Freight %"}],sellData:[{project:"Postcode",summary:"-"},{project:"Setup",summary:0},{project:"Unit",summary:0},{project:"Freight",summary:0},{project:"Total",summary:0}],POA_Config:["111","111.00","999","999.00"],enquiryFormVisible:!1,enquiryForm:{Name:"",Email:"",Phone:"","Customer manager":null,Comments:""},enquiryConfig:[{prop:"Name",type:"input"},{prop:"Email",type:"input"},{prop:"Phone",type:"input"},{prop:"Customer manager",type:"select",selectlist:[],isShow:!0},{prop:"Comments",type:"textarea"}],rules:{Name:[{required:!0,message:"Please enter",trigger:"blur"}],Email:[{required:!0,message:"Please enter the correct format",pattern:/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((.[a-zA-Z0-9_-]{2,3}){1,2})$/,trigger:"blur"}],Phone:[{required:!0,message:"Please enter the correct format",trigger:"blur"}],"Customer manager":[{required:!0,message:"Please select",trigger:"change"}]},mailData:{Url:""},priceToImgVisible:!1,downloadDialogVisible:!1,commentObj:{"Email Address":"",Comments:""},enquiryConfig1:[{prop:"Email Address",type:"input"},{prop:"Comments",type:"input"}],rules1:{"Email Address":[{required:!0,message:"Please enter the correct format",pattern:/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((.[a-zA-Z0-9_-]{2,3}){1,2})$/,trigger:"blur"}]},specificationsObj:{time:null,model:null,decoration:null,addonArr:null},pdfLoading:!1}},computed:S(S({},Object(c.d)("config",{configInfo:function(t){return t.configInfo}})),{},{userInfo:function(){return this.$store.state.userInfo},comCurWeekPrice:function(){return this.priceList[this.curWeek]||{}},comCurPrint:function(){return this.comCurWeekPrice.curPrint},comCurBasePrice:function(){return this.comCurWeekPrice.basePrice[this.comCurPrint]},comLocationNum:function(){return+this.comCurWeekPrice.basePrice[this.comCurPrint].locationNum},comCurBaseColumns:function(){return this.comCurBasePrice.part_columns},comCurBaseTotalColumns:function(){var t=this.comCurWeekPrice.basePrice[this.comCurPrint].total_part_columns,e=this.comLocationNum;return 1===e?t:[].concat(Object(r.a)(t),Object(r.a)(this.comCurWeekPrice.basePrice[this.comCurPrint].remainingAttr)).slice(0,e)},comTotalLabel:function(){return this.comCurBaseTotalColumns.reduce((function(t,e){return t+Number(e.label)}),0)},comSummaryColumns:function(){return[{label:this.comTotalLabel.toString(),prop:"summary"}]},comAttributeList:function(){var t,e={};return null===(t=this.comCurBaseTotalColumns)||void 0===t||t.forEach((function(t){e[t.prop]=t.label})),e.summary=this.comTotalLabel,e},comBasePrice:function(){return this.comCurBasePrice.selectBaseRow},comDecoPrice:function(){var t,e=this;return null!==(t=this.comCurWeekPrice.decoration)&&void 0!==t&&t.length?this.comCurWeekPrice.decoration.map((function(t,n){var r={};if(+t.num>0)for(var i in e.initUnitObj)if(0===n){var o=i.split("_"),l=t["supplier_".concat(o[1])];e.POA_Config.includes(l)?r["".concat(i)]=l:r["".concat(i)]=Object(f.d)(+l,t.num)}else r["".concat(i)]=e.POA_Config.includes(t[i])?t[i]:Object(f.d)(+t[i],t.num);return r})).filter((function(t){return 0!==Object.keys(t).length})):[]},comBuyData:function(){return this.calculateBuyData(),this.buyData},comNoSumCol:function(){return[].concat(Object(r.a)(this.buy_columns),Object(r.a)(this.comCurBaseTotalColumns))},comHasSumCol:function(){return[].concat(Object(r.a)(this.buy_columns),Object(r.a)(this.comCurBaseTotalColumns),Object(r.a)(this.comSummaryColumns))},comMergeColumns:function(){return 1==this.comLocationNum?this.comNoSumCol:this.comHasSumCol},comSellData:function(){return 0!==Object.keys(this.comAttributeList).length&&this.calculateSellData(),this.sellData},comFilterSwitchSellData:function(){var t,e=this;return null===(t=this.comSellData)||void 0===t?void 0:t.filter((function(t,i){return(1!==i||!e.setup_switch)&&((3!==i||!e.freight_switch)&&t)}))}}),methods:S(S({},Object(c.b)(["getUserInfo"])),{},{getQuote:function(){var t=this;this.$axios.post("/uk-api/quote/pricequote",{id:this.id}).then((function(e){localStorage.getItem("unit")&&(t.unitData=JSON.parse(localStorage.getItem("unit")));var n=e.result,l=n.attributeList,c=n.priceList,d=n.default;if(Object.keys(l).length&&Object.keys(c).length){for(var a in l){l[a]?t.initZeroObj[a]=0:delete l[a];var m,f=C(t.unitData);try{for(f.s();!(m=f.n()).done;){var h=m.value;a in h&&""!==h[a]||t.$set(h,a,40)}}catch(t){f.e(t)}finally{f.f()}}for(var y in c){var v={},_=c[y],O=_.decoration,j=_.additionlist,x=o(_,w);v.basePrice=[],v.selectAdditionRow=[],v.curPrint=0,v.name=t.formatDurationString(y),v.nameOrigin=y,v.decorationOrign=Object(r.a)(O),v.decorationID=O.map((function(i){return i.id})),v.decoration=Object(r.a)(O).flatMap((function(t){var e=[];return t.max_color>0&&e.push(S(S({},t),{},{max_num:t.max_color,id:"".concat(t.id,"-1"),decName:t.max_color_name})),t.max_point>0&&e.push(S(S({},t),{},{max_num:t.max_point,id:"".concat(t.id,"-2"),decName:t.max_point_name})),e})),v.additionlist=j;var D=function(){var e,n,r={};if(r.attributeList=t.copyData(l),(null===(e=x[P])||void 0===e?void 0:e.length)>1){var o=function(e){x[P].every((function(n){return t.POA_Config.includes(n[e])}))&&delete r.attributeList[e]};for(var c in l)o(c)}else if(1===(null===(n=x[P])||void 0===n?void 0:n.length)){var d=x[P][0],m=Object.keys(r.attributeList);m.every((function(e){return Object.prototype.hasOwnProperty.call(d,e)&&t.POA_Config.includes(d[e])}))||m.forEach((function(e){Object.prototype.hasOwnProperty.call(d,e)&&t.POA_Config.includes(d[e])&&delete r.attributeList[e]}))}r.name=P,r.data=x[P],r.locationNum=1,r.part_columns=Object.keys(r.attributeList).map((function(t){return{label:r.attributeList[t].toString(),prop:t}}));var f={postcode:"",freight_type:1,freight:{}};r.total_part_columns=t.copyData(r.part_columns).map((function(t){return S(S({},t),f)})),r.remainingAttr=[];for(var h=S(S({},r.part_columns[0]),f),i=1;i<9;i++)if(!Object.keys(r.attributeList).includes("website_qty".concat(i))){var y=S({},h);t.$set(y,"prop","website_qty".concat(i)),r.remainingAttr.push(y)}v.basePrice.push(r),t.allPrintTab.includes(P)||t.allPrintTab.push(P)};for(var P in x)D();t.priceList.push(v)}t.priceList.forEach((function(e,n){e.nameOrigin===(null==d?void 0:d.name)&&(t.curWeek=n,e.decorationOrign.forEach((function(n,r){var o;n.id===(null==d||null===(o=d.decoration)||void 0===o?void 0:o.id)&&t.$set(e,"curPrint",r)}))),e.basePrice.forEach((function(n,o){var l;t.$set(n,"selectBaseRow",n.data[0]||{}),n.decoration_addition=[].concat(Object(r.a)((null===(l=e.decorationOrign)||void 0===l||null===(l=l[o])||void 0===l?void 0:l.decoration_addition)||[]),Object(r.a)(e.additionlist||[]))})),e.decoration.forEach((function(e){t.$set(e,"num",0)}))})),t.initSetupObj=Object.assign({},t.initZeroObj),t.initUnitObj=Object.assign({},t.initZeroObj,{website_setup:0}),t.initFrightObj=Object.assign({},t.initZeroObj),t.buyData=t.buyData.map((function(e){return S(S({},e),t.initSetupObj)})),t.sellData=t.sellData.map((function(e){return S(S({},e),t.initSetupObj)})),t.quoteLoadState=1}else t.quoteLoadState=2})).catch((function(e){console.log("this.quoteLoadState1: ",e),t.quoteLoadState=2}))},formatDurationString:function(input){return input.replace(/(\d+)([a-zA-Z]+)/g,"$1 $2")},getDebFreight:m.a.debounce((function(t){this.getFreight(t)}),200),getNumber:function(t,e,n){parseInt(t.target.value)<n?(this.xxContentVisible=!0,e.label=n):this.xxContentVisible=!1},sortBy:function(t){},customSort:function(t){return function(a,b){return t.indexOf(a.id)-t.indexOf(b.id)}},dividePrice:function(a){return Object(f.a)(+a,100)},getMailData:function(){this.mailData.Url=window.location.href;var t=this.enquiryForm,e=t.Name,n=t.Email,r=t.Phone,o=t.Comments;this.mailData["Customer Name"]=e,this.mailData["Customer Email"]=n,this.mailData["Customer Phone"]=r,this.mailData.Comments=o;var l=this.userInfo,c=l.email,d=l.level,m=l.createTime;this.mailData["Member Account"]=c,this.mailData["Member Grade"]=d.name,this.mailData["Member Registration time"]=m,this.mailData["Quote time"]=this.$utils.formatTime(new Date)},handleDownloadPdf:function(){var t=this;this.pdfLoading=!0,this.$nextTick((function(){t.$refs.priceToImgRef.htmlToPdf(t.pageData.product_code)}))},copyData:function(data){return JSON.parse(JSON.stringify(data))},calculateBuyData:function(){var t=this,e=[];if("{}"!==JSON.stringify(this.comBasePrice)&&e.push(this.comBasePrice),e.push.apply(e,Object(r.a)(this.comDecoPrice).concat(Object(r.a)(this.comCurWeekPrice.selectAdditionRow))),0!==e.length){var n=function(i){var n=t.copyData(e).reduce((function(t,e){return"111"===e[i]||"111.00"===e[i]?e[i]="-":"999"===e[i]||"999.00"===e[i]?e[i]="POA":"-"===t||"POA"===t?t:Object(f.c)(+e[i],t).toFixed(2)}),0);t.$set(t.initUnitObj,i,n)};for(var i in this.initUnitObj)n(i);var o=function(a){var e=t.comCurBaseColumns.findIndex((function(e){return+t.comAttributeList[a]<+e.label}));if(e>0){var n=t.comCurBaseColumns[e-1].prop;t.$set(t.initChangeUnitObj,a,t.initUnitObj[n])}else{var r=t.comCurBaseColumns.length,o=t.comCurBaseColumns[r-1].prop;t.$set(t.initChangeUnitObj,a,t.initUnitObj[o])}if("POA"===t.initChangeUnitObj[a]||"-"===t.initChangeUnitObj[a])t.$set(t.initSetupObj,a,t.initChangeUnitObj[a]),t.$set(t.initFrightObj,a,t.initChangeUnitObj[a]);else{t.$set(t.initSetupObj,a,t.initUnitObj.website_setup);var l,c,d=t.weight.unit_w_local?+t.weight.unit_w_local:0,m=Math.ceil(Object(f.d)(d,t.comAttributeList[a])),h=t.dividePrice(t.configInfo.fuel),y=t.dividePrice(t.configInfo.bag_freight),v=t.dividePrice(t.configInfo.express_freight),_=Object(f.c)(1,y,h),O=Object(f.c)(1,v,h),w=0,C={},j=t.comCurBaseTotalColumns.findIndex((function(t){return t.prop===a}));if(1==+t.comLocationNum||t.comLocationNum>=j+1){var x=t.comCurBaseTotalColumns[1==+t.comLocationNum?0:j]||{};C=x.freight,l=x.freight_type,c=x.postcode}if(1===l&&c>=3)if(m>20){var S=Object(f.b)(m,20),D=Object(f.d)(S,+C.basic),P=Object(f.c)(+C.pickup,D);w=Object(f.d)(P,O)}else w=Object(f.d)(+C.pickup,O);else if(2===l&&c>=3){var T=Object(f.a)(m,5),k=Object(f.d)(+C.minimum,Math.ceil(T));w=Object(f.d)(k,_)}else w=0;t.$set(t.initFrightObj,a,Math.ceil(w).toFixed(2))}if("-"===t.initChangeUnitObj[a]||"POA"===t.initChangeUnitObj[a])t.$set(t.initTotalObj,a,t.initChangeUnitObj[a]);else{var F=Object(f.d)(t.initChangeUnitObj[a],t.comAttributeList[a]);t.$set(t.initTotalObj,a,Object(f.c)(t.initUnitObj.website_setup,F,t.initFrightObj[a]).toFixed(2))}if(t.setup_switch)if("-"===t.initChangeUnitObj[a]||"POA"===t.initChangeUnitObj[a])t.$set(t.initChangeUnitObj,a,t.initChangeUnitObj[a]);else{var A=Math.ceil(t.initSetupObj[a]/t.comAttributeList[a]*100)/100;t.$set(t.initChangeUnitObj,a,Object(f.c)(t.initChangeUnitObj[a],A).toFixed(2))}if(t.freight_switch)if("-"===t.initChangeUnitObj[a]||"POA"===t.initChangeUnitObj[a])t.$set(t.initChangeUnitObj,a,t.initChangeUnitObj[a]);else{var N=Math.ceil(t.initFrightObj[a]/t.comAttributeList[a]*100)/100;t.$set(t.initChangeUnitObj,a,Object(f.c)(t.initChangeUnitObj[a],N).toFixed(2))}};for(var a in this.comAttributeList)o(a);this.setup_switch?this.$set(this.buyData,0,S(S(S({},this.buyData[0]),this.initZeroObj),{summary:0})):this.$set(this.buyData,0,S(S({},this.buyData[0]),this.initSetupObj)),this.$set(this.buyData,1,S(S({},this.buyData[1]),this.initChangeUnitObj)),this.freight_switch?this.$set(this.buyData,2,S(S({},this.buyData[2]),this.initZeroObj)):this.$set(this.buyData,2,S(S({},this.buyData[2]),this.initFrightObj)),this.$set(this.buyData,3,S(S({},this.buyData[3]),this.initTotalObj))}else this.buyData=this.buyData.map((function(e){return S(S({},e),t.initZeroObj)}))},calculateSellData:function(){var t=this,e=this.comBuyData[0],n=this.comBuyData[1],r=this.comBuyData[2],o=0,l=function(i){if("-"===n[i]||"POA"===n[i])t.sellData[0][i]="-",t.sellData[1][i]=n[i],t.sellData[2][i]=n[i],t.sellData[3][i]=n[i],t.sellData[4][i]=n[i];else{var l,c=1===t.comLocationNum?t.comCurBaseTotalColumns[0]:t.comCurBaseTotalColumns.find((function(element){return element.prop===i}));t.sellData[0][i]=c&&""!==c.postcode?c.postcode:"-";var d=null===(l=t.comCurBaseTotalColumns[0])||void 0===l?void 0:l.prop;if(t.unitData[1]&&t.unitData[1][d]){var m=Object(f.c)(t.unitData[1][d]/100,1);t.sellData[1][i]=Object(f.d)(e[i],m).toFixed(2)}else t.sellData[1][i]=e[i];if(t.unitData[0][i]){var h=Object(f.c)(t.unitData[0][i]/100,1);t.sellData[2][i]=Object(f.d)(n[i],h).toFixed(2)}else t.sellData[2][i]=n[i];if(t.unitData[2]&&t.unitData[2][d]){var y=Object(f.c)(t.unitData[2][d]/100,1);t.sellData[3][i]=Object(f.d)(r[i],y).toFixed(2);var v=Object(f.d)(t.initFrightObj[i],y);o=Object(f.c)(o,v).toFixed(2)}else t.sellData[3][i]=r[i],o=Object(f.c)(o,t.initFrightObj[i]).toFixed(2);var _=Object(f.d)(t.sellData[2][i],t.comAttributeList[i]);t.$set(t.sellData[4],i,Object(f.c)(t.sellData[1][i],_,t.sellData[3][i]).toFixed(2))}};for(var i in this.comAttributeList)l(i);if("-"!==this.sellData[2].summary&&"POA"!==this.sellData[2].summary)if(this.freight_switch){var c=Math.ceil(o/this.comAttributeList.summary*100)/100;this.sellData[2].summary=Object(f.c)(this.sellData[2].summary,c).toFixed(2),this.sellData[3].summary=0;var a=Object(f.d)(this.sellData[2].summary,this.comAttributeList.summary);this.sellData[4].summary=Object(f.c)(this.sellData[1].summary,a).toFixed(2)}else this.sellData[3].summary=o,this.sellData[4].summary=Object(f.c)(o,this.sellData[4].summary).toFixed(2)},getChildIdx:function(t){var e;this.xxContentVisible=!0,this.$set(this.comCurBaseTotalColumns[t-1],"label",null===(e=this.comCurBaseColumns[0])||void 0===e?void 0:e.label)},setMaxNum:function(t){t>7?this.comCurBasePrice.locationNum=7:t<1&&(this.comCurBasePrice.locationNum=1)}},Object(c.c)({openDialog:"openDialog",setLoading:"product/setLoading"}))},P=(n(778),n(21)),component=Object(P.a)(D,(function(){var t,e=this,n=e._self._c;return n("div",[0==e.quoteLoadState?n("div",{directives:[{name:"loading",rawName:"v-loading",value:!0,expression:"true"}],staticClass:"com-loading"}):1==e.quoteLoadState?n("div",[n("tab-nav",{attrs:{borderType:"allBorder",liWidth:100,liHeight:40,marginRight:5,currTab:e.curWeek,tabList:e.priceList},on:{"update:currTab":function(t){e.curWeek=t},"update:curr-tab":function(t){e.curWeek=t}}}),e._v(" "),e._l(e.priceList,(function(t,o){var l,c,d,m;return n("div",{directives:[{name:"show",rawName:"v-show",value:e.curWeek==o,expression:"curWeek == indexs"}],key:t.name},[n("div",[n("tab-nav",{attrs:{borderType:"incompleteBorder",currTab:t.curPrint,tabList:t.basePrice,allPrintTab:e.allPrintTab,marginTop:0,marginRight:5,marginBottom:(null===(l=t.basePrice)||void 0===l?void 0:l.length)>1?7:0},on:{"update:currTab":function(n){return e.$set(t,"curPrint",n)},"update:curr-tab":function(n){return e.$set(t,"curPrint",n)},handle:function(n){return e.sortBy(t)}}})],1),e._v(" "),e._l(t.basePrice,(function(o,l){var c;return n("div",{directives:[{name:"show",rawName:"v-show",value:t.curPrint==l,expression:"items.curPrint == index"}],key:o.name},[n("new-price-table",{attrs:{tableColumns:[].concat(Object(r.a)(e.undecorated_columns),Object(r.a)(o.part_columns)),tableData:o.data,tableType:"Undecorated",curPrint:o.name,curModel:null===(c=t.decorationOrign[l])||void 0===c?void 0:c.model,data:t,selectRow:o.selectBaseRow},on:{"update:selectRow":function(t){return e.$set(o,"selectBaseRow",t)},"update:select-row":function(t){return e.$set(o,"selectBaseRow",t)}}})],1)})),e._v(" "),null!==(c=t.decoration)&&void 0!==c&&c.length||null!==(d=t.basePrice)&&void 0!==d&&null!==(d=d[t.curPrint])&&void 0!==d&&null!==(d=d.decoration_addition)&&void 0!==d&&d.length?n("new-price-table",{attrs:{tableData:t.decoration,tableColumns:[].concat(Object(r.a)(e.decoration_columns),Object(r.a)(e.comCurBaseColumns)),tableType:"Decoration",marginBottom:0,hasDecAdd:null===(m=t.basePrice)||void 0===m||null===(m=m[t.curPrint])||void 0===m||null===(m=m.decoration_addition)||void 0===m?void 0:m.length}}):e._e(),e._v(" "),e._l(t.basePrice,(function(o,l){return n("div",{directives:[{name:"show",rawName:"v-show",value:t.curPrint==l&&o.decoration_addition.length,expression:"items.curPrint == index && item.decoration_addition.length"}],key:o.name+l},[n("new-price-table",{attrs:{tableData:o.decoration_addition,tableColumns:[].concat(Object(r.a)(e.addon_columns),Object(r.a)(o.part_columns)),isCheckBox:!0,tableType:"Addon",multipleSelection:t.selectAdditionRow},on:{"update:multipleSelection":function(n){return e.$set(t,"selectAdditionRow",n)},"update:multiple-selection":function(n){return e.$set(t,"selectAdditionRow",n)}}})],1)}))],2)}))],2):n("div",{staticClass:"quote-tips"},[e._v("\n Current item prices are missing, please contact"),n("a",{attrs:{href:"mailto:Info@promocollection.uk"}},[e._v("\n info@promocollection.uk")])]),e._v(" "),n("no-ssr",[1==e.quoteLoadState?n("div",[n("form-dialog",{attrs:{emailForm:e.enquiryForm,enquiryConfig:e.enquiryConfig,visible:e.enquiryFormVisible,rules:e.rules,labelWidth:null!==(t=e.enquiryConfig[3].selectlist)&&void 0!==t&&t.length?140:82},on:{"update:visible":function(t){e.enquiryFormVisible=t},handleSend:e.sendPriceMail}}),e._v(" "),n("mail-table",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],ref:"mailtable",attrs:{mailData:e.mailData}},[n("price-to-img",{attrs:{pageData:e.pageData,specificationsObj:e.specificationsObj,tableData:e.comFilterSwitchSellData,tableColumns:e.comMergeColumns,comLocationNum:e.comLocationNum,emailForm:e.commentObj}})],1),e._v(" "),n("el-dialog",{ref:"dialogRef",attrs:{"lock-scroll":!1,title:"Customer Quote",visible:e.priceToImgVisible,"custom-class":"price-to-img-dialog"},on:{"update:visible":function(t){e.priceToImgVisible=t}}},[n("price-to-img",{ref:"priceToImgRef",attrs:{isImgSrc:!1,loading:e.pdfLoading,pageData:e.pageData,specificationsObj:e.specificationsObj,tableData:e.comFilterSwitchSellData,tableColumns:e.comMergeColumns,comLocationNum:e.comLocationNum,emailForm:e.commentObj},on:{"update:loading":function(t){e.pdfLoading=t}}}),e._v(" "),n("p",{staticClass:"tips"},[e._v("Change default standard comment:")]),e._v(" "),n("el-input",{model:{value:e.commentObj.Comments,callback:function(t){e.$set(e.commentObj,"Comments",t)},expression:"commentObj.Comments"}}),e._v(" "),n("div",{staticClass:"btn-wrap"},[n("el-button",{staticClass:"button-black button-margin",attrs:{size:"medium",loading:e.pdfLoading},on:{click:e.handleDownloadPdf}},[e._v("Download")])],1)],1),e._v(" "),n("price-to-img",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],ref:"pdf",attrs:{loading:e.pdfLoading,pageData:e.pageData,specificationsObj:e.specificationsObj,tableData:e.comFilterSwitchSellData,tableColumns:e.comMergeColumns,comLocationNum:e.comLocationNum,emailForm:e.commentObj},on:{"update:loading":function(t){e.pdfLoading=t}}}),e._v(" "),n("dialog-XX-success",{attrs:{visible:e.xxContentVisible,imgType:!1,content:"This quantity is below the MOQ for this product"},on:{"update:visible":function(t){e.xxContentVisible=t}}})],1):e._e()])],1)}),[],!1,null,"33f0dc7e",null);e.default=component.exports;installComponents(component,{TabNav:n(603).default,FormDialog:n(704).default,PriceToImg:n(705).default})},700:function(t,e,n){"use strict";n.r(e);n(537),n(44),n(60),n(42),n(535),n(11),n(22);var r=n(545),o={filters:{multiplyPrice:function(t,e,n){return/^[0-9]+.?[0-9]*$/.test(t)?Object(r.d)(t,e.num):t},plusPrice:function(t,e){return e?Object(r.c)(t,e):t},differencePrice:function(t,e,n,o){if(/^[0-9]+.?[0-9]*$/.test(t)){var l=n.split("_"),c=+e["supplier_".concat(l[1])],d=Object(r.d)(e.num-1,c),m=Object(r.c)(t,d),f=+o["supplier_".concat(l[1])],h=Object(r.d)(o.num-1,f),y=Object(r.c)(+o[n],h);return m>y?"+".concat(Object(r.b)(m,y)):Object(r.b)(m,y)}return t}},props:{hasDecAdd:{type:Number,default:0},tableData:{type:Array,default:function(){return[]}},tableColumns:{type:Array,default:function(){return[]}},operateWith:{type:String,default:"100%"},isCheckBox:{type:Boolean,default:!1},tableType:{type:String,default:"Undecorated"},decorationObj:{type:Object,default:function(){return{}}},selectId:{type:Number,default:null},selectRow:{type:Object,default:function(){return{}}},multipleSelection:{type:Array,default:function(){return[]}},selectDecoration:{type:Object,default:function(){return{}}},curPrint:{type:String,default:""},curModel:{type:String,default:""},marginBottom:{type:Number,default:20},decorationMultiple:{type:Number,default:1},headerShow:{type:Boolean,default:!0}},data:function(){return{setupConfigList:[{id:1,name:"/col"},{id:2,name:"/desgin"},{id:3,name:"/pos"},{id:4,name:"/pos desgin"},{id:5,name:"POA"},{id:6,name:"Waived"}],setupTitleList:["1st","2nd","3rd"]}},computed:{getTableContainerClass:function(){return{"table-container":!0,"border-Decoration":"Decoration"===this.tableType&&this.hasDecAdd}},comTitle:function(){return"Undecorated"===this.tableType?"Includes ".concat(this.curModel):"Decoration"===this.tableType?"Add-Ons":this.curPrint},comDisplayCss:function(){return"Comparison"===this.tableType?"1px solid #efefef":"none"},comMultipleSelID:function(){return this.multipleSelection.map((function(i){return i.id}))},comTableData:function(){return this.tableType,this.tableData}},mounted:function(){"{}"!==JSON.stringify(this.selectRow)&&this.$refs.elTable.toggleRowSelection(this.selectRow)},methods:{judgeProp:function(t,e,n){if(0===n&&"Decoration"===this.tableType){var r=e.split("_");return t["supplier_".concat(r[1])]}return t[e]},$_setupPriceFilter:function(t){var e=this.setupConfigList.filter((function(e){return e.id===t}));return e.length>0?e[0].name:""},isNumber:function(t){return/^[0-9]+.?[0-9]*$/.test(t)},handleSelectionChange:function(t){this.$emit("update:multipleSelection",t)},dialogCheck:function(t,e){if(!this.isCheckBox){if(this.$refs.elTable.clearSelection(),0===t.length)return this.$emit("update:selectId",null),void this.$emit("update:selectRow",{});e&&(this.$emit("update:selectId",e.id),this.$emit("update:selectRow",e),this.$refs.elTable.toggleRowSelection(e,!0))}},addCar:function(t){var e=Object.assign({},t);e.parentId=this.decorationObj.parentId,this.$emit("update:selectRow",e),this.$refs.elTable.toggleRowSelection(t)},getRowKey:function(t){return t.id},arraySpanMethod:function(t){t.row,t.column,t.rowIndex;var e=t.columnIndex;return"Decoration"===this.tableType&&0===e?[0,1]:"Decoration"===this.tableType&&1===e?[1,2]:void 0},tableRowClassName:function(t){t.row;return"Decoration"===this.tableType?this.decorationMultiple?"borderNone":"hiddenRow":"fontBold"},handleSelectable:function(t,e){return 5!==t.website_setup_id},getNumber:function(t,e,n){parseInt(t)>n&&(e.num=n)}}},l=(n(631),n(21)),component=Object(l.a)(o,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"wrap",style:{marginBottom:t.marginBottom+"px"}},["Addon"!=t.tableType?e("p",{staticClass:"tb-title",domProps:{innerHTML:t._s(t.comTitle)}}):t._e(),t._v(" "),e("div",{class:t.getTableContainerClass},[e("el-table",{ref:"elTable",staticStyle:{width:"100%"},attrs:{"show-header":"Addon"!=t.tableType,data:t.comTableData,"header-cell-style":{backgroundColor:"#fff",fontWeight:"normal",fontSize:"14px",fontFamily:"Proxima Nova",color:"#000","--comDisplayCss":t.comDisplayCss},"row-key":"id","span-method":t.arraySpanMethod,"row-class-name":t.tableRowClassName},on:{"selection-change":t.handleSelectionChange,select:t.dialogCheck}},["Comparison"!=t.tableType?e("el-table-column",{attrs:{type:"selection",width:"50",align:"center","reserve-selection":!0,selectable:t.handleSelectable}}):t._e(),t._v(" "),t._l(t.tableColumns,(function(n){return[n.type?e("el-table-column",{key:n.prop,attrs:{align:n.align?n.align:"left",prop:n.prop,label:n.label,formatter:n.formatter,width:n.width,sortable:n.sortable},scopedSlots:t._u([{key:"default",fn:function(r){var o=r.row;return["radioInput"==n.type?[e("div",{staticClass:"flex between"},[e("span",[t._v(t._s(o.decName))]),t._v(" "),e("el-input",{staticClass:"edit-input",attrs:{min:"0",max:o.max_num,type:"number",size:"small"},on:{input:function(e){return t.getNumber(e,o,o.max_num)}},model:{value:o.num,callback:function(e){t.$set(o,"num",e)},expression:"row.num"}})],1)]:e("div",[o.filter_boolean?[e("div",{staticClass:"triangle"}),t._v(" "),e("div",{staticClass:"text"},[t._v("Eco")])]:t._e(),t._v("\n "+t._s(o[n.prop])+"\n "),"Undecorated"==t.tableType?e("el-popover",{attrs:{placement:"top-start",trigger:"hover"}},[e("i",{staticClass:"el-icon-warning",attrs:{slot:"reference"},slot:"reference"}),t._v(" "),e("p",{staticClass:"popover-text"},[t._v(t._s(t.comTitle))])]):t._e()],2)]}}],null,!0)}):t._e(),t._v(" "),n.type?t._e():e("el-table-column",{key:n.prop,attrs:{align:n.align?n.align:"center",prop:n.prop,label:n.label,formatter:n.formatter,sortable:n.sortable,"show-overflow-tooltip":"",width:(798-t.tableColumns[0].width-t.tableColumns[0].extraWidth)/(t.tableColumns.length-1)},scopedSlots:t._u([{key:"default",fn:function(r){var o=r.row,l=r.$index;return["website_setup"===n.prop?e("div",[0===l&&"Decoration"==t.tableType?e("div",[o.supplier_setup_id<5||7==o.supplier_setup_id?e("span",[t._v("£ "+t._s(o.supplier_setup?parseFloat(o.supplier_setup).toFixed(2):"0.00"))]):t._e(),t._v(" "),e("span",[t._v(t._s(t.$_setupPriceFilter(o.supplier_setup_id)))])]):e("div",[o.website_setup_id<5||7==o.website_setup_id?e("span",[t._v("£ "+t._s(o.website_setup?parseFloat(o.website_setup).toFixed(2):"0.00"))]):t._e(),t._v(" "),e("span",[t._v(t._s(t.$_setupPriceFilter(o.website_setup_id)))])])]):"111"==t.judgeProp(o,n.prop,l)||"111.00"==t.judgeProp(o,n.prop,l)?e("div",[t._v("\n -\n ")]):"999"==t.judgeProp(o,n.prop,l)||"999.00"===t.judgeProp(o,n.prop,l)?e("div",[t._v("\n POA\n ")]):""===t.judgeProp(o,n.prop,l)?e("div",[t._v("0")]):e("div",[t.isNumber(t.judgeProp(o,n.prop,l))&&!n.isFirstColumn?e("span",[t._v("£")]):t._e(),t._v(" "),e("span",[t._v(t._s(t.judgeProp(o,n.prop,l)))])])]}}],null,!0)})]}))],2)],1)])}),[],!1,null,"8da20436",null);e.default=component.exports},701:function(t,e,n){"use strict";n.r(e);n(97),n(62),n(98),n(535),n(22);var r=n(545),o={filters:{differencePrice:function(a,t,e,n){return/^[0-9]+(\.[0-9]*)?$/.test(a)?n.includes(t)||n.includes(e)?"111"===t||"111.00"===t||"111"===e||"111.00"===e?"-":"999"===t||"999.00"===t||"999"===e||"999.00"===e?"POA":void 0:t===e?0:+t>+e?"-£ ".concat(Object(r.b)(t,e)):+t<+e?"+£ ".concat(Object(r.b)(e,t)):"Waived":a||"Waived"}},props:{tableData:{type:Array,default:function(){return[]}},tableColumns:{type:Array,default:function(){return[]}},tableType:{type:String,default:""},curDecoration:{type:Object,default:function(){}},indexDecoration:{type:Object,default:function(){}},comLocationNum:{type:Number,default:1},curOrder:{type:String,default:""},min:{type:String,default:""},title:{type:String,default:""}},data:function(){return{poaConfig:["111","111.00","999","999.00"]}},methods:{getNumber:function(t,e){parseInt(t.target.value)<this.min&&this.$emit("send-idx",e)}},computed:{comWidth:function(){return 800/this.tableColumns.length-1}}},l=(n(632),n(21)),component=Object(l.a)(o,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"wrap"},[e("p",{staticClass:"tb-title",class:{left:t.tableType}},[e("span",[t._v(t._s(t.title))]),t._v(" "),"Sell Price"==t.title&&1!==t.comLocationNum?e("span",{style:{width:t.comWidth+"px"}},[t._v("Total")]):t._e()]),t._v(" "),e("el-table",{ref:"elTable",attrs:{border:"",data:t.tableData,"header-cell-style":{backgroundColor:"#fff",color:"#606266",fontWeight:500,fontSize:"16px"},stripe:""}},t._l(t.tableColumns,(function(n,r){return e("el-table-column",{key:"".concat(t.curOrder,"-").concat(n.prop),attrs:{align:n.align?n.align:"center",prop:n.prop,label:n.label,formatter:n.formatter,sortable:n.sortable},scopedSlots:t._u([{key:"header",fn:function(o){return["Buy Price"==t.title&&1===t.comLocationNum?e("div",[e("el-input",{directives:[{name:"show",rawName:"v-show",value:!n.isFirstColumn,expression:"!item.isFirstColumn"}],attrs:{size:"small",type:"number",min:t.min},on:{blur:function(e){return t.getNumber(e,r)}},model:{value:n.label,callback:function(e){t.$set(n,"label",e)},expression:"item.label"}}),t._v(" "),e("span",{directives:[{name:"show",rawName:"v-show",value:n.isFirstColumn,expression:"item.isFirstColumn"}]},[t._v(t._s(n.label))])],1):e("div",[e("span",[t._v(t._s(n.label))])])]}},{key:"default",fn:function(r){return[t.tableType&&!n.isFirstColumn?[e("span",[t._v(t._s(t._f("differencePrice")(r.row[n.prop],t.curDecoration[n.prop],t.indexDecoration[n.prop],t.poaConfig)))])]:[("string"==typeof r.row[n.prop]&&r.row[n.prop].includes(".")||"number"==typeof r.row[n.prop])&&!n.isFirstColumn?e("span",[t._v("£")]):t._e(),t._v(" "),e("span",[t._v(t._s(r.row[n.prop]?r.row[n.prop]:"0.00"))])]]}}],null,!0)})})),1)],1)}),[],!1,null,"8afd0988",null);e.default=component.exports},702:function(t,e,n){"use strict";n.r(e);var r={props:{tableData:{type:Array,default:[]},tableColumns:{type:Array,default:[]},operateWith:{type:String,default:"100%"},selectionShow:{type:Boolean,default:!1},handleShow:{type:Boolean,default:!1}},methods:{saveUnitData:function(t,e){this.tableData[e]=t,localStorage.setItem("unit",JSON.stringify(this.tableData))}}},o=(n(633),n(21)),component=Object(o.a)(r,(function(){var t=this,e=t._self._c;return e("div",[e("p",{staticClass:"tb-title"},[t._v("Markup %")]),t._v(" "),e("el-table",{ref:"elTable",style:{width:t.operateWith},attrs:{border:"",data:t.tableData,"highlight-current-row":!1,"header-cell-style":{backgroundColor:"#fff",color:"#606266",fontWeight:500,fontSize:"16px"}}},[t._l(t.tableColumns,(function(n){return[n.isText?e("el-table-column",{key:n.prop,attrs:{align:"center",prop:n.prop,label:n.label,formatter:n.formatter,width:n.width,sortable:n.sortable}}):t._e(),t._v(" "),n.isText?t._e():e("el-table-column",{key:n.prop,attrs:{prop:n.prop,label:n.label,formatter:n.formatter,width:n.width,align:n.align?n.align:"center",sortable:n.sortable},scopedSlots:t._u([{key:"default",fn:function(r){var o=r.row,l=r.$index;return[e("el-input",{staticClass:"edit-input",attrs:{size:"small",type:"number",min:"0"},on:{input:function(e){return t.saveUnitData(o,l)}},model:{value:o[n.prop],callback:function(e){t.$set(o,n.prop,e)},expression:"row[item.prop]"}})]}}],null,!0)})]}))],2)],1)}),[],!1,null,"931e8840",null);e.default=component.exports},703:function(t,e,n){"use strict";n.r(e);var r={props:{mailData:{},buyData:{}},data:function(){return{objStyle:{fontWeight:"bold",backgroundColor:"#efefef"}}}},o=n(21),component=Object(o.a)(r,(function(){var t=this,e=t._self._c;return e("div",[e("table",{staticStyle:{"border-collapse":"collapse","font-size":"14px","table-layout":"fixed",width:"100%","min-width":"800px"},attrs:{border:"1",bordercolor:"#000"}},[e("tbody",[t._l(t.mailData,(function(n,r,i){return e("tr",{key:r},[e("td",{staticStyle:{padding:"18px 0",width:"40%","text-align":"center",color:"#000"},style:(1==i||10==i)&&t.objStyle},[t._v("\n "+t._s(r)+"\n ")]),t._v(" "),e("td",{staticStyle:{padding:"18px 10px"}},["string"==typeof n?e("div",[-1!=n.indexOf("@")||-1!=n.indexOf("http")?e("a",{staticStyle:{color:"#6495ed","text-decoration":"none"},attrs:{href:n}},[e("span",[t._v(t._s(n))])]):e("span",[t._v(t._s(n))])]):["Object"==t.$utils.checkType(n)?e("div",{staticStyle:{width:"100%",display:"flex","justify-content":"space-between"}},t._l(n,(function(n,i){return e("div",{key:i,staticStyle:{"text-align":"left",width:"100%"}},[e("span","QTY"==r?[t._v(t._s(n))]:[t._v("$"+t._s(n))])])})),0):t._l(n,(function(n,i){return e("div",{key:i,staticStyle:{"line-height":"20px"}},[e("span",[t._v(t._s(n))])])}))]],2)])})),t._v(" "),e("tr",[e("td",{staticStyle:{padding:"20px"},attrs:{colspan:"2"}},[t._t("default")],2)])],2)])])}),[],!1,null,"13e7bb30",null);e.default=component.exports},704:function(t,e,n){"use strict";n.r(e);n(42);var r=n(24),o=(n(43),n(44),n(535),n(63),n(64),n(48),n(11),n(36),n(554)),l=n(45);function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function d(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){Object(r.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var m={components:{Tinymce:o.default},props:{title:{type:String,default:"Send Email"},sendbtnCext:{type:String,default:"Send Enquiry"},cancelbtnCext:{type:String,default:"Cancel"},top:{type:String,default:"5vh"},isSendPdf:{type:Boolean,default:!1},emailForm:{},enquiryConfig:[],rules:{},labelWidth:{type:Number,default:150},marginBottom:{type:Number,default:20},visible:{type:Boolean,default:!1}},data:function(){return{downloading:!1}},computed:{comEnquiryConfig:function(){return this.enquiryConfig.filter((function(t){if(!t.hasOwnProperty("isShow")||t.isShow)return t}))}},methods:d(d({},Object(l.c)("product",["setLoading"])),{},{handleClose:function(){this.$emit("update:visible",!1)},handleSend:function(){var t=this;this.$refs.ruleForm.validate((function(e){if(!e)return!1;t.setLoading(!0),t.isSendPdf,t.$emit("handleSend")}))}})},f=(n(635),n(21)),component=Object(f.a)(m,(function(){var t=this,e=t._self._c;return e("el-dialog",{attrs:{"lock-scroll":!1,title:t.title,visible:t.visible,width:"700px","before-close":t.handleClose,top:t.top,"show-close":!1},on:{"update:visible":function(e){t.visible=e}}},[e("el-form",{ref:"ruleForm",attrs:{model:t.emailForm,rules:t.rules}},t._l(t.comEnquiryConfig,(function(n){return e("el-form-item",{key:n.prop,style:{marginBottom:t.marginBottom+"px"},attrs:{label:n.prop,"label-width":t.labelWidth,prop:n.prop}},["text"===n.type?e("span",[t._v(t._s(t.emailForm[n.prop]))]):t._e(),t._v(" "),"input"===n.type?e("el-input",{attrs:{type:n.type,clearable:""},model:{value:t.emailForm[n.prop],callback:function(e){t.$set(t.emailForm,n.prop,e)},expression:"emailForm[item.prop]"}}):"textarea"===n.type?e("el-input",{attrs:{type:"textarea",rows:5,clearable:""},model:{value:t.emailForm[n.prop],callback:function(e){t.$set(t.emailForm,n.prop,e)},expression:"emailForm[item.prop]"}}):"tinymce"===n.type?e("tinymce",{attrs:{height:240},model:{value:t.emailForm[n.prop],callback:function(e){t.$set(t.emailForm,n.prop,e)},expression:"emailForm[item.prop]"}}):"select"===n.type&&n.isShow?e("el-select",{attrs:{clearable:"",filterable:"",placeholder:n.placeholder?n.placeholder:"Please select"},model:{value:t.emailForm[n.prop],callback:function(e){t.$set(t.emailForm,n.prop,e)},expression:"emailForm[item.prop]"}},t._l(n.selectlist,(function(i){return e("el-option",{key:i.id,attrs:{label:i.name,value:i.name}})})),1):"checkbox"===n.type?e("el-checkbox-group",{model:{value:t.emailForm[n.prop],callback:function(e){t.$set(t.emailForm,n.prop,e)},expression:"emailForm[item.prop]"}},t._l(n.selectlist,(function(i,n){return e("el-checkbox",{key:n,attrs:{label:n+1}},[t._v(t._s(i))])})),1):t._e()],1)})),1),t._v(" "),e("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{attrs:{type:"primary",loading:t.$store.state.product.loading},on:{click:t.handleSend}},[t._v(t._s(t.sendbtnCext))]),t._v(" "),e("el-button",{attrs:{type:"info",plain:""},on:{click:t.handleClose}},[t._v(t._s(t.cancelbtnCext))])],1)],1)}),[],!1,null,"2aff96f1",null);e.default=component.exports;installComponents(component,{Tinymce:n(554).default})},705:function(t,e,n){"use strict";n.r(e);n(43),n(79),n(62),n(98),n(535),n(11);var r=n(671),o=n.n(r),l={props:{pageData:{type:Object,default:{}},specificationsObj:{type:Object,default:{}},tableData:{type:Array,default:[]},tableColumns:{type:Array,default:[]},comLocationNum:{type:Number,default:1},emailForm:{type:Object,default:{}},loading:{type:Boolean,default:!1},isImgSrc:{type:Boolean,default:!0},width:{type:String,default:"100%"}},data:function(){return{headerColumns:[{label:"LeadTime",prop:"time",type:"pre"},{label:"Model",prop:"model",type:"pre"},{label:"Decoration",prop:"decoration",type:"pre"},{label:"Add On",prop:"addonArr",type:"pre"}]}},computed:{comInfo:function(){var t;return null===(t=this.pageData)||void 0===t?void 0:t.main},comWidth:function(){return 100/this.tableColumns.length+"%"}},created:function(){this.isImgSrc||this.getBase64Image(this.comInfo.image,"productImg")},methods:{getColumnHeaderStyle:function(t){return"project"===t.prop?{"font-weight":"bold"}:{}},getBase64Image:function(t,e){var n=this,image=new Image;image.src=t+"?v="+Math.random(),image.crossOrigin="*",image.onload=function(){var t=n.drawBase64Image(image);n.$refs[e].src=t}},drawBase64Image:function(img){var canvas=document.createElement("canvas");return canvas.width=img.width,canvas.height=img.height,canvas.getContext("2d").drawImage(img,0,0,img.width,img.height),canvas.toDataURL("image/png")},htmlToPdf:function(title){var t=this,element=this.$refs.printArea,e=[element.offsetWidth,element.offsetHeight];o()(element,{scale:1.5,useCORS:!0,tainttest:!0,logging:!0}).then((function(canvas){var n=canvas.toDataURL("image/png");t.downloadImage(n,e,title),t.$emit("update:loading",!1)})).catch((function(){t.$emit("update:loading",!1)}))},getUrlBase64:function(t,e){return new Promise((function(n){var canvas=document.createElement("canvas"),r=canvas.getContext("2d"),img=new Image;img.crossOrigin="Anonymous",img.src=t,img.onload=function(){canvas.height=e[1],canvas.width=e[0],r.drawImage(img,0,0,e[0],e[1]);var t=canvas.toDataURL("image/png");canvas=null,n(t)}}))},downloadImage:function(t,e,title){this.getUrlBase64(t,e).then((function(t){var link=document.createElement("a");link.href=t,link.download="".concat(title,".png"),link.click()}))}}},c=n(21),component=Object(c.a)(l,(function(){var t=this,e=t._self._c;return e("div",{ref:"printArea",staticStyle:{"font-family":"ProximaNova-Regular","background-color":"#fff",padding:"20px","word-break":"break-word","box-sizing":"border-box"}},[e("table",[e("tbody",[e("tr",[e("td",{staticStyle:{"margin-right":"14px"}},[t.isImgSrc?e("img",{attrs:{src:t.comInfo.image,width:"320",height:"320"}}):e("img",{ref:"productImg",attrs:{width:"250",height:"250"}})]),t._v(" "),e("td",{staticStyle:{"vertical-align":"top"}},[e("p",{staticStyle:{"font-weight":"bold","font-size":"22px","padding-bottom":"24px",color:"#00213B"}},[e("span",{staticStyle:{"margin-right":"5px"}},[t._v(t._s(t.pageData.product_code))]),t._v(" "),e("span",[t._v(t._s(t.pageData.product_name))])]),t._v(" "),e("p",{staticStyle:{"line-height":"20px",color:"#00213B","font-size":"14px"},domProps:{innerHTML:t._s(t.comInfo.description)}})])])])]),t._v(" "),e("div",[e("p",{staticStyle:{"font-weight":"bold","font-size":"17px",margin:"12px 0 8px",color:"#00213B"}},[t._v("Specifications")]),t._v(" "),e("table",{staticStyle:{width:"100%","border-collapse":"collapse","font-size":"14px","table-layout":"fixed","text-align":"center"}},[e("tbody",[e("tr",{staticStyle:{"background-color":"#F7F8FC","font-weight":"bold"}},t._l(t.headerColumns,(function(n,r){return e("td",{key:r,staticStyle:{padding:"10px 0",color:"#00213B",width:"25%","font-size":"14px",border:"1px solid #EFEFEF"}},[t._v(t._s(n.label))])})),0),t._v(" "),e("tr",t._l(t.headerColumns,(function(n,r){return e("td",{key:r,staticStyle:{padding:"10px 0 6px",color:"#00213B",border:"1px solid #EFEFEF"}},[t.specificationsObj[n.prop]?e("div",["addonArr"!=n.prop?e("span",[t._v(t._s(t.specificationsObj[n.prop]))]):t._l(t.specificationsObj.addonArr,(function(n,r){return e("div",{key:r,staticStyle:{"padding-bottom":"4px"}},[t._v(t._s(n))])}))],2):e("span",[t._v("-")])])})),0)])])]),t._v(" "),e("div",[e("p",{staticStyle:{"font-weight":"bold","font-size":"17px",margin:"12px 0 8px",color:"#00213B"}},[t._v("Quote")]),t._v(" "),e("table",{staticStyle:{width:"100%","border-collapse":"collapse","font-size":"14px","table-layout":"fixed","text-align":"center"}},[e("tbody",[1!==t.comLocationNum?e("tr",{staticStyle:{"background-color":"#F7F8FC","font-weight":"bold"}},[e("td",{staticStyle:{padding:"10px 0",color:"#00213B",border:"1px solid #EFEFEF"},attrs:{colspan:t.tableColumns.length-1}},[t._v("Quote")]),t._v(" "),e("td",{staticStyle:{padding:"10px 0",color:"#00213B",border:"1px solid #EFEFEF"},style:{width:t.comWidth}},[t._v("Total")])]):t._e(),t._v(" "),e("tr",{staticStyle:{"background-color":"#F7F8FC","font-weight":"bold"}},t._l(t.tableColumns,(function(n,r){return e("td",{key:r,staticStyle:{padding:"10px 0",color:"#00213B",border:"1px solid #EFEFEF"},style:{width:t.comWidth}},[t._v(t._s(n.label))])})),0),t._v(" "),t._l(t.tableData,(function(n){return e("tr",{key:n.project,staticStyle:{padding:"10px 0"}},t._l(t.tableColumns,(function(r){return e("td",{key:r.prop,staticStyle:{padding:"10px 0",color:"#00213B",border:"1px solid #EFEFEF","white-space":"nowrap"},style:t.getColumnHeaderStyle(r)},[t._v("\n "+t._s(n[r.prop].includes(".")?"£":"")+" "+t._s(n[r.prop]?n[r.prop]:"0.00")+"\n ")])})),0)}))],2)])]),t._v(" "),t.emailForm.Comments?e("div",{staticStyle:{color:"#00213B"}},[e("p",{staticStyle:{margin:"20px 0"}},[t._v(t._s(t.emailForm.Comments))])]):t._e()])}),[],!1,null,null,null);e.default=component.exports},775:function(t,e,n){"use strict";var r=n(2),o=n(776),l=n(50),c=n(33),d=n(55),m=n(155);r({target:"Array",proto:!0},{flatMap:function(t){var e,n=c(this),r=d(n);return l(t),(e=m(n,0)).length=o(e,n,n,r,0,1,t,arguments.length>1?arguments[1]:void 0),e}})},776:function(t,e,n){"use strict";var r=n(103),o=n(55),l=n(225),c=n(68),d=function(t,e,source,n,m,f,h,y){for(var element,v,_=m,O=0,w=!!h&&c(h,y);O<n;)O in source&&(element=w?w(source[O],O,e):source[O],f>0&&r(element)?(v=o(element),_=d(t,e,element,v,_,f-1)-1):(l(_+1),t[_]=element),_++),O++;return _};t.exports=d},777:function(t,e,n){"use strict";n(218)("flatMap")},778:function(t,e,n){"use strict";n(670)}}]);
- //# sourceMappingURL=dcc85bc.js.map
|