(window.webpackJsonp=window.webpackJsonp||[]).push([[7,47,52],{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){y&&(t>Number.MAX_SAFE_INTEGER||t1?arguments[1]:void 0)}}),l(c)},550: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)},593:function(t,e,n){t.exports={}},594:function(t,e,n){t.exports={}},595:function(t,e,n){t.exports={}},596:function(t,e,n){t.exports={}},602:function(t,e,n){"use strict";n.r(e);n(42),n(48),n(44),n(61),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(593)},632:function(t,e,n){"use strict";n(594)},633:function(t,e,n){"use strict";n(595)},634:function(t,e,n){"use strict";n(596)},670:function(t,e,n){t.exports={}},685: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(65),n(66),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=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 w(t,a){(null==a||a>t.length)&&(a=t.length);for(var e=0,n=Array(a);e0)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:D(D({},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 v in c){var y={},_=c[v],O=_.decoration,w=_.additionlist,x=o(_,j);y.basePrice=[],y.selectAdditionRow=[],y.curPrint=0,y.name=t.formatDurationString(v),y.nameOrigin=v,y.decorationOrign=Object(r.a)(O),y.decorationID=O.map((function(i){return i.id})),y.decoration=Object(r.a)(O).flatMap((function(t){var e=[];return t.max_color>0&&e.push(D(D({},t),{},{max_num:t.max_color,id:"".concat(t.id,"-1"),decName:t.max_color_name})),t.max_point>0&&e.push(D(D({},t),{},{max_num:t.max_point,id:"".concat(t.id,"-2"),decName:t.max_point_name})),e})),y.additionlist=w;var S=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 D(D({},t),f)})),r.remainingAttr=[];for(var h=D(D({},r.part_columns[0]),f),i=1;i<9;i++)if(!Object.keys(r.attributeList).includes("website_qty".concat(i))){var v=D({},h);t.$set(v,"prop","website_qty".concat(i)),r.remainingAttr.push(v)}y.basePrice.push(r),t.allPrintTab.includes(P)||t.allPrintTab.push(P)};for(var P in x)S();t.priceList.push(y)}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 D(D({},e),t.initSetupObj)})),t.sellData=t.sellData.map((function(e){return D(D({},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)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),v=t.dividePrice(t.configInfo.bag_freight),y=t.dividePrice(t.configInfo.express_freight),_=Object(f.c)(1,v,h),O=Object(f.c)(1,y,h),j=0,C={},w=t.comCurBaseTotalColumns.findIndex((function(t){return t.prop===a}));if(1==+t.comLocationNum||t.comLocationNum>=w+1){var x=t.comCurBaseTotalColumns[1==+t.comLocationNum?0:w]||{};C=x.freight,l=x.freight_type,c=x.postcode}if(1===l&&c>=3)if(m>20){var D=Object(f.b)(m,20),S=Object(f.d)(D,+C.basic),P=Object(f.c)(+C.pickup,S);j=Object(f.d)(P,O)}else j=Object(f.d)(+C.pickup,O);else if(2===l&&c>=3){var T=Object(f.a)(m,5),A=Object(f.d)(+C.minimum,Math.ceil(T));j=Object(f.d)(A,_)}else j=0;t.$set(t.initFrightObj,a,Math.ceil(j).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 k=Math.ceil(t.initSetupObj[a]/t.comAttributeList[a]*100)/100;t.$set(t.initChangeUnitObj,a,Object(f.c)(t.initChangeUnitObj[a],k).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,D(D(D({},this.buyData[0]),this.initZeroObj),{summary:0})):this.$set(this.buyData,0,D(D({},this.buyData[0]),this.initSetupObj)),this.$set(this.buyData,1,D(D({},this.buyData[1]),this.initChangeUnitObj)),this.freight_switch?this.$set(this.buyData,2,D(D({},this.buyData[2]),this.initZeroObj)):this.$set(this.buyData,2,D(D({},this.buyData[2]),this.initFrightObj)),this.$set(this.buyData,3,D(D({},this.buyData[3]),this.initTotalObj))}else this.buyData=this.buyData.map((function(e){return D(D({},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 v=Object(f.c)(t.unitData[2][d]/100,1);t.sellData[3][i]=Object(f.d)(r[i],v).toFixed(2);var y=Object(f.d)(t.initFrightObj[i],v);o=Object(f.c)(o,y).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(782),n(21)),component=Object(P.a)(S,(function(){var t=this,e=t._self._c;return e("div",[0==t.quoteLoadState?e("div",{directives:[{name:"loading",rawName:"v-loading",value:!0,expression:"true"}],staticClass:"com-loading"}):1==t.quoteLoadState?e("div",[e("tab-nav",{attrs:{borderType:"allBorder",liWidth:100,liHeight:40,marginRight:5,currTab:t.curWeek,tabList:t.priceList},on:{"update:currTab":function(e){t.curWeek=e},"update:curr-tab":function(e){t.curWeek=e}}}),t._v(" "),t._l(t.priceList,(function(n,o){var l,c,d,m;return e("div",{directives:[{name:"show",rawName:"v-show",value:t.curWeek==o,expression:"curWeek == indexs"}],key:n.name},[e("div",[e("tab-nav",{attrs:{borderType:"incompleteBorder",currTab:n.curPrint,tabList:n.basePrice,allPrintTab:t.allPrintTab,marginTop:0,marginRight:5,marginBottom:(null===(l=n.basePrice)||void 0===l?void 0:l.length)>1?7:0},on:{"update:currTab":function(e){return t.$set(n,"curPrint",e)},"update:curr-tab":function(e){return t.$set(n,"curPrint",e)},handle:function(e){return t.sortBy(n)}}})],1),t._v(" "),t._l(n.basePrice,(function(o,l){var c;return e("div",{directives:[{name:"show",rawName:"v-show",value:n.curPrint==l,expression:"items.curPrint == index"}],key:o.name},[e("new-price-table",{attrs:{tableColumns:[].concat(Object(r.a)(t.undecorated_columns),Object(r.a)(o.part_columns)),tableData:o.data,tableType:"Undecorated",curPrint:o.name,curModel:null===(c=n.decorationOrign[l])||void 0===c?void 0:c.model,data:n,selectRow:o.selectBaseRow},on:{"update:selectRow":function(e){return t.$set(o,"selectBaseRow",e)},"update:select-row":function(e){return t.$set(o,"selectBaseRow",e)}}})],1)})),t._v(" "),null!==(c=n.decoration)&&void 0!==c&&c.length||null!==(d=n.basePrice)&&void 0!==d&&null!==(d=d[n.curPrint])&&void 0!==d&&null!==(d=d.decoration_addition)&&void 0!==d&&d.length?e("new-price-table",{attrs:{tableData:n.decoration,tableColumns:[].concat(Object(r.a)(t.decoration_columns),Object(r.a)(t.comCurBaseColumns)),tableType:"Decoration",marginBottom:0,hasDecAdd:null===(m=n.basePrice)||void 0===m||null===(m=m[n.curPrint])||void 0===m||null===(m=m.decoration_addition)||void 0===m?void 0:m.length}}):t._e(),t._v(" "),t._l(n.basePrice,(function(o,l){return e("div",{directives:[{name:"show",rawName:"v-show",value:n.curPrint==l&&o.decoration_addition.length,expression:"items.curPrint == index && item.decoration_addition.length"}],key:o.name+l},[e("new-price-table",{attrs:{tableData:o.decoration_addition,tableColumns:[].concat(Object(r.a)(t.addon_columns),Object(r.a)(o.part_columns)),isCheckBox:!0,tableType:"Addon",multipleSelection:n.selectAdditionRow},on:{"update:multipleSelection":function(e){return t.$set(n,"selectAdditionRow",e)},"update:multiple-selection":function(e){return t.$set(n,"selectAdditionRow",e)}}})],1)}))],2)}))],2):e("div",{staticClass:"quote-tips"},[t._v("\n Current item prices are missing, please contact"),e("a",{attrs:{href:"mailto:Info@promocollection.uk"}},[t._v("\n info@promocollection.uk")])]),t._v(" "),e("no-ssr",[1==t.quoteLoadState?e("div",[e("mail-table",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],ref:"mailtable",attrs:{mailData:t.mailData}},[e("price-to-img",{attrs:{pageData:t.pageData,specificationsObj:t.specificationsObj,tableData:t.comFilterSwitchSellData,tableColumns:t.comMergeColumns,comLocationNum:t.comLocationNum,emailForm:t.commentObj}})],1),t._v(" "),e("el-dialog",{ref:"dialogRef",attrs:{"lock-scroll":!1,title:"Customer Quote",visible:t.priceToImgVisible,"custom-class":"price-to-img-dialog"},on:{"update:visible":function(e){t.priceToImgVisible=e}}},[e("price-to-img",{ref:"priceToImgRef",attrs:{isImgSrc:!1,loading:t.pdfLoading,pageData:t.pageData,specificationsObj:t.specificationsObj,tableData:t.comFilterSwitchSellData,tableColumns:t.comMergeColumns,comLocationNum:t.comLocationNum,emailForm:t.commentObj},on:{"update:loading":function(e){t.pdfLoading=e}}}),t._v(" "),e("p",{staticClass:"tips"},[t._v("Change default standard comment:")]),t._v(" "),e("el-input",{model:{value:t.commentObj.Comments,callback:function(e){t.$set(t.commentObj,"Comments",e)},expression:"commentObj.Comments"}}),t._v(" "),e("div",{staticClass:"btn-wrap"},[e("el-button",{staticClass:"button-black button-margin",attrs:{size:"medium",loading:t.pdfLoading},on:{click:t.handleDownloadPdf}},[t._v("Download")])],1)],1),t._v(" "),e("price-to-img",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],ref:"pdf",attrs:{loading:t.pdfLoading,pageData:t.pageData,specificationsObj:t.specificationsObj,tableData:t.comFilterSwitchSellData,tableColumns:t.comMergeColumns,comLocationNum:t.comLocationNum,emailForm:t.commentObj},on:{"update:loading":function(e){t.pdfLoading=e}}}),t._v(" "),e("dialog-XX-success",{attrs:{visible:t.xxContentVisible,imgType:!1,content:"This quantity is below the MOQ for this product"},on:{"update:visible":function(e){t.xxContentVisible=e}}})],1):t._e()])],1)}),[],!1,null,"21f896fd",null);e.default=component.exports;installComponents(component,{TabNav:n(602).default,PriceToImg:n(705).default})},701: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),v=Object(r.c)(+o[n],h);return m>v?"+".concat(Object(r.b)(m,v)):Object(r.b)(m,v)}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},702:function(t,e,n){"use strict";n.r(e);n(97),n(61),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)1?arguments[1]:void 0),e}})},780: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,v){for(var element,y,_=m,O=0,j=!!h&&c(h,v);O0&&r(element)?(y=o(element),_=d(t,e,element,y,_,f-1)-1):(l(_+1),t[_]=element),_++),O++;return _};t.exports=d},781:function(t,e,n){"use strict";n(218)("flatMap")},782:function(t,e,n){"use strict";n(670)}}]); //# sourceMappingURL=ebae3cb.js.map