product-right.js 184 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912
  1. exports.ids = [27,24,26,28,34,35,36,37,39,40,41];
  2. exports.modules = {
  3. /***/ 146:
  4. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  5. "use strict";
  6. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return on; });
  7. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return off; });
  8. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return once; });
  9. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return hasClass; });
  10. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addClass; });
  11. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return removeClass; });
  12. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getStyle; });
  13. /* unused harmony export setStyle */
  14. /* unused harmony export isScroll */
  15. /* unused harmony export getScrollContainer */
  16. /* unused harmony export isInContainer */
  17. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
  18. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
  19. /* istanbul ignore next */
  20. const isServer = vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer;
  21. const SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
  22. const MOZ_HACK_REGEXP = /^moz([A-Z])/;
  23. const ieVersion = isServer ? 0 : Number(document.documentMode);
  24. /* istanbul ignore next */
  25. const trim = function(string) {
  26. return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, '');
  27. };
  28. /* istanbul ignore next */
  29. const camelCase = function(name) {
  30. return name.replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) {
  31. return offset ? letter.toUpperCase() : letter;
  32. }).replace(MOZ_HACK_REGEXP, 'Moz$1');
  33. };
  34. /* istanbul ignore next */
  35. const on = (function() {
  36. if (!isServer && document.addEventListener) {
  37. return function(element, event, handler) {
  38. if (element && event && handler) {
  39. element.addEventListener(event, handler, false);
  40. }
  41. };
  42. } else {
  43. return function(element, event, handler) {
  44. if (element && event && handler) {
  45. element.attachEvent('on' + event, handler);
  46. }
  47. };
  48. }
  49. })();
  50. /* istanbul ignore next */
  51. const off = (function() {
  52. if (!isServer && document.removeEventListener) {
  53. return function(element, event, handler) {
  54. if (element && event) {
  55. element.removeEventListener(event, handler, false);
  56. }
  57. };
  58. } else {
  59. return function(element, event, handler) {
  60. if (element && event) {
  61. element.detachEvent('on' + event, handler);
  62. }
  63. };
  64. }
  65. })();
  66. /* istanbul ignore next */
  67. const once = function(el, event, fn) {
  68. var listener = function() {
  69. if (fn) {
  70. fn.apply(this, arguments);
  71. }
  72. off(el, event, listener);
  73. };
  74. on(el, event, listener);
  75. };
  76. /* istanbul ignore next */
  77. function hasClass(el, cls) {
  78. if (!el || !cls) return false;
  79. if (cls.indexOf(' ') !== -1) throw new Error('className should not contain space.');
  80. if (el.classList) {
  81. return el.classList.contains(cls);
  82. } else {
  83. return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;
  84. }
  85. };
  86. /* istanbul ignore next */
  87. function addClass(el, cls) {
  88. if (!el) return;
  89. var curClass = el.className;
  90. var classes = (cls || '').split(' ');
  91. for (var i = 0, j = classes.length; i < j; i++) {
  92. var clsName = classes[i];
  93. if (!clsName) continue;
  94. if (el.classList) {
  95. el.classList.add(clsName);
  96. } else if (!hasClass(el, clsName)) {
  97. curClass += ' ' + clsName;
  98. }
  99. }
  100. if (!el.classList) {
  101. el.setAttribute('class', curClass);
  102. }
  103. };
  104. /* istanbul ignore next */
  105. function removeClass(el, cls) {
  106. if (!el || !cls) return;
  107. var classes = cls.split(' ');
  108. var curClass = ' ' + el.className + ' ';
  109. for (var i = 0, j = classes.length; i < j; i++) {
  110. var clsName = classes[i];
  111. if (!clsName) continue;
  112. if (el.classList) {
  113. el.classList.remove(clsName);
  114. } else if (hasClass(el, clsName)) {
  115. curClass = curClass.replace(' ' + clsName + ' ', ' ');
  116. }
  117. }
  118. if (!el.classList) {
  119. el.setAttribute('class', trim(curClass));
  120. }
  121. };
  122. /* istanbul ignore next */
  123. const getStyle = ieVersion < 9 ? function(element, styleName) {
  124. if (isServer) return;
  125. if (!element || !styleName) return null;
  126. styleName = camelCase(styleName);
  127. if (styleName === 'float') {
  128. styleName = 'styleFloat';
  129. }
  130. try {
  131. switch (styleName) {
  132. case 'opacity':
  133. try {
  134. return element.filters.item('alpha').opacity / 100;
  135. } catch (e) {
  136. return 1.0;
  137. }
  138. default:
  139. return (element.style[styleName] || element.currentStyle ? element.currentStyle[styleName] : null);
  140. }
  141. } catch (e) {
  142. return element.style[styleName];
  143. }
  144. } : function(element, styleName) {
  145. if (isServer) return;
  146. if (!element || !styleName) return null;
  147. styleName = camelCase(styleName);
  148. if (styleName === 'float') {
  149. styleName = 'cssFloat';
  150. }
  151. try {
  152. var computed = document.defaultView.getComputedStyle(element, '');
  153. return element.style[styleName] || computed ? computed[styleName] : null;
  154. } catch (e) {
  155. return element.style[styleName];
  156. }
  157. };
  158. /* istanbul ignore next */
  159. function setStyle(element, styleName, value) {
  160. if (!element || !styleName) return;
  161. if (typeof styleName === 'object') {
  162. for (var prop in styleName) {
  163. if (styleName.hasOwnProperty(prop)) {
  164. setStyle(element, prop, styleName[prop]);
  165. }
  166. }
  167. } else {
  168. styleName = camelCase(styleName);
  169. if (styleName === 'opacity' && ieVersion < 9) {
  170. element.style.filter = isNaN(value) ? '' : 'alpha(opacity=' + value * 100 + ')';
  171. } else {
  172. element.style[styleName] = value;
  173. }
  174. }
  175. };
  176. const isScroll = (el, vertical) => {
  177. if (isServer) return;
  178. const determinedDirection = vertical !== null && vertical !== undefined;
  179. const overflow = determinedDirection
  180. ? vertical
  181. ? getStyle(el, 'overflow-y')
  182. : getStyle(el, 'overflow-x')
  183. : getStyle(el, 'overflow');
  184. return overflow.match(/(scroll|auto|overlay)/);
  185. };
  186. const getScrollContainer = (el, vertical) => {
  187. if (isServer) return;
  188. let parent = el;
  189. while (parent) {
  190. if ([window, document, document.documentElement].includes(parent)) {
  191. return window;
  192. }
  193. if (isScroll(parent, vertical)) {
  194. return parent;
  195. }
  196. parent = parent.parentNode;
  197. }
  198. return parent;
  199. };
  200. const isInContainer = (el, container) => {
  201. if (isServer || !el || !container) return false;
  202. const elRect = el.getBoundingClientRect();
  203. let containerRect;
  204. if ([window, document, document.documentElement, null, undefined].includes(container)) {
  205. containerRect = {
  206. top: 0,
  207. right: window.innerWidth,
  208. bottom: window.innerHeight,
  209. left: 0
  210. };
  211. } else {
  212. containerRect = container.getBoundingClientRect();
  213. }
  214. return elRect.top < containerRect.bottom &&
  215. elRect.bottom > containerRect.top &&
  216. elRect.right > containerRect.left &&
  217. elRect.left < containerRect.right;
  218. };
  219. /***/ }),
  220. /***/ 147:
  221. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  222. "use strict";
  223. // EXPORTS
  224. __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ isFirefox; });
  225. __webpack_require__.d(__webpack_exports__, "c", function() { return /* binding */ kebabCase; });
  226. __webpack_require__.d(__webpack_exports__, "d", function() { return /* binding */ rafThrottle; });
  227. __webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ isMac; });
  228. // UNUSED EXPORTS: noop, hasOwn, toObject, getValueByPath, getPropByPath, generateId, valueEquals, escapeRegexpString, arrayFindIndex, arrayFind, coerceTruthyValueToArray, isIE, isEdge, autoprefixer, capitalize, looseEqual, arrayEquals, isEqual, isEmpty, objToArray
  229. // EXTERNAL MODULE: external "vue"
  230. var external_vue_ = __webpack_require__(0);
  231. var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
  232. // CONCATENATED MODULE: ./node_modules/element-ui/src/utils/types.js
  233. function isString(obj) {
  234. return Object.prototype.toString.call(obj) === '[object String]';
  235. }
  236. function isObject(obj) {
  237. return Object.prototype.toString.call(obj) === '[object Object]';
  238. }
  239. function isHtmlElement(node) {
  240. return node && node.nodeType === Node.ELEMENT_NODE;
  241. }
  242. /**
  243. * - Inspired:
  244. * https://github.com/jashkenas/underscore/blob/master/modules/isFunction.js
  245. */
  246. let isFunction = (functionToCheck) => {
  247. var getType = {};
  248. return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
  249. };
  250. if ( true && typeof Int8Array !== 'object' && (external_vue_default.a.prototype.$isServer || typeof document.childNodes !== 'function')) {
  251. isFunction = function(obj) {
  252. return typeof obj === 'function' || false;
  253. };
  254. }
  255. const isUndefined = (val)=> {
  256. return val === void 0;
  257. };
  258. const isDefined = (val) => {
  259. return val !== undefined && val !== null;
  260. };
  261. // CONCATENATED MODULE: ./node_modules/element-ui/src/utils/util.js
  262. const util_hasOwnProperty = Object.prototype.hasOwnProperty;
  263. function noop() {};
  264. function hasOwn(obj, key) {
  265. return util_hasOwnProperty.call(obj, key);
  266. };
  267. function extend(to, _from) {
  268. for (let key in _from) {
  269. to[key] = _from[key];
  270. }
  271. return to;
  272. };
  273. function toObject(arr) {
  274. var res = {};
  275. for (let i = 0; i < arr.length; i++) {
  276. if (arr[i]) {
  277. extend(res, arr[i]);
  278. }
  279. }
  280. return res;
  281. };
  282. const getValueByPath = function(object, prop) {
  283. prop = prop || '';
  284. const paths = prop.split('.');
  285. let current = object;
  286. let result = null;
  287. for (let i = 0, j = paths.length; i < j; i++) {
  288. const path = paths[i];
  289. if (!current) break;
  290. if (i === j - 1) {
  291. result = current[path];
  292. break;
  293. }
  294. current = current[path];
  295. }
  296. return result;
  297. };
  298. function getPropByPath(obj, path, strict) {
  299. let tempObj = obj;
  300. path = path.replace(/\[(\w+)\]/g, '.$1');
  301. path = path.replace(/^\./, '');
  302. let keyArr = path.split('.');
  303. let i = 0;
  304. for (let len = keyArr.length; i < len - 1; ++i) {
  305. if (!tempObj && !strict) break;
  306. let key = keyArr[i];
  307. if (key in tempObj) {
  308. tempObj = tempObj[key];
  309. } else {
  310. if (strict) {
  311. throw new Error('please transfer a valid prop path to form item!');
  312. }
  313. break;
  314. }
  315. }
  316. return {
  317. o: tempObj,
  318. k: keyArr[i],
  319. v: tempObj ? tempObj[keyArr[i]] : null
  320. };
  321. };
  322. const generateId = function() {
  323. return Math.floor(Math.random() * 10000);
  324. };
  325. const valueEquals = (a, b) => {
  326. // see: https://stackoverflow.com/questions/3115982/how-to-check-if-two-arrays-are-equal-with-javascript
  327. if (a === b) return true;
  328. if (!(a instanceof Array)) return false;
  329. if (!(b instanceof Array)) return false;
  330. if (a.length !== b.length) return false;
  331. for (let i = 0; i !== a.length; ++i) {
  332. if (a[i] !== b[i]) return false;
  333. }
  334. return true;
  335. };
  336. const escapeRegexpString = (value = '') => String(value).replace(/[|\\{}()[\]^$+*?.]/g, '\\$&');
  337. // TODO: use native Array.find, Array.findIndex when IE support is dropped
  338. const arrayFindIndex = function(arr, pred) {
  339. for (let i = 0; i !== arr.length; ++i) {
  340. if (pred(arr[i])) {
  341. return i;
  342. }
  343. }
  344. return -1;
  345. };
  346. const arrayFind = function(arr, pred) {
  347. const idx = arrayFindIndex(arr, pred);
  348. return idx !== -1 ? arr[idx] : undefined;
  349. };
  350. // coerce truthy value to array
  351. const coerceTruthyValueToArray = function(val) {
  352. if (Array.isArray(val)) {
  353. return val;
  354. } else if (val) {
  355. return [val];
  356. } else {
  357. return [];
  358. }
  359. };
  360. const isIE = function() {
  361. return !external_vue_default.a.prototype.$isServer && !isNaN(Number(document.documentMode));
  362. };
  363. const isEdge = function() {
  364. return !external_vue_default.a.prototype.$isServer && navigator.userAgent.indexOf('Edge') > -1;
  365. };
  366. const isFirefox = function() {
  367. return !external_vue_default.a.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
  368. };
  369. const autoprefixer = function(style) {
  370. if (typeof style !== 'object') return style;
  371. const rules = ['transform', 'transition', 'animation'];
  372. const prefixes = ['ms-', 'webkit-'];
  373. rules.forEach(rule => {
  374. const value = style[rule];
  375. if (rule && value) {
  376. prefixes.forEach(prefix => {
  377. style[prefix + rule] = value;
  378. });
  379. }
  380. });
  381. return style;
  382. };
  383. const kebabCase = function(str) {
  384. const hyphenateRE = /([^-])([A-Z])/g;
  385. return str
  386. .replace(hyphenateRE, '$1-$2')
  387. .replace(hyphenateRE, '$1-$2')
  388. .toLowerCase();
  389. };
  390. const capitalize = function(str) {
  391. if (!isString(str)) return str;
  392. return str.charAt(0).toUpperCase() + str.slice(1);
  393. };
  394. const looseEqual = function(a, b) {
  395. const isObjectA = isObject(a);
  396. const isObjectB = isObject(b);
  397. if (isObjectA && isObjectB) {
  398. return JSON.stringify(a) === JSON.stringify(b);
  399. } else if (!isObjectA && !isObjectB) {
  400. return String(a) === String(b);
  401. } else {
  402. return false;
  403. }
  404. };
  405. const arrayEquals = function(arrayA, arrayB) {
  406. arrayA = arrayA || [];
  407. arrayB = arrayB || [];
  408. if (arrayA.length !== arrayB.length) {
  409. return false;
  410. }
  411. for (let i = 0; i < arrayA.length; i++) {
  412. if (!looseEqual(arrayA[i], arrayB[i])) {
  413. return false;
  414. }
  415. }
  416. return true;
  417. };
  418. const isEqual = function(value1, value2) {
  419. if (Array.isArray(value1) && Array.isArray(value2)) {
  420. return arrayEquals(value1, value2);
  421. }
  422. return looseEqual(value1, value2);
  423. };
  424. const isEmpty = function(val) {
  425. // null or undefined
  426. if (val == null) return true;
  427. if (typeof val === 'boolean') return false;
  428. if (typeof val === 'number') return !val;
  429. if (val instanceof Error) return val.message === '';
  430. switch (Object.prototype.toString.call(val)) {
  431. // String or Array
  432. case '[object String]':
  433. case '[object Array]':
  434. return !val.length;
  435. // Map or Set or File
  436. case '[object File]':
  437. case '[object Map]':
  438. case '[object Set]': {
  439. return !val.size;
  440. }
  441. // Plain Object
  442. case '[object Object]': {
  443. return !Object.keys(val).length;
  444. }
  445. }
  446. return false;
  447. };
  448. function rafThrottle(fn) {
  449. let locked = false;
  450. return function(...args) {
  451. if (locked) return;
  452. locked = true;
  453. window.requestAnimationFrame(_ => {
  454. fn.apply(this, args);
  455. locked = false;
  456. });
  457. };
  458. }
  459. function objToArray(obj) {
  460. if (Array.isArray(obj)) {
  461. return obj;
  462. }
  463. return isEmpty(obj) ? [] : [obj];
  464. }
  465. const isMac = function() {
  466. return !external_vue_default.a.prototype.$isServer && /macintosh|mac os x/i.test(navigator.userAgent);
  467. };
  468. /***/ }),
  469. /***/ 148:
  470. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  471. "use strict";
  472. /* harmony default export */ __webpack_exports__["a"] = (function(target) {
  473. for (let i = 1, j = arguments.length; i < j; i++) {
  474. let source = arguments[i] || {};
  475. for (let prop in source) {
  476. if (source.hasOwnProperty(prop)) {
  477. let value = source[prop];
  478. if (value !== undefined) {
  479. target[prop] = value;
  480. }
  481. }
  482. }
  483. }
  484. return target;
  485. });;
  486. /***/ }),
  487. /***/ 156:
  488. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  489. "use strict";
  490. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./node_modules/element-ui/packages/image/src/image-viewer.vue?vue&type=template&id=44a7b0fb
  491. var render = function render() {
  492. var _vm = this,
  493. _c = _vm._self._c;
  494. return _c('transition', {
  495. attrs: {
  496. "name": "viewer-fade"
  497. }
  498. }, [_c('div', {
  499. ref: "el-image-viewer__wrapper",
  500. staticClass: "el-image-viewer__wrapper",
  501. style: {
  502. 'z-index': _vm.viewerZIndex
  503. },
  504. attrs: {
  505. "tabindex": "-1"
  506. }
  507. }, [_c('div', {
  508. staticClass: "el-image-viewer__mask",
  509. on: {
  510. "click": function ($event) {
  511. if ($event.target !== $event.currentTarget) return null;
  512. return _vm.handleMaskClick.apply(null, arguments);
  513. }
  514. }
  515. }), _vm._v(" "), _c('span', {
  516. staticClass: "el-image-viewer__btn el-image-viewer__close",
  517. on: {
  518. "click": _vm.hide
  519. }
  520. }, [_c('i', {
  521. staticClass: "el-icon-close"
  522. })]), _vm._v(" "), !_vm.isSingle ? [_c('span', {
  523. staticClass: "el-image-viewer__btn el-image-viewer__prev",
  524. class: {
  525. 'is-disabled': !_vm.infinite && _vm.isFirst
  526. },
  527. on: {
  528. "click": _vm.prev
  529. }
  530. }, [_c('i', {
  531. staticClass: "el-icon-arrow-left"
  532. })]), _vm._v(" "), _c('span', {
  533. staticClass: "el-image-viewer__btn el-image-viewer__next",
  534. class: {
  535. 'is-disabled': !_vm.infinite && _vm.isLast
  536. },
  537. on: {
  538. "click": _vm.next
  539. }
  540. }, [_c('i', {
  541. staticClass: "el-icon-arrow-right"
  542. })])] : _vm._e(), _vm._v(" "), _c('div', {
  543. staticClass: "el-image-viewer__btn el-image-viewer__actions"
  544. }, [_c('div', {
  545. staticClass: "el-image-viewer__actions__inner"
  546. }, [_c('i', {
  547. staticClass: "el-icon-zoom-out",
  548. on: {
  549. "click": function ($event) {
  550. return _vm.handleActions('zoomOut');
  551. }
  552. }
  553. }), _vm._v(" "), _c('i', {
  554. staticClass: "el-icon-zoom-in",
  555. on: {
  556. "click": function ($event) {
  557. return _vm.handleActions('zoomIn');
  558. }
  559. }
  560. }), _vm._v(" "), _c('i', {
  561. staticClass: "el-image-viewer__actions__divider"
  562. }), _vm._v(" "), _c('i', {
  563. class: _vm.mode.icon,
  564. on: {
  565. "click": _vm.toggleMode
  566. }
  567. }), _vm._v(" "), _c('i', {
  568. staticClass: "el-image-viewer__actions__divider"
  569. }), _vm._v(" "), _c('i', {
  570. staticClass: "el-icon-refresh-left",
  571. on: {
  572. "click": function ($event) {
  573. return _vm.handleActions('anticlocelise');
  574. }
  575. }
  576. }), _vm._v(" "), _c('i', {
  577. staticClass: "el-icon-refresh-right",
  578. on: {
  579. "click": function ($event) {
  580. return _vm.handleActions('clocelise');
  581. }
  582. }
  583. })])]), _vm._v(" "), _c('div', {
  584. staticClass: "el-image-viewer__canvas"
  585. }, _vm._l(_vm.urlList, function (url, i) {
  586. return i === _vm.index ? _c('img', {
  587. key: url,
  588. ref: "img",
  589. refInFor: true,
  590. staticClass: "el-image-viewer__img",
  591. style: _vm.imgStyle,
  592. attrs: {
  593. "src": _vm.currentImg
  594. },
  595. on: {
  596. "load": _vm.handleImgLoad,
  597. "error": _vm.handleImgError,
  598. "mousedown": _vm.handleMouseDown
  599. }
  600. }) : _vm._e();
  601. }), 0)], 2)]);
  602. };
  603. var staticRenderFns = [];
  604. // CONCATENATED MODULE: ./node_modules/element-ui/packages/image/src/image-viewer.vue?vue&type=template&id=44a7b0fb
  605. // EXTERNAL MODULE: ./node_modules/element-ui/src/utils/dom.js
  606. var utils_dom = __webpack_require__(146);
  607. // EXTERNAL MODULE: ./node_modules/element-ui/src/utils/util.js + 1 modules
  608. var util = __webpack_require__(147);
  609. // EXTERNAL MODULE: external "vue"
  610. var external_vue_ = __webpack_require__(0);
  611. var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
  612. // EXTERNAL MODULE: ./node_modules/element-ui/src/utils/merge.js
  613. var merge = __webpack_require__(148);
  614. // CONCATENATED MODULE: ./node_modules/element-ui/src/utils/popup/popup-manager.js
  615. let hasModal = false;
  616. let hasInitZIndex = false;
  617. let popup_manager_zIndex;
  618. const getModal = function() {
  619. if (external_vue_default.a.prototype.$isServer) return;
  620. let modalDom = PopupManager.modalDom;
  621. if (modalDom) {
  622. hasModal = true;
  623. } else {
  624. hasModal = false;
  625. modalDom = document.createElement('div');
  626. PopupManager.modalDom = modalDom;
  627. modalDom.addEventListener('touchmove', function(event) {
  628. event.preventDefault();
  629. event.stopPropagation();
  630. });
  631. modalDom.addEventListener('click', function() {
  632. PopupManager.doOnModalClick && PopupManager.doOnModalClick();
  633. });
  634. }
  635. return modalDom;
  636. };
  637. const instances = {};
  638. const PopupManager = {
  639. modalFade: true,
  640. getInstance: function(id) {
  641. return instances[id];
  642. },
  643. register: function(id, instance) {
  644. if (id && instance) {
  645. instances[id] = instance;
  646. }
  647. },
  648. deregister: function(id) {
  649. if (id) {
  650. instances[id] = null;
  651. delete instances[id];
  652. }
  653. },
  654. nextZIndex: function() {
  655. return PopupManager.zIndex++;
  656. },
  657. modalStack: [],
  658. doOnModalClick: function() {
  659. const topItem = PopupManager.modalStack[PopupManager.modalStack.length - 1];
  660. if (!topItem) return;
  661. const instance = PopupManager.getInstance(topItem.id);
  662. if (instance && instance.closeOnClickModal) {
  663. instance.close();
  664. }
  665. },
  666. openModal: function(id, zIndex, dom, modalClass, modalFade) {
  667. if (external_vue_default.a.prototype.$isServer) return;
  668. if (!id || zIndex === undefined) return;
  669. this.modalFade = modalFade;
  670. const modalStack = this.modalStack;
  671. for (let i = 0, j = modalStack.length; i < j; i++) {
  672. const item = modalStack[i];
  673. if (item.id === id) {
  674. return;
  675. }
  676. }
  677. const modalDom = getModal();
  678. Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal');
  679. if (this.modalFade && !hasModal) {
  680. Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal-enter');
  681. }
  682. if (modalClass) {
  683. let classArr = modalClass.trim().split(/\s+/);
  684. classArr.forEach(item => Object(utils_dom["a" /* addClass */])(modalDom, item));
  685. }
  686. setTimeout(() => {
  687. Object(utils_dom["g" /* removeClass */])(modalDom, 'v-modal-enter');
  688. }, 200);
  689. if (dom && dom.parentNode && dom.parentNode.nodeType !== 11) {
  690. dom.parentNode.appendChild(modalDom);
  691. } else {
  692. document.body.appendChild(modalDom);
  693. }
  694. if (zIndex) {
  695. modalDom.style.zIndex = zIndex;
  696. }
  697. modalDom.tabIndex = 0;
  698. modalDom.style.display = '';
  699. this.modalStack.push({ id: id, zIndex: zIndex, modalClass: modalClass });
  700. },
  701. closeModal: function(id) {
  702. const modalStack = this.modalStack;
  703. const modalDom = getModal();
  704. if (modalStack.length > 0) {
  705. const topItem = modalStack[modalStack.length - 1];
  706. if (topItem.id === id) {
  707. if (topItem.modalClass) {
  708. let classArr = topItem.modalClass.trim().split(/\s+/);
  709. classArr.forEach(item => Object(utils_dom["g" /* removeClass */])(modalDom, item));
  710. }
  711. modalStack.pop();
  712. if (modalStack.length > 0) {
  713. modalDom.style.zIndex = modalStack[modalStack.length - 1].zIndex;
  714. }
  715. } else {
  716. for (let i = modalStack.length - 1; i >= 0; i--) {
  717. if (modalStack[i].id === id) {
  718. modalStack.splice(i, 1);
  719. break;
  720. }
  721. }
  722. }
  723. }
  724. if (modalStack.length === 0) {
  725. if (this.modalFade) {
  726. Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal-leave');
  727. }
  728. setTimeout(() => {
  729. if (modalStack.length === 0) {
  730. if (modalDom.parentNode) modalDom.parentNode.removeChild(modalDom);
  731. modalDom.style.display = 'none';
  732. PopupManager.modalDom = undefined;
  733. }
  734. Object(utils_dom["g" /* removeClass */])(modalDom, 'v-modal-leave');
  735. }, 200);
  736. }
  737. }
  738. };
  739. Object.defineProperty(PopupManager, 'zIndex', {
  740. configurable: true,
  741. get() {
  742. if (!hasInitZIndex) {
  743. popup_manager_zIndex = popup_manager_zIndex || (external_vue_default.a.prototype.$ELEMENT || {}).zIndex || 2000;
  744. hasInitZIndex = true;
  745. }
  746. return popup_manager_zIndex;
  747. },
  748. set(value) {
  749. popup_manager_zIndex = value;
  750. }
  751. });
  752. const getTopPopup = function() {
  753. if (external_vue_default.a.prototype.$isServer) return;
  754. if (PopupManager.modalStack.length > 0) {
  755. const topPopup = PopupManager.modalStack[PopupManager.modalStack.length - 1];
  756. if (!topPopup) return;
  757. const instance = PopupManager.getInstance(topPopup.id);
  758. return instance;
  759. }
  760. };
  761. if (!external_vue_default.a.prototype.$isServer) {
  762. // handle `esc` key when the popup is shown
  763. window.addEventListener('keydown', function(event) {
  764. if (event.keyCode === 27) {
  765. const topPopup = getTopPopup();
  766. if (topPopup && topPopup.closeOnPressEscape) {
  767. topPopup.handleClose
  768. ? topPopup.handleClose()
  769. : (topPopup.handleAction ? topPopup.handleAction('cancel') : topPopup.close());
  770. }
  771. }
  772. });
  773. }
  774. /* harmony default export */ var popup_manager = (PopupManager);
  775. // CONCATENATED MODULE: ./node_modules/element-ui/src/utils/scrollbar-width.js
  776. let scrollBarWidth;
  777. /* harmony default export */ var scrollbar_width = (function() {
  778. if (external_vue_default.a.prototype.$isServer) return 0;
  779. if (scrollBarWidth !== undefined) return scrollBarWidth;
  780. const outer = document.createElement('div');
  781. outer.className = 'el-scrollbar__wrap';
  782. outer.style.visibility = 'hidden';
  783. outer.style.width = '100px';
  784. outer.style.position = 'absolute';
  785. outer.style.top = '-9999px';
  786. document.body.appendChild(outer);
  787. const widthNoScroll = outer.offsetWidth;
  788. outer.style.overflow = 'scroll';
  789. const inner = document.createElement('div');
  790. inner.style.width = '100%';
  791. outer.appendChild(inner);
  792. const widthWithScroll = inner.offsetWidth;
  793. outer.parentNode.removeChild(outer);
  794. scrollBarWidth = widthNoScroll - widthWithScroll;
  795. return scrollBarWidth;
  796. });;
  797. // CONCATENATED MODULE: ./node_modules/element-ui/src/utils/popup/index.js
  798. let idSeed = 1;
  799. let popup_scrollBarWidth;
  800. /* harmony default export */ var popup = ({
  801. props: {
  802. visible: {
  803. type: Boolean,
  804. default: false
  805. },
  806. openDelay: {},
  807. closeDelay: {},
  808. zIndex: {},
  809. modal: {
  810. type: Boolean,
  811. default: false
  812. },
  813. modalFade: {
  814. type: Boolean,
  815. default: true
  816. },
  817. modalClass: {},
  818. modalAppendToBody: {
  819. type: Boolean,
  820. default: false
  821. },
  822. lockScroll: {
  823. type: Boolean,
  824. default: true
  825. },
  826. closeOnPressEscape: {
  827. type: Boolean,
  828. default: false
  829. },
  830. closeOnClickModal: {
  831. type: Boolean,
  832. default: false
  833. }
  834. },
  835. beforeMount() {
  836. this._popupId = 'popup-' + idSeed++;
  837. popup_manager.register(this._popupId, this);
  838. },
  839. beforeDestroy() {
  840. popup_manager.deregister(this._popupId);
  841. popup_manager.closeModal(this._popupId);
  842. this.restoreBodyStyle();
  843. },
  844. data() {
  845. return {
  846. opened: false,
  847. bodyPaddingRight: null,
  848. computedBodyPaddingRight: 0,
  849. withoutHiddenClass: true,
  850. rendered: false
  851. };
  852. },
  853. watch: {
  854. visible(val) {
  855. if (val) {
  856. if (this._opening) return;
  857. if (!this.rendered) {
  858. this.rendered = true;
  859. external_vue_default.a.nextTick(() => {
  860. this.open();
  861. });
  862. } else {
  863. this.open();
  864. }
  865. } else {
  866. this.close();
  867. }
  868. }
  869. },
  870. methods: {
  871. open(options) {
  872. if (!this.rendered) {
  873. this.rendered = true;
  874. }
  875. const props = Object(merge["a" /* default */])({}, this.$props || this, options);
  876. if (this._closeTimer) {
  877. clearTimeout(this._closeTimer);
  878. this._closeTimer = null;
  879. }
  880. clearTimeout(this._openTimer);
  881. const openDelay = Number(props.openDelay);
  882. if (openDelay > 0) {
  883. this._openTimer = setTimeout(() => {
  884. this._openTimer = null;
  885. this.doOpen(props);
  886. }, openDelay);
  887. } else {
  888. this.doOpen(props);
  889. }
  890. },
  891. doOpen(props) {
  892. if (this.$isServer) return;
  893. if (this.willOpen && !this.willOpen()) return;
  894. if (this.opened) return;
  895. this._opening = true;
  896. const dom = this.$el;
  897. const modal = props.modal;
  898. const zIndex = props.zIndex;
  899. if (zIndex) {
  900. popup_manager.zIndex = zIndex;
  901. }
  902. if (modal) {
  903. if (this._closing) {
  904. popup_manager.closeModal(this._popupId);
  905. this._closing = false;
  906. }
  907. popup_manager.openModal(this._popupId, popup_manager.nextZIndex(), this.modalAppendToBody ? undefined : dom, props.modalClass, props.modalFade);
  908. if (props.lockScroll) {
  909. this.withoutHiddenClass = !Object(utils_dom["c" /* hasClass */])(document.body, 'el-popup-parent--hidden');
  910. if (this.withoutHiddenClass) {
  911. this.bodyPaddingRight = document.body.style.paddingRight;
  912. this.computedBodyPaddingRight = parseInt(Object(utils_dom["b" /* getStyle */])(document.body, 'paddingRight'), 10);
  913. }
  914. popup_scrollBarWidth = scrollbar_width();
  915. let bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;
  916. let bodyOverflowY = Object(utils_dom["b" /* getStyle */])(document.body, 'overflowY');
  917. if (popup_scrollBarWidth > 0 && (bodyHasOverflow || bodyOverflowY === 'scroll') && this.withoutHiddenClass) {
  918. document.body.style.paddingRight = this.computedBodyPaddingRight + popup_scrollBarWidth + 'px';
  919. }
  920. Object(utils_dom["a" /* addClass */])(document.body, 'el-popup-parent--hidden');
  921. }
  922. }
  923. if (getComputedStyle(dom).position === 'static') {
  924. dom.style.position = 'absolute';
  925. }
  926. dom.style.zIndex = popup_manager.nextZIndex();
  927. this.opened = true;
  928. this.onOpen && this.onOpen();
  929. this.doAfterOpen();
  930. },
  931. doAfterOpen() {
  932. this._opening = false;
  933. },
  934. close() {
  935. if (this.willClose && !this.willClose()) return;
  936. if (this._openTimer !== null) {
  937. clearTimeout(this._openTimer);
  938. this._openTimer = null;
  939. }
  940. clearTimeout(this._closeTimer);
  941. const closeDelay = Number(this.closeDelay);
  942. if (closeDelay > 0) {
  943. this._closeTimer = setTimeout(() => {
  944. this._closeTimer = null;
  945. this.doClose();
  946. }, closeDelay);
  947. } else {
  948. this.doClose();
  949. }
  950. },
  951. doClose() {
  952. this._closing = true;
  953. this.onClose && this.onClose();
  954. if (this.lockScroll) {
  955. setTimeout(this.restoreBodyStyle, 200);
  956. }
  957. this.opened = false;
  958. this.doAfterClose();
  959. },
  960. doAfterClose() {
  961. popup_manager.closeModal(this._popupId);
  962. this._closing = false;
  963. },
  964. restoreBodyStyle() {
  965. if (this.modal && this.withoutHiddenClass) {
  966. document.body.style.paddingRight = this.bodyPaddingRight;
  967. Object(utils_dom["g" /* removeClass */])(document.body, 'el-popup-parent--hidden');
  968. }
  969. this.withoutHiddenClass = true;
  970. }
  971. }
  972. });
  973. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./node_modules/element-ui/packages/image/src/image-viewer.vue?vue&type=script&lang=js
  974. const Mode = {
  975. CONTAIN: {
  976. name: 'contain',
  977. icon: 'el-icon-full-screen'
  978. },
  979. ORIGINAL: {
  980. name: 'original',
  981. icon: 'el-icon-c-scale-to-original'
  982. }
  983. };
  984. const mousewheelEventName = Object(util["a" /* isFirefox */])() ? 'DOMMouseScroll' : 'mousewheel';
  985. /* harmony default export */ var image_viewervue_type_script_lang_js = ({
  986. name: 'elImageViewer',
  987. props: {
  988. urlList: {
  989. type: Array,
  990. default: () => []
  991. },
  992. zIndex: {
  993. type: Number,
  994. default: 2000
  995. },
  996. onSwitch: {
  997. type: Function,
  998. default: () => {}
  999. },
  1000. onClose: {
  1001. type: Function,
  1002. default: () => {}
  1003. },
  1004. initialIndex: {
  1005. type: Number,
  1006. default: 0
  1007. },
  1008. appendToBody: {
  1009. type: Boolean,
  1010. default: true
  1011. },
  1012. maskClosable: {
  1013. type: Boolean,
  1014. default: true
  1015. }
  1016. },
  1017. data() {
  1018. return {
  1019. index: this.initialIndex,
  1020. isShow: false,
  1021. infinite: true,
  1022. loading: false,
  1023. mode: Mode.CONTAIN,
  1024. transform: {
  1025. scale: 1,
  1026. deg: 0,
  1027. offsetX: 0,
  1028. offsetY: 0,
  1029. enableTransition: false
  1030. }
  1031. };
  1032. },
  1033. computed: {
  1034. isSingle() {
  1035. return this.urlList.length <= 1;
  1036. },
  1037. isFirst() {
  1038. return this.index === 0;
  1039. },
  1040. isLast() {
  1041. return this.index === this.urlList.length - 1;
  1042. },
  1043. currentImg() {
  1044. return this.urlList[this.index];
  1045. },
  1046. imgStyle() {
  1047. const {
  1048. scale,
  1049. deg,
  1050. offsetX,
  1051. offsetY,
  1052. enableTransition
  1053. } = this.transform;
  1054. const style = {
  1055. transform: `scale(${scale}) rotate(${deg}deg)`,
  1056. transition: enableTransition ? 'transform .3s' : '',
  1057. 'margin-left': `${offsetX}px`,
  1058. 'margin-top': `${offsetY}px`
  1059. };
  1060. if (this.mode === Mode.CONTAIN) {
  1061. style.maxWidth = style.maxHeight = '100%';
  1062. }
  1063. return style;
  1064. },
  1065. viewerZIndex() {
  1066. const nextZIndex = popup_manager.nextZIndex();
  1067. return this.zIndex > nextZIndex ? this.zIndex : nextZIndex;
  1068. }
  1069. },
  1070. watch: {
  1071. index: {
  1072. handler: function (val) {
  1073. this.reset();
  1074. this.onSwitch(val);
  1075. }
  1076. },
  1077. currentImg(val) {
  1078. this.$nextTick(_ => {
  1079. const $img = this.$refs.img[0];
  1080. if (!$img.complete) {
  1081. this.loading = true;
  1082. }
  1083. });
  1084. }
  1085. },
  1086. methods: {
  1087. hide() {
  1088. this.deviceSupportUninstall();
  1089. this.onClose();
  1090. },
  1091. deviceSupportInstall() {
  1092. this._keyDownHandler = e => {
  1093. e.stopPropagation();
  1094. const keyCode = e.keyCode;
  1095. switch (keyCode) {
  1096. // ESC
  1097. case 27:
  1098. this.hide();
  1099. break;
  1100. // SPACE
  1101. case 32:
  1102. this.toggleMode();
  1103. break;
  1104. // LEFT_ARROW
  1105. case 37:
  1106. this.prev();
  1107. break;
  1108. // UP_ARROW
  1109. case 38:
  1110. this.handleActions('zoomIn');
  1111. break;
  1112. // RIGHT_ARROW
  1113. case 39:
  1114. this.next();
  1115. break;
  1116. // DOWN_ARROW
  1117. case 40:
  1118. this.handleActions('zoomOut');
  1119. break;
  1120. }
  1121. };
  1122. this._mouseWheelHandler = Object(util["d" /* rafThrottle */])(e => {
  1123. const delta = e.wheelDelta ? e.wheelDelta : -e.detail;
  1124. if (delta > 0) {
  1125. this.handleActions('zoomIn', {
  1126. zoomRate: 0.015,
  1127. enableTransition: false
  1128. });
  1129. } else {
  1130. this.handleActions('zoomOut', {
  1131. zoomRate: 0.015,
  1132. enableTransition: false
  1133. });
  1134. }
  1135. });
  1136. Object(utils_dom["e" /* on */])(document, 'keydown', this._keyDownHandler);
  1137. Object(utils_dom["e" /* on */])(document, mousewheelEventName, this._mouseWheelHandler);
  1138. },
  1139. deviceSupportUninstall() {
  1140. Object(utils_dom["d" /* off */])(document, 'keydown', this._keyDownHandler);
  1141. Object(utils_dom["d" /* off */])(document, mousewheelEventName, this._mouseWheelHandler);
  1142. this._keyDownHandler = null;
  1143. this._mouseWheelHandler = null;
  1144. },
  1145. handleImgLoad(e) {
  1146. this.loading = false;
  1147. },
  1148. handleImgError(e) {
  1149. this.loading = false;
  1150. e.target.alt = '加载失败';
  1151. },
  1152. handleMouseDown(e) {
  1153. if (this.loading || e.button !== 0) return;
  1154. const {
  1155. offsetX,
  1156. offsetY
  1157. } = this.transform;
  1158. const startX = e.pageX;
  1159. const startY = e.pageY;
  1160. this._dragHandler = Object(util["d" /* rafThrottle */])(ev => {
  1161. this.transform.offsetX = offsetX + ev.pageX - startX;
  1162. this.transform.offsetY = offsetY + ev.pageY - startY;
  1163. });
  1164. Object(utils_dom["e" /* on */])(document, 'mousemove', this._dragHandler);
  1165. Object(utils_dom["e" /* on */])(document, 'mouseup', ev => {
  1166. Object(utils_dom["d" /* off */])(document, 'mousemove', this._dragHandler);
  1167. });
  1168. e.preventDefault();
  1169. },
  1170. handleMaskClick() {
  1171. if (this.maskClosable) {
  1172. this.hide();
  1173. }
  1174. },
  1175. reset() {
  1176. this.transform = {
  1177. scale: 1,
  1178. deg: 0,
  1179. offsetX: 0,
  1180. offsetY: 0,
  1181. enableTransition: false
  1182. };
  1183. },
  1184. toggleMode() {
  1185. if (this.loading) return;
  1186. const modeNames = Object.keys(Mode);
  1187. const modeValues = Object.values(Mode);
  1188. const index = modeValues.indexOf(this.mode);
  1189. const nextIndex = (index + 1) % modeNames.length;
  1190. this.mode = Mode[modeNames[nextIndex]];
  1191. this.reset();
  1192. },
  1193. prev() {
  1194. if (this.isFirst && !this.infinite) return;
  1195. const len = this.urlList.length;
  1196. this.index = (this.index - 1 + len) % len;
  1197. },
  1198. next() {
  1199. if (this.isLast && !this.infinite) return;
  1200. const len = this.urlList.length;
  1201. this.index = (this.index + 1) % len;
  1202. },
  1203. handleActions(action, options = {}) {
  1204. if (this.loading) return;
  1205. const {
  1206. zoomRate,
  1207. rotateDeg,
  1208. enableTransition
  1209. } = {
  1210. zoomRate: 0.2,
  1211. rotateDeg: 90,
  1212. enableTransition: true,
  1213. ...options
  1214. };
  1215. const {
  1216. transform
  1217. } = this;
  1218. switch (action) {
  1219. case 'zoomOut':
  1220. if (transform.scale > 0.2) {
  1221. transform.scale = parseFloat((transform.scale - zoomRate).toFixed(3));
  1222. }
  1223. break;
  1224. case 'zoomIn':
  1225. transform.scale = parseFloat((transform.scale + zoomRate).toFixed(3));
  1226. break;
  1227. case 'clocelise':
  1228. transform.deg += rotateDeg;
  1229. break;
  1230. case 'anticlocelise':
  1231. transform.deg -= rotateDeg;
  1232. break;
  1233. }
  1234. transform.enableTransition = enableTransition;
  1235. }
  1236. },
  1237. mounted() {
  1238. this.deviceSupportInstall();
  1239. if (this.appendToBody) {
  1240. document.body.appendChild(this.$el);
  1241. }
  1242. // add tabindex then wrapper can be focusable via Javascript
  1243. // focus wrapper so arrow key can't cause inner scroll behavior underneath
  1244. this.$refs['el-image-viewer__wrapper'].focus();
  1245. },
  1246. destroyed() {
  1247. // if appendToBody is true, remove DOM node after destroy
  1248. if (this.appendToBody && this.$el && this.$el.parentNode) {
  1249. this.$el.parentNode.removeChild(this.$el);
  1250. }
  1251. }
  1252. });
  1253. // CONCATENATED MODULE: ./node_modules/element-ui/packages/image/src/image-viewer.vue?vue&type=script&lang=js
  1254. /* harmony default export */ var src_image_viewervue_type_script_lang_js = (image_viewervue_type_script_lang_js);
  1255. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  1256. var componentNormalizer = __webpack_require__(2);
  1257. // CONCATENATED MODULE: ./node_modules/element-ui/packages/image/src/image-viewer.vue
  1258. /* normalize component */
  1259. var component = Object(componentNormalizer["a" /* default */])(
  1260. src_image_viewervue_type_script_lang_js,
  1261. render,
  1262. staticRenderFns,
  1263. false,
  1264. null,
  1265. null,
  1266. "17d24eb5"
  1267. )
  1268. /* harmony default export */ var image_viewer = __webpack_exports__["a"] = (component.exports);
  1269. /***/ }),
  1270. /***/ 166:
  1271. /***/ (function(module, exports) {
  1272. // Exports
  1273. module.exports = {
  1274. };
  1275. /***/ }),
  1276. /***/ 167:
  1277. /***/ (function(module, exports) {
  1278. // Exports
  1279. module.exports = {
  1280. };
  1281. /***/ }),
  1282. /***/ 168:
  1283. /***/ (function(module, exports) {
  1284. // Exports
  1285. module.exports = {
  1286. };
  1287. /***/ }),
  1288. /***/ 169:
  1289. /***/ (function(module, exports) {
  1290. // Exports
  1291. module.exports = {
  1292. };
  1293. /***/ }),
  1294. /***/ 177:
  1295. /***/ (function(module, exports) {
  1296. // Exports
  1297. module.exports = {
  1298. };
  1299. /***/ }),
  1300. /***/ 178:
  1301. /***/ (function(module, exports) {
  1302. // Exports
  1303. module.exports = {
  1304. };
  1305. /***/ }),
  1306. /***/ 179:
  1307. /***/ (function(module, exports) {
  1308. // Exports
  1309. module.exports = {
  1310. };
  1311. /***/ }),
  1312. /***/ 180:
  1313. /***/ (function(module, exports, __webpack_require__) {
  1314. module.exports = __webpack_require__.p + "img/tick.539ed66.png";
  1315. /***/ }),
  1316. /***/ 181:
  1317. /***/ (function(module, exports) {
  1318. // Exports
  1319. module.exports = {
  1320. };
  1321. /***/ }),
  1322. /***/ 184:
  1323. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1324. "use strict";
  1325. // ESM COMPAT FLAG
  1326. __webpack_require__.r(__webpack_exports__);
  1327. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/TabNav.vue?vue&type=template&id=8a32da06&scoped=true
  1328. var render = function render() {
  1329. var _vm = this,
  1330. _c = _vm._self._c;
  1331. return _c('div', {
  1332. staticClass: "tabs",
  1333. style: {
  1334. marginTop: _vm.marginTop + 'px',
  1335. marginBottom: _vm.marginBottom + 'px',
  1336. fontSize: _vm.fontSize + 'px'
  1337. }
  1338. }, [_vm._ssrNode(Array.isArray(_vm.tabList) ? "<ul" + _vm._ssrClass(null, _vm.borderType) + " data-v-8a32da06>" + _vm._ssrList(_vm.tabList, function (item, i) {
  1339. return !item.hasOwnProperty('isShow') || item.isShow ? "<li" + _vm._ssrClass(null, {
  1340. active: i === _vm.currTab
  1341. }) + _vm._ssrStyle(null, {
  1342. minWidth: _vm.liWidth + 'px',
  1343. height: _vm.liHeight + 'px',
  1344. lineHeight: _vm.liHeight + 'px',
  1345. marginRight: _vm.marginRight + 'px'
  1346. }, null) + " data-v-8a32da06><div data-v-8a32da06>" + _vm._ssrEscape(_vm._s(item.name)) + "</div></li>" : "<!---->";
  1347. }) + _vm._ssrList(_vm.comRemaining, function (item) {
  1348. return "<li class=\"unclickable\"" + _vm._ssrStyle(null, {
  1349. minWidth: _vm.liWidth + 'px',
  1350. lineHeight: _vm.liHeight + 'px',
  1351. marginRight: _vm.marginRight + 'px'
  1352. }, null) + " data-v-8a32da06><div data-v-8a32da06>" + _vm._ssrEscape(_vm._s(item)) + "</div></li>";
  1353. }) + "</ul>" : "<ul data-v-8a32da06>" + _vm._ssrList(Object.keys(_vm.tabList), function (val, i) {
  1354. return "<li" + _vm._ssrClass(null, {
  1355. active: i === _vm.currTab
  1356. }) + _vm._ssrStyle(null, {
  1357. minWidth: _vm.liWidth + 'px',
  1358. marginRight: _vm.marginRight + 'px'
  1359. }, null) + " data-v-8a32da06><div data-v-8a32da06>" + _vm._ssrEscape(_vm._s(val)) + "</div></li>";
  1360. }) + "</ul>")]);
  1361. };
  1362. var staticRenderFns = [];
  1363. // CONCATENATED MODULE: ./components/TabNav.vue?vue&type=template&id=8a32da06&scoped=true
  1364. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/TabNav.vue?vue&type=script&lang=js
  1365. /* harmony default export */ var TabNavvue_type_script_lang_js = ({
  1366. props: {
  1367. // color: {
  1368. // type: String,
  1369. // },
  1370. borderType: {
  1371. type: String,
  1372. default: 'noBorder'
  1373. },
  1374. fontSize: {
  1375. type: Number,
  1376. default: 14
  1377. },
  1378. marginTop: {
  1379. type: Number,
  1380. default: 0
  1381. },
  1382. marginBottom: {
  1383. type: Number,
  1384. default: 10
  1385. },
  1386. liWidth: {
  1387. type: Number,
  1388. default: 0
  1389. },
  1390. liHeight: {
  1391. type: Number,
  1392. default: 28
  1393. },
  1394. marginRight: {
  1395. type: Number,
  1396. default: 0
  1397. },
  1398. currTab: {
  1399. type: [Number, String],
  1400. default: 0
  1401. },
  1402. tabList: {
  1403. type: [Array, Object],
  1404. default: () => {
  1405. return [];
  1406. }
  1407. },
  1408. allPrintTab: {
  1409. type: [Array, Object],
  1410. default: () => {
  1411. return [];
  1412. }
  1413. }
  1414. },
  1415. data() {
  1416. return {
  1417. textColor: 'red'
  1418. };
  1419. },
  1420. computed: {
  1421. comRemaining() {
  1422. const mapTabList = this.tabList.map(i => i.name);
  1423. return this.allPrintTab.filter(element => !mapTabList.includes(element));
  1424. }
  1425. },
  1426. methods: {
  1427. selTab(i) {
  1428. this.$emit('update:currTab', i);
  1429. this.$emit('handle');
  1430. }
  1431. }
  1432. });
  1433. // CONCATENATED MODULE: ./components/TabNav.vue?vue&type=script&lang=js
  1434. /* harmony default export */ var components_TabNavvue_type_script_lang_js = (TabNavvue_type_script_lang_js);
  1435. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  1436. var componentNormalizer = __webpack_require__(2);
  1437. // CONCATENATED MODULE: ./components/TabNav.vue
  1438. function injectStyles (context) {
  1439. var style0 = __webpack_require__(192)
  1440. if (style0.__inject__) style0.__inject__(context)
  1441. }
  1442. /* normalize component */
  1443. var component = Object(componentNormalizer["a" /* default */])(
  1444. components_TabNavvue_type_script_lang_js,
  1445. render,
  1446. staticRenderFns,
  1447. false,
  1448. injectStyles,
  1449. "8a32da06",
  1450. "1ce05afc"
  1451. )
  1452. /* harmony default export */ var TabNav = __webpack_exports__["default"] = (component.exports);
  1453. /***/ }),
  1454. /***/ 189:
  1455. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1456. "use strict";
  1457. __webpack_require__.r(__webpack_exports__);
  1458. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_NewPriceTable_vue_vue_type_style_index_0_id_8da20436_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(166);
  1459. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_NewPriceTable_vue_vue_type_style_index_0_id_8da20436_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_NewPriceTable_vue_vue_type_style_index_0_id_8da20436_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
  1460. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_NewPriceTable_vue_vue_type_style_index_0_id_8da20436_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_NewPriceTable_vue_vue_type_style_index_0_id_8da20436_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  1461. /***/ }),
  1462. /***/ 190:
  1463. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1464. "use strict";
  1465. __webpack_require__.r(__webpack_exports__);
  1466. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TotalTable_vue_vue_type_style_index_0_id_8afd0988_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
  1467. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TotalTable_vue_vue_type_style_index_0_id_8afd0988_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TotalTable_vue_vue_type_style_index_0_id_8afd0988_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
  1468. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TotalTable_vue_vue_type_style_index_0_id_8afd0988_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TotalTable_vue_vue_type_style_index_0_id_8afd0988_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  1469. /***/ }),
  1470. /***/ 191:
  1471. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1472. "use strict";
  1473. __webpack_require__.r(__webpack_exports__);
  1474. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_UnitTable_vue_vue_type_style_index_0_id_931e8840_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(168);
  1475. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_UnitTable_vue_vue_type_style_index_0_id_931e8840_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_UnitTable_vue_vue_type_style_index_0_id_931e8840_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
  1476. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_UnitTable_vue_vue_type_style_index_0_id_931e8840_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_UnitTable_vue_vue_type_style_index_0_id_931e8840_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  1477. /***/ }),
  1478. /***/ 192:
  1479. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1480. "use strict";
  1481. __webpack_require__.r(__webpack_exports__);
  1482. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TabNav_vue_vue_type_style_index_0_id_8a32da06_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
  1483. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TabNav_vue_vue_type_style_index_0_id_8a32da06_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TabNav_vue_vue_type_style_index_0_id_8a32da06_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
  1484. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TabNav_vue_vue_type_style_index_0_id_8a32da06_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TabNav_vue_vue_type_style_index_0_id_8a32da06_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  1485. /***/ }),
  1486. /***/ 200:
  1487. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1488. "use strict";
  1489. // ESM COMPAT FLAG
  1490. __webpack_require__.r(__webpack_exports__);
  1491. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/table/NewPriceTable.vue?vue&type=template&id=8da20436&scoped=true
  1492. var render = function render() {
  1493. var _vm = this,
  1494. _c = _vm._self._c;
  1495. return _c('div', {
  1496. staticClass: "wrap",
  1497. style: {
  1498. marginBottom: _vm.marginBottom + 'px'
  1499. }
  1500. }, [_vm._ssrNode((_vm.tableType != 'Addon' ? "<p class=\"tb-title\" data-v-8da20436>" + _vm._s(_vm.comTitle) + "</p>" : "<!---->") + " "), _vm._ssrNode("<div" + _vm._ssrClass(null, _vm.getTableContainerClass) + " data-v-8da20436>", "</div>", [_c('el-table', {
  1501. ref: "elTable",
  1502. staticStyle: {
  1503. "width": "100%"
  1504. },
  1505. attrs: {
  1506. "show-header": _vm.tableType != 'Addon',
  1507. "data": _vm.comTableData,
  1508. "header-cell-style": {
  1509. backgroundColor: '#fff',
  1510. fontWeight: 'normal',
  1511. fontSize: '14px',
  1512. fontFamily: 'Proxima Nova',
  1513. color: '#000',
  1514. '--comDisplayCss': _vm.comDisplayCss
  1515. },
  1516. "row-key": "id",
  1517. "span-method": _vm.arraySpanMethod,
  1518. "row-class-name": _vm.tableRowClassName
  1519. },
  1520. on: {
  1521. "selection-change": _vm.handleSelectionChange,
  1522. "select": _vm.dialogCheck
  1523. }
  1524. }, [_vm.tableType != 'Comparison' ? _c('el-table-column', {
  1525. attrs: {
  1526. "type": "selection",
  1527. "width": "50",
  1528. "align": "center",
  1529. "reserve-selection": true,
  1530. "selectable": _vm.handleSelectable
  1531. }
  1532. }) : _vm._e(), _vm._v(" "), _vm._l(_vm.tableColumns, function (item) {
  1533. return [item.type ? _c('el-table-column', {
  1534. key: item.prop,
  1535. attrs: {
  1536. "align": item.align ? item.align : 'left',
  1537. "prop": item.prop,
  1538. "label": item.label,
  1539. "formatter": item.formatter,
  1540. "width": item.width,
  1541. "sortable": item.sortable
  1542. },
  1543. scopedSlots: _vm._u([{
  1544. key: "default",
  1545. fn: function ({
  1546. row
  1547. }) {
  1548. return [item.type == 'radioInput' ? [_c('div', {
  1549. staticClass: "flex between"
  1550. }, [_c('span', [_vm._v(_vm._s(row.decName))]), _vm._v(" "), _c('el-input', {
  1551. staticClass: "edit-input",
  1552. attrs: {
  1553. "min": "0",
  1554. "max": row.max_num,
  1555. "type": "number",
  1556. "size": "small"
  1557. },
  1558. on: {
  1559. "input": function ($event) {
  1560. return _vm.getNumber($event, row, row.max_num);
  1561. }
  1562. },
  1563. model: {
  1564. value: row.num,
  1565. callback: function ($$v) {
  1566. _vm.$set(row, "num", $$v);
  1567. },
  1568. expression: "row.num"
  1569. }
  1570. })], 1)] : _c('div', [row.filter_boolean ? [_c('div', {
  1571. staticClass: "triangle"
  1572. }), _vm._v(" "), _c('div', {
  1573. staticClass: "text"
  1574. }, [_vm._v("Eco")])] : _vm._e(), _vm._v("\n " + _vm._s(row[item.prop]) + "\n "), _vm.tableType == 'Undecorated' ? _c('el-popover', {
  1575. attrs: {
  1576. "placement": "top-start",
  1577. "trigger": "hover"
  1578. }
  1579. }, [_c('i', {
  1580. staticClass: "el-icon-warning",
  1581. attrs: {
  1582. "slot": "reference"
  1583. },
  1584. slot: "reference"
  1585. }), _vm._v(" "), _c('p', {
  1586. staticClass: "popover-text"
  1587. }, [_vm._v(_vm._s(_vm.comTitle))])]) : _vm._e()], 2)];
  1588. }
  1589. }], null, true)
  1590. }) : _vm._e(), _vm._v(" "), !item.type ? _c('el-table-column', {
  1591. key: item.prop,
  1592. attrs: {
  1593. "align": item.align ? item.align : 'center',
  1594. "prop": item.prop,
  1595. "label": item.label,
  1596. "formatter": item.formatter,
  1597. "sortable": item.sortable,
  1598. "show-overflow-tooltip": "",
  1599. "width": (798 - _vm.tableColumns[0].width - _vm.tableColumns[0].extraWidth) / (_vm.tableColumns.length - 1)
  1600. },
  1601. scopedSlots: _vm._u([{
  1602. key: "default",
  1603. fn: function ({
  1604. row,
  1605. $index
  1606. }) {
  1607. return [item.prop === 'website_setup' ? _c('div', [$index === 0 && _vm.tableType == 'Decoration' ? _c('div', [row['supplier_setup_id'] < 5 || row['supplier_setup_id'] == 7 ? _c('span', [_vm._v("£ " + _vm._s(row['supplier_setup'] ? parseFloat(row['supplier_setup']).toFixed(2) : "0.00"))]) : _vm._e(), _vm._v(" "), _c('span', [_vm._v(_vm._s(_vm.$_setupPriceFilter(row['supplier_setup_id'])))])]) : _c('div', [row['website_setup_id'] < 5 || row['website_setup_id'] == 7 ? _c('span', [_vm._v("£ " + _vm._s(row['website_setup'] ? parseFloat(row['website_setup']).toFixed(2) : "0.00"))]) : _vm._e(), _vm._v(" "), _c('span', [_vm._v(_vm._s(_vm.$_setupPriceFilter(row['website_setup_id'])))])])]) : _vm.judgeProp(row, item.prop, $index) == '111' || _vm.judgeProp(row, item.prop, $index) == '111.00' ? _c('div', [_vm._v("\n -\n ")]) : _vm.judgeProp(row, item.prop, $index) == '999' || _vm.judgeProp(row, item.prop, $index) === '999.00' ? _c('div', [_vm._v("\n POA\n ")]) : _vm.judgeProp(row, item.prop, $index) === '' ? _c('div', [_vm._v("0")]) : _c('div', [_vm.isNumber(_vm.judgeProp(row, item.prop, $index)) && !item.isFirstColumn ? _c('span', [_vm._v("£")]) : _vm._e(), _vm._v(" "), _c('span', [_vm._v(_vm._s(_vm.judgeProp(row, item.prop, $index)))])])];
  1608. }
  1609. }], null, true)
  1610. }) : _vm._e()];
  1611. })], 2)], 1)], 2);
  1612. };
  1613. var staticRenderFns = [];
  1614. // CONCATENATED MODULE: ./components/table/NewPriceTable.vue?vue&type=template&id=8da20436&scoped=true
  1615. // EXTERNAL MODULE: external "number-precision"
  1616. var external_number_precision_ = __webpack_require__(121);
  1617. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/table/NewPriceTable.vue?vue&type=script&lang=js
  1618. /* harmony default export */ var NewPriceTablevue_type_script_lang_js = ({
  1619. filters: {
  1620. // Decoration Table:打印价格+附加价格
  1621. multiplyPrice(a1, row, prop) {
  1622. const rep = /^[0-9]+.?[0-9]*$/;
  1623. if (!rep.test(a1)) {
  1624. return a1;
  1625. } else {
  1626. return Object(external_number_precision_["times"])(a1, row.num);
  1627. }
  1628. },
  1629. // Undecorated Table:基础价格+Decoration所选价格(包含附加价格)
  1630. plusPrice(a1, a2) {
  1631. return a2 ? Object(external_number_precision_["plus"])(a1, a2) : a1;
  1632. },
  1633. // Decoration Table:计算差价
  1634. differencePrice(a1, row, prop, selectRow) {
  1635. const rep = /^[0-9]+.?[0-9]*$/;
  1636. if (rep.test(a1)) {
  1637. const temp = prop.split('_');
  1638. const supplier = +row[`supplier_${temp[1]}`];
  1639. const suppliers = Object(external_number_precision_["times"])(row.num - 1, supplier);
  1640. const noIncludePrice = Object(external_number_precision_["plus"])(a1, suppliers);
  1641. const selSupplier = +selectRow[`supplier_${temp[1]}`];
  1642. const selSuppliers = Object(external_number_precision_["times"])(selectRow.num - 1, selSupplier);
  1643. const isIncludePrice = Object(external_number_precision_["plus"])(+selectRow[prop], selSuppliers);
  1644. return noIncludePrice > isIncludePrice ? `+${Object(external_number_precision_["minus"])(noIncludePrice, isIncludePrice)}` : Object(external_number_precision_["minus"])(noIncludePrice, isIncludePrice);
  1645. } else {
  1646. return a1;
  1647. }
  1648. }
  1649. },
  1650. props: {
  1651. hasDecAdd: {
  1652. type: Number,
  1653. default: 0
  1654. },
  1655. tableData: {
  1656. type: Array,
  1657. default: () => {
  1658. return [];
  1659. }
  1660. },
  1661. tableColumns: {
  1662. type: Array,
  1663. default: () => {
  1664. return [];
  1665. }
  1666. },
  1667. operateWith: {
  1668. type: String,
  1669. default: '100%'
  1670. },
  1671. isCheckBox: {
  1672. type: Boolean,
  1673. default: false
  1674. },
  1675. tableType: {
  1676. type: String,
  1677. default: 'Undecorated'
  1678. },
  1679. decorationObj: {
  1680. type: Object,
  1681. default: () => {
  1682. return {};
  1683. }
  1684. },
  1685. selectId: {
  1686. type: Number,
  1687. default: null
  1688. },
  1689. selectRow: {
  1690. type: Object,
  1691. default: () => {
  1692. return {};
  1693. }
  1694. },
  1695. multipleSelection: {
  1696. type: Array,
  1697. default: () => {
  1698. return [];
  1699. }
  1700. },
  1701. selectDecoration: {
  1702. type: Object,
  1703. default: () => {
  1704. return {};
  1705. }
  1706. },
  1707. curPrint: {
  1708. type: String,
  1709. default: ''
  1710. },
  1711. curModel: {
  1712. type: String,
  1713. default: ''
  1714. },
  1715. marginBottom: {
  1716. type: Number,
  1717. default: 20
  1718. },
  1719. decorationMultiple: {
  1720. type: Number,
  1721. default: 1
  1722. },
  1723. headerShow: {
  1724. type: Boolean,
  1725. default: true
  1726. }
  1727. },
  1728. data() {
  1729. return {
  1730. setupConfigList: [{
  1731. id: 1,
  1732. name: '/col'
  1733. }, {
  1734. id: 2,
  1735. name: '/desgin'
  1736. }, {
  1737. id: 3,
  1738. name: '/pos'
  1739. }, {
  1740. id: 4,
  1741. name: '/pos desgin'
  1742. }, {
  1743. id: 5,
  1744. name: 'POA'
  1745. }, {
  1746. id: 6,
  1747. name: 'Waived'
  1748. }],
  1749. setupTitleList: ['1st', '2nd', '3rd']
  1750. };
  1751. },
  1752. computed: {
  1753. getTableContainerClass() {
  1754. // 根据tableType的值返回不同的class
  1755. return {
  1756. 'table-container': true,
  1757. 'border-Decoration': this.tableType === 'Decoration' && this.hasDecAdd
  1758. };
  1759. },
  1760. comTitle() {
  1761. if (this.tableType === 'Undecorated') {
  1762. return `Includes ${this.curModel}`;
  1763. } else if (this.tableType === 'Decoration') {
  1764. return `Add-Ons`;
  1765. } else {
  1766. return this.curPrint;
  1767. }
  1768. },
  1769. comDisplayCss() {
  1770. return this.tableType === 'Comparison' ? '1px solid #efefef' : 'none';
  1771. },
  1772. comMultipleSelID() {
  1773. return this.multipleSelection.map(i => i.id);
  1774. },
  1775. comTableData() {
  1776. if (this.tableType === 'Decoration') {
  1777. return this.tableData;
  1778. } else {
  1779. return this.tableData;
  1780. }
  1781. }
  1782. },
  1783. mounted() {
  1784. // 初始勾上默认选择打印项
  1785. if (JSON.stringify(this.selectRow) !== '{}') {
  1786. this.$refs.elTable.toggleRowSelection(this.selectRow);
  1787. }
  1788. },
  1789. methods: {
  1790. judgeProp(row, prop, $index) {
  1791. if ($index === 0 && this.tableType === 'Decoration') {
  1792. const temp = prop.split('_');
  1793. return row[`supplier_${temp[1]}`];
  1794. } else {
  1795. return row[prop];
  1796. }
  1797. },
  1798. $_setupPriceFilter(setupPriceID) {
  1799. const result = this.setupConfigList.filter(item => item.id === setupPriceID);
  1800. return result.length > 0 ? result[0].name : '';
  1801. },
  1802. isNumber(val) {
  1803. const rep = /^[0-9]+.?[0-9]*$/;
  1804. return rep.test(val);
  1805. },
  1806. /* 暂不实现此功能
  1807. //点击table栏时选中按钮
  1808. handleCurrentChange(currentRow, oldCurrentRow) {
  1809. this.$refs.elTable.clearSelection()
  1810. this.$emit('update:selectId', currentRow.id)
  1811. this.addCar(currentRow)
  1812. },
  1813. */
  1814. // table全选
  1815. handleSelectionChange(val) {
  1816. this.$emit('update:multipleSelection', val);
  1817. },
  1818. dialogCheck(selection, row) {
  1819. if (this.isCheckBox) return; // 是多选框返回
  1820. this.$refs.elTable.clearSelection();
  1821. // 初始化
  1822. if (selection.length === 0) {
  1823. this.$emit('update:selectId', null);
  1824. this.$emit('update:selectRow', {});
  1825. return;
  1826. }
  1827. if (row) {
  1828. this.$emit('update:selectId', row.id);
  1829. this.$emit('update:selectRow', row);
  1830. this.$refs.elTable.toggleRowSelection(row, true);
  1831. }
  1832. },
  1833. addCar(currentRow) {
  1834. // 加入购物车需要parentId
  1835. const selrow = Object.assign({}, currentRow);
  1836. selrow.parentId = this.decorationObj.parentId;
  1837. this.$emit('update:selectRow', selrow);
  1838. this.$refs.elTable.toggleRowSelection(currentRow);
  1839. },
  1840. getRowKey(row) {
  1841. return row.id;
  1842. },
  1843. arraySpanMethod({
  1844. row,
  1845. column,
  1846. rowIndex,
  1847. columnIndex
  1848. }) {
  1849. // 隐藏'Decoration'选项框
  1850. if (this.tableType === 'Decoration' && columnIndex === 0) {
  1851. return [0, 1];
  1852. }
  1853. if (this.tableType === 'Decoration' && columnIndex === 1) {
  1854. return [1, 2];
  1855. }
  1856. },
  1857. tableRowClassName({
  1858. row
  1859. }) {
  1860. if (this.tableType === 'Decoration') {
  1861. return this.decorationMultiple ? 'borderNone' : 'hiddenRow';
  1862. }
  1863. return 'fontBold';
  1864. },
  1865. handleSelectable(row, index) {
  1866. // website_setup_id 5为POA,不可选
  1867. return row.website_setup_id !== 5;
  1868. },
  1869. getNumber(e, row, max) {
  1870. if (parseInt(e) > max) {
  1871. row.num = max;
  1872. }
  1873. }
  1874. }
  1875. });
  1876. // CONCATENATED MODULE: ./components/table/NewPriceTable.vue?vue&type=script&lang=js
  1877. /* harmony default export */ var table_NewPriceTablevue_type_script_lang_js = (NewPriceTablevue_type_script_lang_js);
  1878. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  1879. var componentNormalizer = __webpack_require__(2);
  1880. // CONCATENATED MODULE: ./components/table/NewPriceTable.vue
  1881. function injectStyles (context) {
  1882. var style0 = __webpack_require__(189)
  1883. if (style0.__inject__) style0.__inject__(context)
  1884. }
  1885. /* normalize component */
  1886. var component = Object(componentNormalizer["a" /* default */])(
  1887. table_NewPriceTablevue_type_script_lang_js,
  1888. render,
  1889. staticRenderFns,
  1890. false,
  1891. injectStyles,
  1892. "8da20436",
  1893. "518290f4"
  1894. )
  1895. /* harmony default export */ var NewPriceTable = __webpack_exports__["default"] = (component.exports);
  1896. /***/ }),
  1897. /***/ 201:
  1898. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1899. "use strict";
  1900. // ESM COMPAT FLAG
  1901. __webpack_require__.r(__webpack_exports__);
  1902. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/table/TotalTable.vue?vue&type=template&id=8afd0988&scoped=true
  1903. var render = function render() {
  1904. var _vm = this,
  1905. _c = _vm._self._c;
  1906. return _c('div', {
  1907. staticClass: "wrap"
  1908. }, [_vm._ssrNode("<p" + _vm._ssrClass("tb-title", {
  1909. 'left': _vm.tableType
  1910. }) + " data-v-8afd0988><span data-v-8afd0988>" + _vm._ssrEscape(_vm._s(_vm.title)) + "</span> " + (_vm.title == 'Sell Price' && _vm.comLocationNum !== 1 ? "<span" + _vm._ssrStyle(null, {
  1911. width: _vm.comWidth + 'px'
  1912. }, null) + " data-v-8afd0988>Total</span>" : "<!---->") + "</p> "), _c('el-table', {
  1913. ref: "elTable",
  1914. attrs: {
  1915. "border": "",
  1916. "data": _vm.tableData,
  1917. "header-cell-style": {
  1918. backgroundColor: '#fff',
  1919. color: '#606266',
  1920. fontWeight: 500,
  1921. fontSize: '16px'
  1922. },
  1923. "stripe": ""
  1924. }
  1925. }, _vm._l(_vm.tableColumns, function (item, index) {
  1926. return _c('el-table-column', {
  1927. key: `${_vm.curOrder}-${item.prop}`,
  1928. attrs: {
  1929. "align": item.align ? item.align : 'center',
  1930. "prop": item.prop,
  1931. "label": item.label,
  1932. "formatter": item.formatter,
  1933. "sortable": item.sortable
  1934. },
  1935. scopedSlots: _vm._u([{
  1936. key: "header",
  1937. fn: function (scope) {
  1938. return [_vm.title == 'Buy Price' && _vm.comLocationNum === 1 ? _c('div', [_c('el-input', {
  1939. directives: [{
  1940. name: "show",
  1941. rawName: "v-show",
  1942. value: !item.isFirstColumn,
  1943. expression: "!item.isFirstColumn"
  1944. }],
  1945. attrs: {
  1946. "size": "small",
  1947. "type": "number",
  1948. "min": _vm.min
  1949. },
  1950. on: {
  1951. "blur": function ($event) {
  1952. return _vm.getNumber($event, index);
  1953. }
  1954. },
  1955. model: {
  1956. value: item.label,
  1957. callback: function ($$v) {
  1958. _vm.$set(item, "label", $$v);
  1959. },
  1960. expression: "item.label"
  1961. }
  1962. }), _vm._v(" "), _c('span', {
  1963. directives: [{
  1964. name: "show",
  1965. rawName: "v-show",
  1966. value: item.isFirstColumn,
  1967. expression: "item.isFirstColumn"
  1968. }]
  1969. }, [_vm._v(_vm._s(item.label))])], 1) : _c('div', [_c('span', [_vm._v(_vm._s(item.label))])])];
  1970. }
  1971. }, {
  1972. key: "default",
  1973. fn: function (scope) {
  1974. return [_vm.tableType && !item.isFirstColumn ? [_c('span', [_vm._v(_vm._s(_vm._f("differencePrice")(scope.row[item.prop], _vm.curDecoration[item.prop], _vm.indexDecoration[item.prop], _vm.poaConfig)))])] : [(typeof scope.row[item.prop] == 'string' && scope.row[item.prop].includes('.') || typeof scope.row[item.prop] == 'number') && !item.isFirstColumn ? _c('span', [_vm._v("£")]) : _vm._e(), _vm._v(" "), _c('span', [_vm._v(_vm._s(scope.row[item.prop] ? scope.row[item.prop] : '0.00'))])]];
  1975. }
  1976. }], null, true)
  1977. });
  1978. }), 1)], 2);
  1979. };
  1980. var staticRenderFns = [];
  1981. // CONCATENATED MODULE: ./components/table/TotalTable.vue?vue&type=template&id=8afd0988&scoped=true
  1982. // EXTERNAL MODULE: external "number-precision"
  1983. var external_number_precision_ = __webpack_require__(121);
  1984. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/table/TotalTable.vue?vue&type=script&lang=js
  1985. /* harmony default export */ var TotalTablevue_type_script_lang_js = ({
  1986. filters: {
  1987. differencePrice(a, curDecoVal, indexDecoVal, poaConfig) {
  1988. const rep = /^[0-9]+(\.[0-9]*)?$/;
  1989. if (!rep.test(a)) {
  1990. return a || 'Waived';
  1991. }
  1992. if (poaConfig.includes(curDecoVal) || poaConfig.includes(indexDecoVal)) {
  1993. if (curDecoVal === '111' || curDecoVal === '111.00' || indexDecoVal === '111' || indexDecoVal === '111.00') {
  1994. return '-';
  1995. } else if (curDecoVal === '999' || curDecoVal === '999.00' || indexDecoVal === '999' || indexDecoVal === '999.00') {
  1996. return 'POA';
  1997. }
  1998. } else if (curDecoVal === indexDecoVal) {
  1999. return 0;
  2000. } else if (+curDecoVal > +indexDecoVal) {
  2001. return `-£ ${Object(external_number_precision_["minus"])(curDecoVal, indexDecoVal)}`;
  2002. } else if (+curDecoVal < +indexDecoVal) {
  2003. return `+£ ${Object(external_number_precision_["minus"])(indexDecoVal, curDecoVal)}`;
  2004. } else {
  2005. return 'Waived';
  2006. }
  2007. }
  2008. },
  2009. props: {
  2010. tableData: {
  2011. type: Array,
  2012. default: () => []
  2013. },
  2014. tableColumns: {
  2015. type: Array,
  2016. default: () => []
  2017. },
  2018. tableType: {
  2019. type: String,
  2020. default: ''
  2021. },
  2022. curDecoration: {
  2023. type: Object,
  2024. default: () => {}
  2025. },
  2026. indexDecoration: {
  2027. type: Object,
  2028. default: () => {}
  2029. },
  2030. comLocationNum: {
  2031. type: Number,
  2032. default: 1
  2033. },
  2034. curOrder: {
  2035. type: String,
  2036. default: ''
  2037. },
  2038. min: {
  2039. type: String,
  2040. default: ''
  2041. },
  2042. title: {
  2043. type: String,
  2044. default: ''
  2045. }
  2046. },
  2047. data() {
  2048. return {
  2049. poaConfig: ['111', '111.00', '999', '999.00']
  2050. };
  2051. },
  2052. methods: {
  2053. getNumber(e, index) {
  2054. if (parseInt(e.target.value) < this.min) {
  2055. this.$emit('send-idx', index);
  2056. }
  2057. }
  2058. },
  2059. computed: {
  2060. comWidth() {
  2061. return 800 / this.tableColumns.length - 1;
  2062. }
  2063. }
  2064. });
  2065. // CONCATENATED MODULE: ./components/table/TotalTable.vue?vue&type=script&lang=js
  2066. /* harmony default export */ var table_TotalTablevue_type_script_lang_js = (TotalTablevue_type_script_lang_js);
  2067. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  2068. var componentNormalizer = __webpack_require__(2);
  2069. // CONCATENATED MODULE: ./components/table/TotalTable.vue
  2070. function injectStyles (context) {
  2071. var style0 = __webpack_require__(190)
  2072. if (style0.__inject__) style0.__inject__(context)
  2073. }
  2074. /* normalize component */
  2075. var component = Object(componentNormalizer["a" /* default */])(
  2076. table_TotalTablevue_type_script_lang_js,
  2077. render,
  2078. staticRenderFns,
  2079. false,
  2080. injectStyles,
  2081. "8afd0988",
  2082. "35501f79"
  2083. )
  2084. /* harmony default export */ var TotalTable = __webpack_exports__["default"] = (component.exports);
  2085. /***/ }),
  2086. /***/ 202:
  2087. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2088. "use strict";
  2089. // ESM COMPAT FLAG
  2090. __webpack_require__.r(__webpack_exports__);
  2091. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/table/UnitTable.vue?vue&type=template&id=931e8840&scoped=true
  2092. var render = function render() {
  2093. var _vm = this,
  2094. _c = _vm._self._c;
  2095. return _c('div', [_vm._ssrNode("<p class=\"tb-title\" data-v-931e8840>Markup %</p> "), _c('el-table', {
  2096. ref: "elTable",
  2097. style: {
  2098. width: _vm.operateWith
  2099. },
  2100. attrs: {
  2101. "border": "",
  2102. "data": _vm.tableData,
  2103. "highlight-current-row": false,
  2104. "header-cell-style": {
  2105. backgroundColor: '#fff',
  2106. color: '#606266',
  2107. fontWeight: 500,
  2108. fontSize: '16px'
  2109. }
  2110. }
  2111. }, [_vm._l(_vm.tableColumns, function (item) {
  2112. return [item.isText ? _c('el-table-column', {
  2113. key: item.prop,
  2114. attrs: {
  2115. "align": "center",
  2116. "prop": item.prop,
  2117. "label": item.label,
  2118. "formatter": item.formatter,
  2119. "width": item.width,
  2120. "sortable": item.sortable
  2121. }
  2122. }) : _vm._e(), _vm._v(" "), !item.isText ? _c('el-table-column', {
  2123. key: item.prop,
  2124. attrs: {
  2125. "prop": item.prop,
  2126. "label": item.label,
  2127. "formatter": item.formatter,
  2128. "width": item.width,
  2129. "align": item.align ? item.align : 'center',
  2130. "sortable": item.sortable
  2131. },
  2132. scopedSlots: _vm._u([{
  2133. key: "default",
  2134. fn: function ({
  2135. row,
  2136. $index
  2137. }) {
  2138. return [_c('el-input', {
  2139. staticClass: "edit-input",
  2140. attrs: {
  2141. "size": "small",
  2142. "type": "number",
  2143. "min": "0"
  2144. },
  2145. on: {
  2146. "input": function ($event) {
  2147. return _vm.saveUnitData(row, $index);
  2148. }
  2149. },
  2150. model: {
  2151. value: row[item.prop],
  2152. callback: function ($$v) {
  2153. _vm.$set(row, item.prop, $$v);
  2154. },
  2155. expression: "row[item.prop]"
  2156. }
  2157. })];
  2158. }
  2159. }], null, true)
  2160. }) : _vm._e()];
  2161. })], 2)], 2);
  2162. };
  2163. var staticRenderFns = [];
  2164. // CONCATENATED MODULE: ./components/table/UnitTable.vue?vue&type=template&id=931e8840&scoped=true
  2165. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/table/UnitTable.vue?vue&type=script&lang=js
  2166. /* harmony default export */ var UnitTablevue_type_script_lang_js = ({
  2167. props: {
  2168. tableData: {
  2169. type: Array,
  2170. default: []
  2171. },
  2172. tableColumns: {
  2173. type: Array,
  2174. default: []
  2175. },
  2176. operateWith: {
  2177. type: String,
  2178. default: "100%"
  2179. },
  2180. selectionShow: {
  2181. type: Boolean,
  2182. default: false
  2183. },
  2184. handleShow: {
  2185. type: Boolean,
  2186. default: false
  2187. }
  2188. },
  2189. methods: {
  2190. saveUnitData(row, idx) {
  2191. this.tableData[idx] = row;
  2192. localStorage.setItem('unit', JSON.stringify(this.tableData));
  2193. }
  2194. }
  2195. });
  2196. // CONCATENATED MODULE: ./components/table/UnitTable.vue?vue&type=script&lang=js
  2197. /* harmony default export */ var table_UnitTablevue_type_script_lang_js = (UnitTablevue_type_script_lang_js);
  2198. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  2199. var componentNormalizer = __webpack_require__(2);
  2200. // CONCATENATED MODULE: ./components/table/UnitTable.vue
  2201. function injectStyles (context) {
  2202. var style0 = __webpack_require__(191)
  2203. if (style0.__inject__) style0.__inject__(context)
  2204. }
  2205. /* normalize component */
  2206. var component = Object(componentNormalizer["a" /* default */])(
  2207. table_UnitTablevue_type_script_lang_js,
  2208. render,
  2209. staticRenderFns,
  2210. false,
  2211. injectStyles,
  2212. "931e8840",
  2213. "01507f2a"
  2214. )
  2215. /* harmony default export */ var UnitTable = __webpack_exports__["default"] = (component.exports);
  2216. /***/ }),
  2217. /***/ 203:
  2218. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2219. "use strict";
  2220. // ESM COMPAT FLAG
  2221. __webpack_require__.r(__webpack_exports__);
  2222. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/table/MailTable.vue?vue&type=template&id=13e7bb30&scoped=true
  2223. var render = function render() {
  2224. var _vm = this,
  2225. _c = _vm._self._c;
  2226. return _c('div', [_vm._ssrNode("<table border=\"1\" bordercolor=\"#000\" style=\"\\n border-collapse: collapse;\\n font-size: 14px;\\n table-layout: fixed;\\n width: 100%;\\n min-width: 800px;\\n \" data-v-13e7bb30>", "</table>", [_vm._ssrNode("<tbody data-v-13e7bb30>", "</tbody>", [_vm._ssrNode(_vm._ssrList(_vm.mailData, function (items, key, i) {
  2227. return "<tr data-v-13e7bb30><td" + _vm._ssrStyle({
  2228. "padding": "18px 0",
  2229. "width": "40%",
  2230. "text-align": "center",
  2231. "color": "#000"
  2232. }, (i == 1 || i == 10) && _vm.objStyle, null) + " data-v-13e7bb30>" + _vm._ssrEscape("\n " + _vm._s(key) + "\n ") + "</td> <td style=\"padding: 18px 10px\" data-v-13e7bb30>" + (typeof items == 'string' ? "<div data-v-13e7bb30>" + (items.indexOf('@') != -1 || items.indexOf('http') != -1 ? "<a" + _vm._ssrAttr("href", items) + " style=\"color: #6495ed; text-decoration: none\" data-v-13e7bb30><span data-v-13e7bb30>" + _vm._ssrEscape(_vm._s(items)) + "</span></a>" : "<span data-v-13e7bb30>" + _vm._ssrEscape(_vm._s(items)) + "</span>") + "</div>" : _vm.$utils.checkType(items) == 'Object' ? "<div style=\"\\n width: 100%;\\n display: flex;\\n justify-content: space-between;\\n \" data-v-13e7bb30>" + _vm._ssrList(items, function (item, i) {
  2233. return "<div style=\"text-align: left; width: 100%\" data-v-13e7bb30>" + (key == 'QTY' ? "<span data-v-13e7bb30>" + _vm._ssrEscape(_vm._s(item)) + "</span>" : "<span data-v-13e7bb30>" + _vm._ssrEscape("$" + _vm._s(item)) + "</span>") + "</div>";
  2234. }) + "</div>" : _vm._ssrList(items, function (item, i) {
  2235. return "<div style=\"line-height: 20px\" data-v-13e7bb30><span data-v-13e7bb30>" + _vm._ssrEscape(_vm._s(item)) + "</span></div>";
  2236. })) + "</td></tr>";
  2237. }) + " "), _vm._ssrNode("<tr data-v-13e7bb30>", "</tr>", [_vm._ssrNode("<td colspan=\"2\" style=\"padding: 20px\" data-v-13e7bb30>", "</td>", [_vm._t("default")], 2)])], 2)])]);
  2238. };
  2239. var staticRenderFns = [];
  2240. // CONCATENATED MODULE: ./components/table/MailTable.vue?vue&type=template&id=13e7bb30&scoped=true
  2241. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/table/MailTable.vue?vue&type=script&lang=js
  2242. /* harmony default export */ var MailTablevue_type_script_lang_js = ({
  2243. props: {
  2244. mailData: {},
  2245. buyData: {}
  2246. },
  2247. data() {
  2248. return {
  2249. objStyle: {
  2250. fontWeight: 'bold',
  2251. backgroundColor: '#efefef'
  2252. }
  2253. };
  2254. }
  2255. });
  2256. // CONCATENATED MODULE: ./components/table/MailTable.vue?vue&type=script&lang=js
  2257. /* harmony default export */ var table_MailTablevue_type_script_lang_js = (MailTablevue_type_script_lang_js);
  2258. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  2259. var componentNormalizer = __webpack_require__(2);
  2260. // CONCATENATED MODULE: ./components/table/MailTable.vue
  2261. function injectStyles (context) {
  2262. }
  2263. /* normalize component */
  2264. var component = Object(componentNormalizer["a" /* default */])(
  2265. table_MailTablevue_type_script_lang_js,
  2266. render,
  2267. staticRenderFns,
  2268. false,
  2269. injectStyles,
  2270. "13e7bb30",
  2271. "f622c4d0"
  2272. )
  2273. /* harmony default export */ var MailTable = __webpack_exports__["default"] = (component.exports);
  2274. /***/ }),
  2275. /***/ 204:
  2276. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2277. "use strict";
  2278. // ESM COMPAT FLAG
  2279. __webpack_require__.r(__webpack_exports__);
  2280. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/PriceToImg.vue?vue&type=template&id=2e991f10
  2281. var render = function render() {
  2282. var _vm = this,
  2283. _c = _vm._self._c;
  2284. return _c('div', {
  2285. ref: "printArea",
  2286. staticStyle: {
  2287. "font-family": "ProximaNova-Regular",
  2288. "background-color": "#fff",
  2289. "padding": "20px",
  2290. "word-break": "break-word",
  2291. "box-sizing": "border-box"
  2292. }
  2293. }, [_vm._ssrNode("<table><tbody><tr><td style=\"margin-right: 14px;\">" + (_vm.isImgSrc ? "<img" + _vm._ssrAttr("src", _vm.comInfo.image) + " width=\"320\" height=\"320\">" : "<img width=\"250\" height=\"250\">") + "</td> <td style=\"vertical-align: top;\"><p style=\"font-weight: bold;font-size: 22px;padding-bottom: 24px;color:#00213B\"><span style=\"margin-right: 5px;\">" + _vm._ssrEscape(_vm._s(_vm.pageData.product_code)) + "</span> <span>" + _vm._ssrEscape(_vm._s(_vm.pageData.product_name)) + "</span></p> <p style=\"line-height: 20px;color:#00213B;font-size: 14px;\">" + _vm._s(_vm.comInfo.description) + "</p></td></tr></tbody></table> <div><p style=\"font-weight: bold;font-size: 17px;margin: 12px 0 8px;color:#00213B\">Specifications</p> <table style=\"width:100%;border-collapse: collapse;font-size: 14px;table-layout: fixed;text-align:center;\"><tbody><tr style=\"background-color: #F7F8FC;font-weight: bold;\">" + _vm._ssrList(_vm.headerColumns, function (item, key) {
  2294. return "<td style=\"padding:10px 0;color:#00213B;width: 25%;font-size: 14px;border:1px solid #EFEFEF\">" + _vm._ssrEscape(_vm._s(item.label)) + "</td>";
  2295. }) + "</tr> <tr>" + _vm._ssrList(_vm.headerColumns, function (item, key) {
  2296. return "<td style=\"padding:10px 0 6px;color:#00213B;border:1px solid #EFEFEF\">" + (_vm.specificationsObj[item.prop] ? "<div>" + (item.prop != 'addonArr' ? "<span>" + _vm._ssrEscape(_vm._s(_vm.specificationsObj[item.prop])) + "</span>" : _vm._ssrList(_vm.specificationsObj.addonArr, function (opt, idx) {
  2297. return "<div style=\"padding-bottom:4px;\">" + _vm._ssrEscape(_vm._s(opt)) + "</div>";
  2298. })) + "</div>" : "<span>-</span>") + "</td>";
  2299. }) + "</tr></tbody></table></div> <div><p style=\"font-weight: bold;font-size: 17px;margin: 12px 0 8px;color:#00213B\">Quote</p> <table style=\"width:100%;border-collapse: collapse;font-size: 14px;table-layout: fixed;text-align:center;\"><tbody>" + (_vm.comLocationNum !== 1 ? "<tr style=\"background-color: #F7F8FC;font-weight: bold;\"><td" + _vm._ssrAttr("colspan", _vm.tableColumns.length - 1) + " style=\"padding:10px 0;color:#00213B;border:1px solid #EFEFEF\">Quote</td> <td" + _vm._ssrStyle({
  2300. "padding": "10px 0",
  2301. "color": "#00213B",
  2302. "border": "1px solid #EFEFEF"
  2303. }, {
  2304. width: _vm.comWidth
  2305. }, null) + ">Total</td></tr>" : "<!---->") + " <tr style=\"background-color: #F7F8FC;font-weight: bold;\">" + _vm._ssrList(_vm.tableColumns, function (item, key) {
  2306. return "<td" + _vm._ssrStyle({
  2307. "padding": "10px 0",
  2308. "color": "#00213B",
  2309. "border": "1px solid #EFEFEF"
  2310. }, {
  2311. width: _vm.comWidth
  2312. }, null) + ">" + _vm._ssrEscape(_vm._s(item.label)) + "</td>";
  2313. }) + "</tr> " + _vm._ssrList(_vm.tableData, function (row) {
  2314. return "<tr style=\"padding:10px 0;\">" + _vm._ssrList(_vm.tableColumns, function (column) {
  2315. return "<td" + _vm._ssrStyle({
  2316. "padding": "10px 0",
  2317. "color": "#00213B",
  2318. "border": "1px solid #EFEFEF",
  2319. "white-space": "nowrap"
  2320. }, _vm.getColumnHeaderStyle(column), null) + ">" + _vm._ssrEscape("\n " + _vm._s(row[column.prop].includes('.') ? '£' : '') + " " + _vm._s(row[column.prop] ? row[column.prop] : '0.00') + "\n ") + "</td>";
  2321. }) + "</tr>";
  2322. }) + "</tbody></table></div> " + (_vm.emailForm.Comments ? "<div style=\"color:#00213B\"><p style=\"margin: 20px 0;\">" + _vm._ssrEscape(_vm._s(_vm.emailForm.Comments)) + "</p></div>" : "<!---->"))]);
  2323. };
  2324. var staticRenderFns = [];
  2325. // CONCATENATED MODULE: ./components/PriceToImg.vue?vue&type=template&id=2e991f10
  2326. // EXTERNAL MODULE: external "html2canvas"
  2327. var external_html2canvas_ = __webpack_require__(141);
  2328. var external_html2canvas_default = /*#__PURE__*/__webpack_require__.n(external_html2canvas_);
  2329. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/PriceToImg.vue?vue&type=script&lang=js
  2330. /* harmony default export */ var PriceToImgvue_type_script_lang_js = ({
  2331. props: {
  2332. pageData: {
  2333. type: Object,
  2334. default: {}
  2335. },
  2336. specificationsObj: {
  2337. type: Object,
  2338. default: {}
  2339. },
  2340. tableData: {
  2341. type: Array,
  2342. default: []
  2343. },
  2344. tableColumns: {
  2345. type: Array,
  2346. default: []
  2347. },
  2348. comLocationNum: {
  2349. type: Number,
  2350. default: 1
  2351. },
  2352. emailForm: {
  2353. type: Object,
  2354. default: {}
  2355. },
  2356. loading: {
  2357. type: Boolean,
  2358. default: false
  2359. },
  2360. isImgSrc: {
  2361. type: Boolean,
  2362. default: true
  2363. },
  2364. width: {
  2365. type: String,
  2366. default: '100%'
  2367. }
  2368. },
  2369. data() {
  2370. return {
  2371. headerColumns: [{
  2372. label: "LeadTime",
  2373. prop: "time",
  2374. type: "pre" //去掉$符号
  2375. }, {
  2376. label: "Model",
  2377. prop: "model",
  2378. type: "pre" //去掉$符号
  2379. }, {
  2380. label: "Decoration",
  2381. prop: "decoration",
  2382. type: "pre" //去掉$符号
  2383. }, {
  2384. label: "Add On",
  2385. prop: "addonArr",
  2386. type: "pre" //去掉$符号
  2387. }]
  2388. };
  2389. },
  2390. computed: {
  2391. comInfo() {
  2392. var _this$pageData;
  2393. return (_this$pageData = this.pageData) === null || _this$pageData === void 0 ? void 0 : _this$pageData.main;
  2394. },
  2395. comWidth() {
  2396. return 100 / this.tableColumns.length + '%';
  2397. }
  2398. },
  2399. created() {
  2400. if (!this.isImgSrc) {
  2401. this.getBase64Image(this.comInfo.image, 'productImg');
  2402. }
  2403. },
  2404. methods: {
  2405. getColumnHeaderStyle(column) {
  2406. if (column.prop === 'project') {
  2407. return {
  2408. 'font-weight': 'bold'
  2409. };
  2410. }
  2411. return {};
  2412. },
  2413. //Base64生成产品图片,因为跨域
  2414. getBase64Image(url, ref) {
  2415. var that = this;
  2416. var image = new Image();
  2417. image.src = url + '?v=' + Math.random(); // 处理缓存
  2418. image.crossOrigin = '*'; // 支持跨域图片
  2419. image.onload = function () {
  2420. var base64 = that.drawBase64Image(image);
  2421. that.$refs[ref].src = base64;
  2422. };
  2423. },
  2424. drawBase64Image(img) {
  2425. var canvas = document.createElement('canvas');
  2426. canvas.width = img.width;
  2427. canvas.height = img.height;
  2428. var ctx = canvas.getContext('2d');
  2429. ctx.drawImage(img, 0, 0, img.width, img.height);
  2430. var dataURL = canvas.toDataURL('image/png');
  2431. return dataURL;
  2432. },
  2433. htmlToPdf(title) {
  2434. const element = this.$refs.printArea;
  2435. const clientWidth = element.offsetWidth;
  2436. const clientHeight = element.offsetHeight;
  2437. const kh = [clientWidth, clientHeight];
  2438. const opts = {
  2439. scale: 1.5,
  2440. // 缩放比例,提高生成图片清晰度
  2441. useCORS: true,
  2442. // 允许加载跨域的图片
  2443. // allowTaint: true, // 允许图片跨域,和 useCORS 二者不可共同使用
  2444. tainttest: true,
  2445. // 检测每张图片已经加载完成
  2446. logging: true // 日志开关,发布的时候记得改成 false
  2447. };
  2448. external_html2canvas_default()(element, opts).then(canvas => {
  2449. const dataURL = canvas.toDataURL('image/png');
  2450. this.downloadImage(dataURL, kh, title);
  2451. this.$emit('update:loading', false);
  2452. }).catch(() => {
  2453. this.$emit('update:loading', false);
  2454. // Bus.$emit("finishDownload");
  2455. });
  2456. },
  2457. getUrlBase64(url, kh) {
  2458. return new Promise(resolve => {
  2459. let canvas = document.createElement('canvas');
  2460. const ctx = canvas.getContext('2d');
  2461. const img = new Image();
  2462. img.crossOrigin = 'Anonymous'; // 允许跨域
  2463. img.src = url;
  2464. img.onload = () => {
  2465. // eslint-disable-next-line prefer-destructuring
  2466. canvas.height = kh[1];
  2467. // eslint-disable-next-line prefer-destructuring
  2468. canvas.width = kh[0];
  2469. ctx.drawImage(img, 0, 0, kh[0], kh[1]);
  2470. const dataURL = canvas.toDataURL('image/png');
  2471. canvas = null;
  2472. resolve(dataURL);
  2473. };
  2474. });
  2475. },
  2476. downloadImage(imgUrl, kh, title) {
  2477. this.getUrlBase64(imgUrl, kh).then(base64 => {
  2478. const link = document.createElement('a');
  2479. link.href = base64;
  2480. link.download = `${title}.png`;
  2481. link.click();
  2482. });
  2483. }
  2484. }
  2485. });
  2486. // CONCATENATED MODULE: ./components/PriceToImg.vue?vue&type=script&lang=js
  2487. /* harmony default export */ var components_PriceToImgvue_type_script_lang_js = (PriceToImgvue_type_script_lang_js);
  2488. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  2489. var componentNormalizer = __webpack_require__(2);
  2490. // CONCATENATED MODULE: ./components/PriceToImg.vue
  2491. /* normalize component */
  2492. var component = Object(componentNormalizer["a" /* default */])(
  2493. components_PriceToImgvue_type_script_lang_js,
  2494. render,
  2495. staticRenderFns,
  2496. false,
  2497. null,
  2498. null,
  2499. "dda7dca6"
  2500. )
  2501. /* harmony default export */ var PriceToImg = __webpack_exports__["default"] = (component.exports);
  2502. /***/ }),
  2503. /***/ 217:
  2504. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2505. "use strict";
  2506. __webpack_require__.r(__webpack_exports__);
  2507. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Quote_vue_vue_type_style_index_0_id_21f896fd_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(177);
  2508. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Quote_vue_vue_type_style_index_0_id_21f896fd_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Quote_vue_vue_type_style_index_0_id_21f896fd_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
  2509. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Quote_vue_vue_type_style_index_0_id_21f896fd_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Quote_vue_vue_type_style_index_0_id_21f896fd_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  2510. /***/ }),
  2511. /***/ 218:
  2512. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2513. "use strict";
  2514. __webpack_require__.r(__webpack_exports__);
  2515. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_StockTable_vue_vue_type_style_index_0_id_13093327_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(178);
  2516. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_StockTable_vue_vue_type_style_index_0_id_13093327_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_StockTable_vue_vue_type_style_index_0_id_13093327_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
  2517. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_StockTable_vue_vue_type_style_index_0_id_13093327_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_StockTable_vue_vue_type_style_index_0_id_13093327_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  2518. /***/ }),
  2519. /***/ 219:
  2520. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2521. "use strict";
  2522. __webpack_require__.r(__webpack_exports__);
  2523. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ChangeTable_vue_vue_type_style_index_0_id_4c957f55_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(179);
  2524. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ChangeTable_vue_vue_type_style_index_0_id_4c957f55_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ChangeTable_vue_vue_type_style_index_0_id_4c957f55_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
  2525. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ChangeTable_vue_vue_type_style_index_0_id_4c957f55_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ChangeTable_vue_vue_type_style_index_0_id_4c957f55_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  2526. /***/ }),
  2527. /***/ 220:
  2528. /***/ (function(module, exports) {
  2529. // Exports
  2530. module.exports = {
  2531. };
  2532. /***/ }),
  2533. /***/ 221:
  2534. /***/ (function(module, exports) {
  2535. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAUCAYAAABvVQZ0AAAAAXNSR0IArs4c6QAAAqBJREFUOE9t1Onr53MUBfDXLUrZskYIf4ElKdkSWRJmpmzJNjMP7JGMpWw11qzDGLuGB2PfoygST0hKKUWUkm0Q4sFY5q3z6375zPT7PPn06f3+nHvuuefcstEzxjgc92B7nFVVr82ujDGOxWNYiwur6q3p7zW5uDPuxMl4Aj/jIlyH5bgGV2MFtsbZWINLq+rb4NQYY5NUwfX4CudW1Xs5HGOcgkfwSwMsqaqn+uwgrMSeXWRlwN7BPs1gRVX9PWG7CPdjW/zUhZ6fnIfIjP1HAUv/H+LEqvq9q+6Ee7GwW78ZV+JivIjzq+q7vrsFnsW+AdsbL+FXnIBDcQe+xuKqSqG5Z4yxX7e9e7TC2/3vllgwN4Axxo54Afsj1KPfDVX11zzT3hRXtSyR5IM5oKq1M7BD8GSz2xWfNqtP5gGbscu9H7BVHJChpc2I/DRW4wLsgAdwRNjhpqpaN8bYDNfiMryKc7r4KpyGRQG7HUtwUlW9MdHndNyFeOg2XIHtcF5VPTO5d1QPYM4aES+AS/F4mzA2mGn5PvbAFzgg2vRZgDOoMxB2y6YJOAwPtgYx8Zt4FMf0ezESrTj/yI7cb+mqqt6dS8CEbrKY6SUyl+APfB//4cfO6nP93rxbT9TWV9WfG4Mt6HGn3X9wYLcdRrf2kJZFaCRu0TI5XVNVMfIGzAIWrwUoGt6N+3A0bsGZWIfkda++k5gtnA/suPZaRp8NESN/1h76eIyxTWuXlKTgw22P46vqlfk0i5C74KHO68tVFe1mcYrGKZrMpt1vcHBVRdP/2+xxJ0oxY8yZljKM1VW1fowRoFNxIxLuRG7VdMv8N81pbMYYWX6X91Q/bxtkMFkK2cLLqyo7boNnXrBJW7s1k+j0etZQVX25Mcjs+1/MoQbO2FAmGQAAAABJRU5ErkJggg=="
  2536. /***/ }),
  2537. /***/ 222:
  2538. /***/ (function(module, exports, __webpack_require__) {
  2539. module.exports = __webpack_require__.p + "img/xunjia.189a53f.png";
  2540. /***/ }),
  2541. /***/ 223:
  2542. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2543. "use strict";
  2544. __webpack_require__.r(__webpack_exports__);
  2545. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Project_vue_vue_type_style_index_0_id_fde9769c_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(181);
  2546. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Project_vue_vue_type_style_index_0_id_fde9769c_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Project_vue_vue_type_style_index_0_id_fde9769c_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
  2547. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Project_vue_vue_type_style_index_0_id_fde9769c_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Project_vue_vue_type_style_index_0_id_fde9769c_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  2548. /***/ }),
  2549. /***/ 227:
  2550. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2551. "use strict";
  2552. // ESM COMPAT FLAG
  2553. __webpack_require__.r(__webpack_exports__);
  2554. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/product/Quote.vue?vue&type=template&id=21f896fd&scoped=true
  2555. var render = function render() {
  2556. var _vm = this,
  2557. _c = _vm._self._c;
  2558. return _c('div', [_vm.quoteLoadState == 0 ? _c('div', {
  2559. directives: [{
  2560. name: "loading",
  2561. rawName: "v-loading",
  2562. value: true,
  2563. expression: "true"
  2564. }],
  2565. staticClass: "com-loading"
  2566. }) : _vm.quoteLoadState == 1 ? _vm._ssrNode("<div data-v-21f896fd>", "</div>", [_c('tab-nav', {
  2567. attrs: {
  2568. "borderType": 'allBorder',
  2569. "liWidth": 100,
  2570. "liHeight": 40,
  2571. "marginRight": 5,
  2572. "currTab": _vm.curWeek,
  2573. "tabList": _vm.priceList
  2574. },
  2575. on: {
  2576. "update:currTab": function ($event) {
  2577. _vm.curWeek = $event;
  2578. },
  2579. "update:curr-tab": function ($event) {
  2580. _vm.curWeek = $event;
  2581. }
  2582. }
  2583. }), _vm._ssrNode(" "), _vm._l(_vm.priceList, function (items, indexs) {
  2584. var _items$basePrice, _items$decoration, _items$basePrice2, _items$basePrice2$ite, _items$basePrice2$ite2, _items$basePrice3, _items$basePrice3$ite, _items$basePrice3$ite2;
  2585. return _vm._ssrNode("<div" + _vm._ssrStyle(null, null, {
  2586. display: _vm.curWeek == indexs ? '' : 'none'
  2587. }) + " data-v-21f896fd>", "</div>", [_vm._ssrNode("<div data-v-21f896fd>", "</div>", [_c('tab-nav', {
  2588. attrs: {
  2589. "borderType": 'incompleteBorder',
  2590. "currTab": items.curPrint,
  2591. "tabList": items.basePrice,
  2592. "allPrintTab": _vm.allPrintTab,
  2593. "marginTop": 0,
  2594. "marginRight": 5,
  2595. "marginBottom": ((_items$basePrice = items.basePrice) === null || _items$basePrice === void 0 ? void 0 : _items$basePrice.length) > 1 ? 7 : 0
  2596. },
  2597. on: {
  2598. "update:currTab": function ($event) {
  2599. return _vm.$set(items, "curPrint", $event);
  2600. },
  2601. "update:curr-tab": function ($event) {
  2602. return _vm.$set(items, "curPrint", $event);
  2603. },
  2604. "handle": function ($event) {
  2605. return _vm.sortBy(items);
  2606. }
  2607. }
  2608. })], 1), _vm._ssrNode(" "), _vm._l(items.basePrice, function (item, index) {
  2609. var _items$decorationOrig;
  2610. return _vm._ssrNode("<div" + _vm._ssrStyle(null, null, {
  2611. display: items.curPrint == index ? '' : 'none'
  2612. }) + " data-v-21f896fd>", "</div>", [_c('new-price-table', {
  2613. attrs: {
  2614. "tableColumns": [..._vm.undecorated_columns, ...item.part_columns],
  2615. "tableData": item.data,
  2616. "tableType": 'Undecorated',
  2617. "curPrint": item.name,
  2618. "curModel": (_items$decorationOrig = items.decorationOrign[index]) === null || _items$decorationOrig === void 0 ? void 0 : _items$decorationOrig.model,
  2619. "data": items,
  2620. "selectRow": item.selectBaseRow
  2621. },
  2622. on: {
  2623. "update:selectRow": function ($event) {
  2624. return _vm.$set(item, "selectBaseRow", $event);
  2625. },
  2626. "update:select-row": function ($event) {
  2627. return _vm.$set(item, "selectBaseRow", $event);
  2628. }
  2629. }
  2630. })], 1);
  2631. }), _vm._ssrNode(" "), (_items$decoration = items.decoration) !== null && _items$decoration !== void 0 && _items$decoration.length || (_items$basePrice2 = items.basePrice) !== null && _items$basePrice2 !== void 0 && (_items$basePrice2$ite = _items$basePrice2[items.curPrint]) !== null && _items$basePrice2$ite !== void 0 && (_items$basePrice2$ite2 = _items$basePrice2$ite.decoration_addition) !== null && _items$basePrice2$ite2 !== void 0 && _items$basePrice2$ite2.length ? _c('new-price-table', {
  2632. attrs: {
  2633. "tableData": items.decoration,
  2634. "tableColumns": [..._vm.decoration_columns, ..._vm.comCurBaseColumns],
  2635. "tableType": 'Decoration',
  2636. "marginBottom": 0,
  2637. "hasDecAdd": (_items$basePrice3 = items.basePrice) === null || _items$basePrice3 === void 0 ? void 0 : (_items$basePrice3$ite = _items$basePrice3[items.curPrint]) === null || _items$basePrice3$ite === void 0 ? void 0 : (_items$basePrice3$ite2 = _items$basePrice3$ite.decoration_addition) === null || _items$basePrice3$ite2 === void 0 ? void 0 : _items$basePrice3$ite2.length
  2638. }
  2639. }) : _vm._e(), _vm._ssrNode(" "), _vm._l(items.basePrice, function (item, index) {
  2640. return _vm._ssrNode("<div" + _vm._ssrStyle(null, null, {
  2641. display: items.curPrint == index && item.decoration_addition.length ? '' : 'none'
  2642. }) + " data-v-21f896fd>", "</div>", [_c('new-price-table', {
  2643. attrs: {
  2644. "tableData": item.decoration_addition,
  2645. "tableColumns": [..._vm.addon_columns, ...item.part_columns],
  2646. "isCheckBox": true,
  2647. "tableType": 'Addon',
  2648. "multipleSelection": items.selectAdditionRow
  2649. },
  2650. on: {
  2651. "update:multipleSelection": function ($event) {
  2652. return _vm.$set(items, "selectAdditionRow", $event);
  2653. },
  2654. "update:multiple-selection": function ($event) {
  2655. return _vm.$set(items, "selectAdditionRow", $event);
  2656. }
  2657. }
  2658. })], 1);
  2659. })], 2);
  2660. })], 2) : _vm._ssrNode("<div class=\"quote-tips\" data-v-21f896fd>\n Current item prices are missing, please contact<a href=\"mailto:Info@promocollection.uk\" data-v-21f896fd>\n info@promocollection.uk</a></div>"), _vm._ssrNode(" "), _c('no-ssr', [_vm.quoteLoadState == 1 ? _c('div', [_c('mail-table', {
  2661. directives: [{
  2662. name: "show",
  2663. rawName: "v-show",
  2664. value: false,
  2665. expression: "false"
  2666. }],
  2667. ref: "mailtable",
  2668. attrs: {
  2669. "mailData": _vm.mailData
  2670. }
  2671. }, [_c('price-to-img', {
  2672. attrs: {
  2673. "pageData": _vm.pageData,
  2674. "specificationsObj": _vm.specificationsObj,
  2675. "tableData": _vm.comFilterSwitchSellData,
  2676. "tableColumns": _vm.comMergeColumns,
  2677. "comLocationNum": _vm.comLocationNum,
  2678. "emailForm": _vm.commentObj
  2679. }
  2680. })], 1), _vm._v(" "), _c('el-dialog', {
  2681. ref: "dialogRef",
  2682. attrs: {
  2683. "lock-scroll": false,
  2684. "title": "Customer Quote",
  2685. "visible": _vm.priceToImgVisible,
  2686. "custom-class": "price-to-img-dialog"
  2687. },
  2688. on: {
  2689. "update:visible": function ($event) {
  2690. _vm.priceToImgVisible = $event;
  2691. }
  2692. }
  2693. }, [_c('price-to-img', {
  2694. ref: "priceToImgRef",
  2695. attrs: {
  2696. "isImgSrc": false,
  2697. "loading": _vm.pdfLoading,
  2698. "pageData": _vm.pageData,
  2699. "specificationsObj": _vm.specificationsObj,
  2700. "tableData": _vm.comFilterSwitchSellData,
  2701. "tableColumns": _vm.comMergeColumns,
  2702. "comLocationNum": _vm.comLocationNum,
  2703. "emailForm": _vm.commentObj
  2704. },
  2705. on: {
  2706. "update:loading": function ($event) {
  2707. _vm.pdfLoading = $event;
  2708. }
  2709. }
  2710. }), _vm._v(" "), _c('p', {
  2711. staticClass: "tips"
  2712. }, [_vm._v("Change default standard comment:")]), _vm._v(" "), _c('el-input', {
  2713. model: {
  2714. value: _vm.commentObj.Comments,
  2715. callback: function ($$v) {
  2716. _vm.$set(_vm.commentObj, "Comments", $$v);
  2717. },
  2718. expression: "commentObj.Comments"
  2719. }
  2720. }), _vm._v(" "), _c('div', {
  2721. staticClass: "btn-wrap"
  2722. }, [_c('el-button', {
  2723. staticClass: "button-black button-margin",
  2724. attrs: {
  2725. "size": "medium",
  2726. "loading": _vm.pdfLoading
  2727. },
  2728. on: {
  2729. "click": _vm.handleDownloadPdf
  2730. }
  2731. }, [_vm._v("Download")])], 1)], 1), _vm._v(" "), _c('price-to-img', {
  2732. directives: [{
  2733. name: "show",
  2734. rawName: "v-show",
  2735. value: false,
  2736. expression: "false"
  2737. }],
  2738. ref: "pdf",
  2739. attrs: {
  2740. "loading": _vm.pdfLoading,
  2741. "pageData": _vm.pageData,
  2742. "specificationsObj": _vm.specificationsObj,
  2743. "tableData": _vm.comFilterSwitchSellData,
  2744. "tableColumns": _vm.comMergeColumns,
  2745. "comLocationNum": _vm.comLocationNum,
  2746. "emailForm": _vm.commentObj
  2747. },
  2748. on: {
  2749. "update:loading": function ($event) {
  2750. _vm.pdfLoading = $event;
  2751. }
  2752. }
  2753. }), _vm._v(" "), _c('dialog-XX-success', {
  2754. attrs: {
  2755. "visible": _vm.xxContentVisible,
  2756. "imgType": false,
  2757. "content": 'This quantity is below the MOQ for this product'
  2758. },
  2759. on: {
  2760. "update:visible": function ($event) {
  2761. _vm.xxContentVisible = $event;
  2762. }
  2763. }
  2764. })], 1) : _vm._e()])], 2);
  2765. };
  2766. var staticRenderFns = [];
  2767. // CONCATENATED MODULE: ./components/product/Quote.vue?vue&type=template&id=21f896fd&scoped=true
  2768. // EXTERNAL MODULE: external "vuex"
  2769. var external_vuex_ = __webpack_require__(6);
  2770. // EXTERNAL MODULE: external "lodash"
  2771. var external_lodash_ = __webpack_require__(140);
  2772. var external_lodash_default = /*#__PURE__*/__webpack_require__.n(external_lodash_);
  2773. // EXTERNAL MODULE: external "number-precision"
  2774. var external_number_precision_ = __webpack_require__(121);
  2775. // EXTERNAL MODULE: ./components/table/NewPriceTable.vue + 4 modules
  2776. var NewPriceTable = __webpack_require__(200);
  2777. // EXTERNAL MODULE: ./components/table/TotalTable.vue + 4 modules
  2778. var TotalTable = __webpack_require__(201);
  2779. // EXTERNAL MODULE: ./components/table/UnitTable.vue + 4 modules
  2780. var UnitTable = __webpack_require__(202);
  2781. // EXTERNAL MODULE: ./components/table/MailTable.vue + 4 modules
  2782. var MailTable = __webpack_require__(203);
  2783. // EXTERNAL MODULE: ./components/DIalogXXSuccess.vue + 4 modules
  2784. var DIalogXXSuccess = __webpack_require__(30);
  2785. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/product/Quote.vue?vue&type=script&lang=js
  2786. /* harmony default export */ var Quotevue_type_script_lang_js = ({
  2787. components: {
  2788. NewPriceTable: NewPriceTable["default"],
  2789. TotalTable: TotalTable["default"],
  2790. UnitTable: UnitTable["default"],
  2791. MailTable: MailTable["default"],
  2792. 'dialog-XX-success': DIalogXXSuccess["default"]
  2793. },
  2794. props: {
  2795. pageData: {
  2796. type: Object,
  2797. default: () => {
  2798. return {};
  2799. }
  2800. },
  2801. id: {
  2802. type: Number,
  2803. default: null
  2804. }
  2805. },
  2806. data() {
  2807. return {
  2808. quoteLoadState: 0,
  2809. curWeek: 0,
  2810. allPrintTab: [],
  2811. priceList: [],
  2812. initZeroObj: {},
  2813. initSetupObj: {},
  2814. initUnitObj: {},
  2815. initChangeUnitObj: {},
  2816. initFrightObj: {},
  2817. initTotalObj: {},
  2818. xxContentVisible: false,
  2819. setup_switch: false,
  2820. freight_switch: false,
  2821. weight: {},
  2822. undecorated_columns: [{
  2823. label: 'MODEL',
  2824. prop: 'model',
  2825. type: 'text',
  2826. align: 'left',
  2827. width: 150,
  2828. extraWidth: 50,
  2829. // 配合组件 (820-tableColumns[0].width-tableColumns[0].extraWidth)/(tableColumns.length-1)
  2830. isFirstColumn: true // 去掉$符号
  2831. }, {
  2832. label: 'SETUP',
  2833. prop: 'website_setup'
  2834. }],
  2835. decoration_columns: [{
  2836. label: 'PRINT OPTION',
  2837. prop: 'dec_code',
  2838. type: 'radioInput',
  2839. align: 'left',
  2840. width: 150,
  2841. extraWidth: 50
  2842. }, {
  2843. label: 'SETUP',
  2844. prop: 'website_setup'
  2845. }],
  2846. addon_columns: [{
  2847. label: 'Addon',
  2848. prop: 'name',
  2849. type: 'text',
  2850. width: 150,
  2851. extraWidth: 50,
  2852. isFirstColumn: true // 去掉$符号
  2853. }, {
  2854. label: 'Setup',
  2855. prop: 'website_setup'
  2856. }],
  2857. buy_columns: [{
  2858. label: 'QTY',
  2859. prop: 'project',
  2860. isFirstColumn: true // 去掉$符号
  2861. }],
  2862. unit_columns: [{
  2863. label: 'QTY',
  2864. prop: 'total',
  2865. align: 'left',
  2866. isText: true
  2867. }],
  2868. buyData: [{
  2869. project: 'Setup'
  2870. }, {
  2871. project: 'Unit'
  2872. }, {
  2873. project: 'Freight'
  2874. }, {
  2875. project: 'Total'
  2876. }],
  2877. unitData: [{
  2878. total: 'Unit Rate %'
  2879. }, {
  2880. total: 'Setup %'
  2881. }, {
  2882. total: 'Freight %'
  2883. }],
  2884. sellData: [{
  2885. project: 'Postcode',
  2886. summary: '-'
  2887. }, {
  2888. project: 'Setup',
  2889. summary: 0.00
  2890. }, {
  2891. project: 'Unit',
  2892. summary: 0.00
  2893. }, {
  2894. project: 'Freight',
  2895. summary: 0.00
  2896. }, {
  2897. project: 'Total',
  2898. summary: 0.00
  2899. }],
  2900. POA_Config: ['111', '111.00', '999', '999.00'],
  2901. enquiryFormVisible: false,
  2902. enquiryForm: {
  2903. Name: '',
  2904. Email: '',
  2905. Phone: '',
  2906. 'Customer manager': null,
  2907. Comments: ''
  2908. },
  2909. enquiryConfig: [{
  2910. prop: 'Name',
  2911. type: 'input'
  2912. }, {
  2913. prop: 'Email',
  2914. type: 'input'
  2915. }, {
  2916. prop: 'Phone',
  2917. type: 'input'
  2918. }, {
  2919. prop: 'Customer manager',
  2920. type: 'select',
  2921. selectlist: [],
  2922. isShow: true
  2923. }, {
  2924. prop: 'Comments',
  2925. type: 'textarea'
  2926. }],
  2927. rules: {
  2928. Name: [{
  2929. required: true,
  2930. message: 'Please enter',
  2931. trigger: 'blur'
  2932. }],
  2933. Email: [{
  2934. required: true,
  2935. message: 'Please enter the correct format',
  2936. pattern: /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((.[a-zA-Z0-9_-]{2,3}){1,2})$/,
  2937. trigger: 'blur'
  2938. }],
  2939. Phone: [{
  2940. required: true,
  2941. message: 'Please enter the correct format',
  2942. // pattern: /^1[0-9]{10}$/,
  2943. trigger: 'blur'
  2944. }],
  2945. 'Customer manager': [{
  2946. required: true,
  2947. message: 'Please select',
  2948. trigger: 'change'
  2949. }]
  2950. },
  2951. mailData: {
  2952. Url: ''
  2953. },
  2954. priceToImgVisible: false,
  2955. downloadDialogVisible: false,
  2956. commentObj: {
  2957. 'Email Address': '',
  2958. Comments: ''
  2959. },
  2960. enquiryConfig1: [{
  2961. prop: 'Email Address',
  2962. type: 'input'
  2963. }, {
  2964. prop: 'Comments',
  2965. type: 'input'
  2966. }],
  2967. rules1: {
  2968. 'Email Address': [{
  2969. required: true,
  2970. message: 'Please enter the correct format',
  2971. pattern: /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((.[a-zA-Z0-9_-]{2,3}){1,2})$/,
  2972. trigger: 'blur'
  2973. }]
  2974. },
  2975. specificationsObj: {
  2976. time: null,
  2977. model: null,
  2978. decoration: null,
  2979. addonArr: null
  2980. },
  2981. pdfLoading: false
  2982. };
  2983. },
  2984. computed: {
  2985. ...Object(external_vuex_["mapState"])('config', {
  2986. configInfo: state => state.configInfo
  2987. }),
  2988. userInfo() {
  2989. return this.$store.state.userInfo;
  2990. },
  2991. comCurWeekPrice() {
  2992. return this.priceList[this.curWeek] || {};
  2993. },
  2994. comCurPrint() {
  2995. return this.comCurWeekPrice.curPrint;
  2996. },
  2997. comCurBasePrice() {
  2998. return this.comCurWeekPrice.basePrice[this.comCurPrint];
  2999. },
  3000. comLocationNum() {
  3001. return +this.comCurWeekPrice.basePrice[this.comCurPrint].locationNum;
  3002. },
  3003. comCurBaseColumns() {
  3004. return this.comCurBasePrice.part_columns;
  3005. },
  3006. comCurBaseTotalColumns() {
  3007. const d = this.comCurWeekPrice.basePrice[this.comCurPrint].total_part_columns;
  3008. const n = this.comLocationNum;
  3009. if (n === 1) {
  3010. return d;
  3011. } else {
  3012. const concatAdd = [...d, ...this.comCurWeekPrice.basePrice[this.comCurPrint].remainingAttr].slice(0, n);
  3013. return concatAdd;
  3014. }
  3015. },
  3016. comTotalLabel() {
  3017. // 计算所有元素label的和
  3018. return this.comCurBaseTotalColumns.reduce((sum, item) => sum + Number(item.label), 0);
  3019. },
  3020. comSummaryColumns() {
  3021. return [{
  3022. label: this.comTotalLabel.toString(),
  3023. prop: 'summary'
  3024. }];
  3025. },
  3026. comAttributeList() {
  3027. var _this$comCurBaseTotal;
  3028. const obj = {};
  3029. (_this$comCurBaseTotal = this.comCurBaseTotalColumns) === null || _this$comCurBaseTotal === void 0 ? void 0 : _this$comCurBaseTotal.forEach(item => {
  3030. obj[item.prop] = item.label;
  3031. });
  3032. obj.summary = this.comTotalLabel;
  3033. return obj;
  3034. },
  3035. // 当前已选基础价
  3036. comBasePrice() {
  3037. return this.comCurBasePrice.selectBaseRow;
  3038. },
  3039. // 当前累加打印价
  3040. comDecoPrice() {
  3041. var _this$comCurWeekPrice;
  3042. if (!((_this$comCurWeekPrice = this.comCurWeekPrice.decoration) !== null && _this$comCurWeekPrice !== void 0 && _this$comCurWeekPrice.length)) {
  3043. return [];
  3044. }
  3045. const arr = this.comCurWeekPrice.decoration.map((item, idx) => {
  3046. const obj = {};
  3047. if (+item.num > 0) {
  3048. for (const i in this.initUnitObj) {
  3049. if (idx === 0) {
  3050. // 首个打印价要取附加价计算
  3051. const keyArr = i.split('_');
  3052. const supplier_val = item[`supplier_${keyArr[1]}`];
  3053. if (this.POA_Config.includes(supplier_val)) {
  3054. obj[`${i}`] = supplier_val;
  3055. } else {
  3056. obj[`${i}`] = Object(external_number_precision_["times"])(+supplier_val, item.num);
  3057. }
  3058. } else {
  3059. obj[`${i}`] = this.POA_Config.includes(item[i]) ? item[i] : Object(external_number_precision_["times"])(+item[i], item.num);
  3060. }
  3061. }
  3062. }
  3063. return obj;
  3064. }).filter(obj => Object.keys(obj).length !== 0);
  3065. return arr;
  3066. },
  3067. comBuyData() {
  3068. this.calculateBuyData();
  3069. return this.buyData;
  3070. },
  3071. comNoSumCol() {
  3072. return [...this.buy_columns, ...this.comCurBaseTotalColumns];
  3073. },
  3074. comHasSumCol() {
  3075. return [...this.buy_columns, ...this.comCurBaseTotalColumns, ...this.comSummaryColumns];
  3076. },
  3077. comMergeColumns() {
  3078. return this.comLocationNum == 1 ? this.comNoSumCol : this.comHasSumCol;
  3079. },
  3080. comSellData() {
  3081. if (Object.keys(this.comAttributeList).length !== 0) {
  3082. this.calculateSellData();
  3083. }
  3084. return this.sellData;
  3085. },
  3086. comFilterSwitchSellData() {
  3087. var _this$comSellData;
  3088. return (_this$comSellData = this.comSellData) === null || _this$comSellData === void 0 ? void 0 : _this$comSellData.filter((item, i) => {
  3089. if (i === 1 && this.setup_switch) {
  3090. return false;
  3091. } else if (i === 3 && this.freight_switch) {
  3092. return false;
  3093. } else {
  3094. return item;
  3095. }
  3096. });
  3097. }
  3098. },
  3099. methods: {
  3100. ...Object(external_vuex_["mapActions"])(['getUserInfo']),
  3101. getQuote() {
  3102. this.$axios.post('/uk-api/quote/pricequote', {
  3103. id: this.id
  3104. }).then(res => {
  3105. if (localStorage.getItem('unit')) {
  3106. this.unitData = JSON.parse(localStorage.getItem('unit'));
  3107. }
  3108. const {
  3109. attributeList,
  3110. priceList,
  3111. default: defaultID
  3112. } = res.result;
  3113. if (!Object.keys(attributeList).length || !Object.keys(priceList).length) {
  3114. this.quoteLoadState = 2;
  3115. return;
  3116. }
  3117. for (const a in attributeList) {
  3118. // 过滤掉website_qty标签无数量
  3119. if (attributeList[a]) {
  3120. this.initZeroObj[a] = 0;
  3121. } else {
  3122. delete attributeList[a];
  3123. }
  3124. for (const unit of this.unitData) {
  3125. // 如果对象中缺少 attributeList 的 key,则设置为 40
  3126. if (!(a in unit) || unit[a] === '') {
  3127. this.$set(unit, a, 40);
  3128. }
  3129. }
  3130. }
  3131. // 格式化数据,对象改成数组
  3132. for (const keys in priceList) {
  3133. const vals = {};
  3134. const {
  3135. decoration,
  3136. additionlist,
  3137. ...remaining
  3138. } = priceList[keys];
  3139. vals.basePrice = [];
  3140. vals.selectAdditionRow = [];
  3141. vals.curPrint = 0;
  3142. vals.name = this.formatDurationString(keys);
  3143. vals.nameOrigin = keys;
  3144. vals.decorationOrign = [...decoration];
  3145. vals.decorationID = decoration.map(i => i.id);
  3146. vals.decoration = [...decoration].flatMap(item => {
  3147. const result = [];
  3148. if (item.max_color > 0) {
  3149. result.push({
  3150. ...item,
  3151. max_num: item.max_color,
  3152. id: `${item.id}-1`,
  3153. decName: item.max_color_name
  3154. });
  3155. }
  3156. if (item.max_point > 0) {
  3157. result.push({
  3158. ...item,
  3159. max_num: item.max_point,
  3160. id: `${item.id}-2`,
  3161. decName: item.max_point_name
  3162. });
  3163. }
  3164. return result;
  3165. });
  3166. vals.additionlist = additionlist;
  3167. for (const k in remaining) {
  3168. var _remaining$k, _remaining$k2;
  3169. const o = {};
  3170. o.attributeList = this.copyData(attributeList);
  3171. if (((_remaining$k = remaining[k]) === null || _remaining$k === void 0 ? void 0 : _remaining$k.length) > 1) {
  3172. // 检查数组中各元素的 website_qtyN 是否都等于 "-" or "POA",则删除key
  3173. for (const a in attributeList) {
  3174. const is111Poa = remaining[k].every(item => this.POA_Config.includes(item[a]));
  3175. if (is111Poa) {
  3176. delete o.attributeList[a];
  3177. }
  3178. }
  3179. } else if (((_remaining$k2 = remaining[k]) === null || _remaining$k2 === void 0 ? void 0 : _remaining$k2.length) === 1) {
  3180. // 判断 remaining[k][0] 中是否包含 vals.attributeList 的键,并且对应的值都等于 "-" or "POA",则不删除key
  3181. const obj = remaining[k][0];
  3182. const attributeKeys = Object.keys(o.attributeList);
  3183. const areAllKeysInPOAConfig = attributeKeys.every(key => {
  3184. return Object.prototype.hasOwnProperty.call(obj, key) && this.POA_Config.includes(obj[key]);
  3185. });
  3186. if (!areAllKeysInPOAConfig) {
  3187. attributeKeys.forEach(key => {
  3188. if (Object.prototype.hasOwnProperty.call(obj, key) && this.POA_Config.includes(obj[key])) {
  3189. delete o.attributeList[key];
  3190. }
  3191. });
  3192. }
  3193. }
  3194. o.name = k;
  3195. o.data = remaining[k];
  3196. o.locationNum = 1;
  3197. o.part_columns = Object.keys(o.attributeList).map(e => {
  3198. return {
  3199. label: o.attributeList[e].toString(),
  3200. prop: e
  3201. };
  3202. });
  3203. const freightParam = {
  3204. postcode: '',
  3205. freight_type: 1,
  3206. freight: {}
  3207. };
  3208. o.total_part_columns = this.copyData(o.part_columns).map(obj => ({
  3209. ...obj,
  3210. ...freightParam
  3211. }));
  3212. o.remainingAttr = [];
  3213. const firstColumns = {
  3214. ...o.part_columns[0],
  3215. ...freightParam
  3216. };
  3217. for (let i = 1; i < 9; i++) {
  3218. if (!Object.keys(o.attributeList).includes(`website_qty${i}`)) {
  3219. const newColumn = {
  3220. ...firstColumns
  3221. };
  3222. this.$set(newColumn, 'prop', `website_qty${i}`);
  3223. o.remainingAttr.push(newColumn);
  3224. }
  3225. }
  3226. ;
  3227. vals.basePrice.push(o);
  3228. if (!this.allPrintTab.includes(k)) {
  3229. this.allPrintTab.push(k);
  3230. }
  3231. }
  3232. this.priceList.push(vals);
  3233. }
  3234. this.priceList.forEach((options, index) => {
  3235. // 原始数据name没空格,需要映射到
  3236. if (options.nameOrigin === (defaultID === null || defaultID === void 0 ? void 0 : defaultID.name)) {
  3237. this.curWeek = index;
  3238. options.decorationOrign.forEach((opt, idx) => {
  3239. var _defaultID$decoration;
  3240. if (opt.id === (defaultID === null || defaultID === void 0 ? void 0 : (_defaultID$decoration = defaultID.decoration) === null || _defaultID$decoration === void 0 ? void 0 : _defaultID$decoration.id)) {
  3241. this.$set(options, 'curPrint', idx);
  3242. }
  3243. });
  3244. }
  3245. // 所有周期的所有打印,进来页面时默认勾选第一条价格
  3246. options.basePrice.forEach((opt, idx) => {
  3247. var _options$decorationOr, _options$decorationOr2;
  3248. this.$set(opt, 'selectBaseRow', opt.data[0] || {});
  3249. opt.decoration_addition = [...(((_options$decorationOr = options.decorationOrign) === null || _options$decorationOr === void 0 ? void 0 : (_options$decorationOr2 = _options$decorationOr[idx]) === null || _options$decorationOr2 === void 0 ? void 0 : _options$decorationOr2.decoration_addition) || []), ...(options.additionlist || [])];
  3250. });
  3251. options.decoration.forEach(opt => {
  3252. this.$set(opt, 'num', 0);
  3253. });
  3254. });
  3255. this.initSetupObj = Object.assign({}, this.initZeroObj);
  3256. this.initUnitObj = Object.assign({}, this.initZeroObj, {
  3257. website_setup: 0
  3258. });
  3259. this.initFrightObj = Object.assign({}, this.initZeroObj);
  3260. this.buyData = this.buyData.map(item => {
  3261. return {
  3262. ...item,
  3263. ...this.initSetupObj
  3264. };
  3265. });
  3266. this.sellData = this.sellData.map(item => {
  3267. return {
  3268. ...item,
  3269. ...this.initSetupObj
  3270. };
  3271. });
  3272. this.quoteLoadState = 1;
  3273. }).catch(e => {
  3274. console.log('this.quoteLoadState1: ', e);
  3275. this.quoteLoadState = 2;
  3276. });
  3277. },
  3278. formatDurationString(input) {
  3279. // 匹配数字和字符串的正则表达式
  3280. const regex = /(\d+)([a-zA-Z]+)/g;
  3281. const result = input.replace(regex, '$1 $2');
  3282. return result;
  3283. },
  3284. // getWeight() {
  3285. // this.$axios
  3286. // .post('/api/quote/weight', { id: this.id })
  3287. // .then(res => {
  3288. // this.weight = res.result
  3289. // })
  3290. // .catch(() => {})
  3291. // },
  3292. // getFreight(k) {
  3293. // const postcode = this.comCurBaseTotalColumns[k].postcode
  3294. // const type = this.comCurBaseTotalColumns[k].freight_type
  3295. // const init = { basic:0,pickup:0,minimum:0 }
  3296. // if (postcode.length < 3) {
  3297. // this.comCurBaseTotalColumns[k].freight = init
  3298. // return
  3299. // }
  3300. // this.$axios
  3301. // .post('/api/quote/freight', {
  3302. // postcode,
  3303. // type
  3304. // })
  3305. // .then(res => {
  3306. // this.comCurBaseTotalColumns[k].freight = Array.isArray(res.result)?init:res.result
  3307. // })
  3308. // },
  3309. getDebFreight: external_lodash_default.a.debounce(function (k) {
  3310. this.getFreight(k);
  3311. }, 200),
  3312. getNumber(e, row, min) {
  3313. if (parseInt(e.target.value) < min) {
  3314. this.xxContentVisible = true;
  3315. row.label = min;
  3316. } else {
  3317. this.xxContentVisible = false;
  3318. }
  3319. },
  3320. sortBy(items) {
  3321. // items.decoration.sort(this.customSort(items.decorationID))
  3322. // const targetElement = items.decoration.splice(items.curPrint, 1)[0]
  3323. // items.decoration.unshift(targetElement)
  3324. },
  3325. // 按原打印数组的id字段排序
  3326. customSort(decorationID) {
  3327. return (a, b) => {
  3328. return decorationID.indexOf(a.id) - decorationID.indexOf(b.id);
  3329. };
  3330. },
  3331. dividePrice(a) {
  3332. return Object(external_number_precision_["divide"])(+a, 100);
  3333. },
  3334. // openMailDialog() {
  3335. // if (this.$utils.checkLogin()) {
  3336. // this.getUserInfo()
  3337. // const { contacts, email, phone, crm_users_id:crmUsersId } = this.userInfo
  3338. // this.enquiryForm.Name = contacts
  3339. // this.enquiryForm.Email = email
  3340. // this.enquiryForm.Phone = phone
  3341. // if (crmUsersId?.length) {
  3342. // this.enquiryConfig[3].selectlist = crmUsersId
  3343. // if (crmUsersId?.length === 1) {
  3344. // this.enquiryForm['Customer manager'] = crmUsersId[0].name
  3345. // }
  3346. // } else {
  3347. // this.enquiryConfig[3].isShow = false
  3348. // this.$delete(this.enquiryForm, 'Customer manager')
  3349. // }
  3350. // this.enquiryFormVisible = true
  3351. // } else {
  3352. // this.openDialog()
  3353. // }
  3354. // },
  3355. getMailData() {
  3356. this.mailData.Url = window.location.href;
  3357. const {
  3358. Name,
  3359. Email,
  3360. Phone,
  3361. Comments
  3362. } = this.enquiryForm;
  3363. this.mailData['Customer Name'] = Name;
  3364. this.mailData['Customer Email'] = Email;
  3365. this.mailData['Customer Phone'] = Phone;
  3366. this.mailData.Comments = Comments;
  3367. const {
  3368. email,
  3369. level,
  3370. createTime
  3371. } = this.userInfo;
  3372. this.mailData['Member Account'] = email;
  3373. this.mailData['Member Grade'] = level.name;
  3374. this.mailData['Member Registration time'] = createTime;
  3375. this.mailData['Quote time'] = this.$utils.formatTime(new Date());
  3376. },
  3377. // 发送价格邮件 Enquiry按钮
  3378. // async sendPriceMail() {
  3379. // await this.getMailData()
  3380. // await this.getCustomerQuoteData()
  3381. // const {
  3382. // Name,
  3383. // Email,
  3384. // Phone,
  3385. // Comments,
  3386. // 'Customer manager': customerManager,
  3387. // } = this.enquiryForm
  3388. // this.$axios
  3389. // .post('/uk-api/quote/sendenquiry', {
  3390. // content: this.$refs.mailtable.$el.innerHTML,
  3391. // name: Name,
  3392. // email: Email,
  3393. // phone: Phone,
  3394. // customer_manager: customerManager || '',
  3395. // url: this.mailData.Url,
  3396. // product_code: this.pageData.product_code,
  3397. // comments: Comments,
  3398. // member_id: this.userInfo.id,
  3399. // })
  3400. // .then(res => {
  3401. // this.setLoading(false)
  3402. // this.enquiryFormVisible = false
  3403. // this.$confirm('Enquiry Sent', {
  3404. // confirmButtonText: 'OK',
  3405. // showCancelButton: false,
  3406. // type: 'success',
  3407. // center: true,
  3408. // showClose: false,
  3409. // confirmButtonClass: 'com-btnblack',
  3410. // }).then(() => {})
  3411. // })
  3412. // .catch(() => {
  3413. // this.setLoading(false)
  3414. // })
  3415. // },
  3416. // getCustomerQuoteData() {
  3417. // const { name, selectAdditionRow } = this.comCurWeekPrice
  3418. // this.specificationsObj.time = name
  3419. // this.specificationsObj.model = this.comBasePrice.model
  3420. // this.specificationsObj.decoration = this.comCurBasePrice.name
  3421. // if (selectAdditionRow.length) {
  3422. // this.specificationsObj.addonArr = selectAdditionRow.map(
  3423. // item => item.name
  3424. // )
  3425. // } else {
  3426. // this.specificationsObj.addonArr = null
  3427. // }
  3428. // },
  3429. // openDownloadDialog(type) {
  3430. // this.getCustomerQuoteData()
  3431. // type
  3432. // ? (this.downloadDialogVisible = true)
  3433. // : (this.priceToImgVisible = true)
  3434. // },
  3435. handleDownloadPdf() {
  3436. this.pdfLoading = true;
  3437. this.$nextTick(() => {
  3438. this.$refs.priceToImgRef.htmlToPdf(this.pageData.product_code);
  3439. });
  3440. },
  3441. // 发送PDF邮件
  3442. // sendPdfMail() {
  3443. // this.$axios
  3444. // .post('/api/quote/sendpdf', {
  3445. // content: this.$refs.pdf.$el.innerHTML,
  3446. // product_code: this.pageData.product_code,
  3447. // email: this.commentObj['Email Address'],
  3448. // })
  3449. // .then(res => {
  3450. // this.setLoading(false)
  3451. // this.downloadDialogVisible = false
  3452. // this.$confirm('Enquiry Sent', {
  3453. // confirmButtonText: 'OK',
  3454. // showCancelButton: false,
  3455. // type: 'success',
  3456. // center: true,
  3457. // showClose: false,
  3458. // confirmButtonClass: 'com-btnblack',
  3459. // })
  3460. // })
  3461. // .catch(() => {
  3462. // this.setLoading(false)
  3463. // })
  3464. // },
  3465. copyData(data) {
  3466. return JSON.parse(JSON.stringify(data));
  3467. },
  3468. calculateBuyData() {
  3469. const selPriceArr = [];
  3470. if (JSON.stringify(this.comBasePrice) !== '{}') {
  3471. selPriceArr.push(this.comBasePrice);
  3472. }
  3473. selPriceArr.push(...this.comDecoPrice, ...this.comCurWeekPrice.selectAdditionRow);
  3474. if (selPriceArr.length === 0) {
  3475. this.buyData = this.buyData.map(item => ({
  3476. ...item,
  3477. ...this.initZeroObj
  3478. }));
  3479. return;
  3480. }
  3481. // 累加所选,初始数量对应的单价。赋值给this.initUnitObj
  3482. for (const i in this.initUnitObj) {
  3483. const columnSum = this.copyData(selPriceArr).reduce(function (prev, cur) {
  3484. if (cur[i] === '111' || cur[i] === '111.00') {
  3485. return cur[i] = '-';
  3486. } else if (cur[i] === '999' || cur[i] === '999.00') {
  3487. return cur[i] = 'POA';
  3488. } else {
  3489. // 当基础价格是-POA,后续累加价格是正常数字价,依然返回-POA
  3490. if (prev === '-' || prev === 'POA') {
  3491. return prev;
  3492. }
  3493. return Object(external_number_precision_["plus"])(+cur[i], prev).toFixed(2);
  3494. }
  3495. }, 0);
  3496. this.$set(this.initUnitObj, i, columnSum);
  3497. }
  3498. for (const a in this.comAttributeList) {
  3499. // 每次更改选择价格,必须遍历整个comAttributeList
  3500. const tempIdx = this.comCurBaseColumns.findIndex(items => +this.comAttributeList[a] < +items.label);
  3501. if (tempIdx > 0) {
  3502. const key = this.comCurBaseColumns[tempIdx - 1].prop;
  3503. this.$set(this.initChangeUnitObj, a, this.initUnitObj[key]);
  3504. } else {
  3505. const length = this.comCurBaseColumns.length;
  3506. const key = this.comCurBaseColumns[length - 1].prop;
  3507. this.$set(this.initChangeUnitObj, a, this.initUnitObj[key]);
  3508. }
  3509. if (this.initChangeUnitObj[a] === 'POA' || this.initChangeUnitObj[a] === '-') {
  3510. this.$set(this.initSetupObj, a, this.initChangeUnitObj[a]);
  3511. this.$set(this.initFrightObj, a, this.initChangeUnitObj[a]);
  3512. } else {
  3513. this.$set(this.initSetupObj, a, this.initUnitObj.website_setup);
  3514. // 计算运费
  3515. // 单独批次数量的总重
  3516. // weight定义是{},后端没数据传回[]
  3517. const unitWLocal = this.weight.unit_w_local ? +this.weight.unit_w_local : 0;
  3518. const totalWeight = Math.ceil(Object(external_number_precision_["times"])(unitWLocal, this.comAttributeList[a]));
  3519. // Road express 1 AAE:AAEFactor 2
  3520. const setupFuel = this.dividePrice(this.configInfo.fuel);
  3521. const setupBagFreight = this.dividePrice(this.configInfo.bag_freight);
  3522. const setupExpressFreight = this.dividePrice(this.configInfo.express_freight);
  3523. const AAEFactor = Object(external_number_precision_["plus"])(1, setupBagFreight, setupFuel);
  3524. const expressFactor = Object(external_number_precision_["plus"])(1, setupExpressFreight, setupFuel);
  3525. let frightCost = 0;
  3526. let freightType;
  3527. let postcode;
  3528. let freight = {};
  3529. const matchIndex = this.comCurBaseTotalColumns.findIndex(item => item.prop === a);
  3530. // 1,所有按第一个运费统计;不为1,则只计算 comCurBaseTotalColumns的[地址数]长度
  3531. if (+this.comLocationNum === 1 || this.comLocationNum >= matchIndex + 1) {
  3532. ({
  3533. freight,
  3534. freight_type: freightType,
  3535. postcode
  3536. } = this.comCurBaseTotalColumns[+this.comLocationNum === 1 ? 0 : matchIndex] || {});
  3537. }
  3538. if (freightType === 1 && postcode >= 3) {
  3539. if (totalWeight > 20) {
  3540. const a1 = Object(external_number_precision_["minus"])(totalWeight, 20);
  3541. const a2 = Object(external_number_precision_["times"])(a1, +freight.basic);
  3542. const a3 = Object(external_number_precision_["plus"])(+freight.pickup, a2);
  3543. frightCost = Object(external_number_precision_["times"])(a3, expressFactor);
  3544. } else {
  3545. frightCost = Object(external_number_precision_["times"])(+freight.pickup, expressFactor);
  3546. }
  3547. } else if (freightType === 2 && postcode >= 3) {
  3548. const a1 = Object(external_number_precision_["divide"])(totalWeight, 5);
  3549. const a2 = Object(external_number_precision_["times"])(+freight.minimum, Math.ceil(a1));
  3550. frightCost = Object(external_number_precision_["times"])(a2, AAEFactor);
  3551. } else {
  3552. frightCost = 0;
  3553. }
  3554. this.$set(this.initFrightObj, a, Math.ceil(frightCost).toFixed(2));
  3555. }
  3556. if (this.initChangeUnitObj[a] === '-' || this.initChangeUnitObj[a] === 'POA') {
  3557. this.$set(this.initTotalObj, a, this.initChangeUnitObj[a]);
  3558. } else {
  3559. const unitQTY = Object(external_number_precision_["times"])(this.initChangeUnitObj[a], this.comAttributeList[a]);
  3560. this.$set(this.initTotalObj, a, Object(external_number_precision_["plus"])(this.initUnitObj.website_setup, unitQTY, this.initFrightObj[a]).toFixed(2));
  3561. }
  3562. if (this.setup_switch) {
  3563. // 业务:Setup价格/对应数量后向上取整
  3564. if (this.initChangeUnitObj[a] === '-' || this.initChangeUnitObj[a] === 'POA') {
  3565. this.$set(this.initChangeUnitObj, a, this.initChangeUnitObj[a]);
  3566. } else {
  3567. const num = Math.ceil(this.initSetupObj[a] / this.comAttributeList[a] * 100) / 100;
  3568. this.$set(this.initChangeUnitObj, a, Object(external_number_precision_["plus"])(this.initChangeUnitObj[a], num).toFixed(2));
  3569. }
  3570. }
  3571. if (this.freight_switch) {
  3572. if (this.initChangeUnitObj[a] === '-' || this.initChangeUnitObj[a] === 'POA') {
  3573. this.$set(this.initChangeUnitObj, a, this.initChangeUnitObj[a]);
  3574. } else {
  3575. const num = Math.ceil(this.initFrightObj[a] / this.comAttributeList[a] * 100) / 100;
  3576. this.$set(this.initChangeUnitObj, a, Object(external_number_precision_["plus"])(this.initChangeUnitObj[a], num).toFixed(2));
  3577. }
  3578. }
  3579. }
  3580. if (this.setup_switch) {
  3581. this.$set(this.buyData, 0, {
  3582. ...this.buyData[0],
  3583. ...this.initZeroObj,
  3584. ...{
  3585. 'summary': 0.00
  3586. }
  3587. });
  3588. } else {
  3589. this.$set(this.buyData, 0, {
  3590. ...this.buyData[0],
  3591. ...this.initSetupObj
  3592. });
  3593. }
  3594. this.$set(this.buyData, 1, {
  3595. ...this.buyData[1],
  3596. ...this.initChangeUnitObj
  3597. });
  3598. if (this.freight_switch) {
  3599. this.$set(this.buyData, 2, {
  3600. ...this.buyData[2],
  3601. ...this.initZeroObj
  3602. });
  3603. } else {
  3604. this.$set(this.buyData, 2, {
  3605. ...this.buyData[2],
  3606. ...this.initFrightObj
  3607. });
  3608. }
  3609. this.$set(this.buyData, 3, {
  3610. ...this.buyData[3],
  3611. ...this.initTotalObj
  3612. });
  3613. },
  3614. calculateSellData() {
  3615. // 放置comSellData计算和副作用的代码
  3616. const buySetup = this.comBuyData[0];
  3617. const buyUnit = this.comBuyData[1];
  3618. const buyFright = this.comBuyData[2];
  3619. let frightSummary = 0;
  3620. for (const i in this.comAttributeList) {
  3621. if (buyUnit[i] === '-' || buyUnit[i] === 'POA') {
  3622. this.sellData[0][i] = '-';
  3623. this.sellData[1][i] = buyUnit[i];
  3624. this.sellData[2][i] = buyUnit[i];
  3625. this.sellData[3][i] = buyUnit[i];
  3626. this.sellData[4][i] = buyUnit[i];
  3627. } else {
  3628. var _this$comCurBaseTotal2;
  3629. const item = this.comLocationNum === 1 ? this.comCurBaseTotalColumns[0] : this.comCurBaseTotalColumns.find(element => element.prop === i);
  3630. this.sellData[0][i] = item && item.postcode !== '' ? item.postcode : '-';
  3631. // 分别乘以Markup %表格
  3632. const key = (_this$comCurBaseTotal2 = this.comCurBaseTotalColumns[0]) === null || _this$comCurBaseTotal2 === void 0 ? void 0 : _this$comCurBaseTotal2.prop;
  3633. if (this.unitData[1] && this.unitData[1][key]) {
  3634. const a = Object(external_number_precision_["plus"])(this.unitData[1][key] / 100, 1);
  3635. this.sellData[1][i] = Object(external_number_precision_["times"])(buySetup[i], a).toFixed(2);
  3636. } else {
  3637. this.sellData[1][i] = buySetup[i];
  3638. }
  3639. if (this.unitData[0][i]) {
  3640. const a = Object(external_number_precision_["plus"])(this.unitData[0][i] / 100, 1);
  3641. this.sellData[2][i] = Object(external_number_precision_["times"])(buyUnit[i], a).toFixed(2);
  3642. } else {
  3643. this.sellData[2][i] = buyUnit[i];
  3644. }
  3645. if (this.unitData[2] && this.unitData[2][key]) {
  3646. const a = Object(external_number_precision_["plus"])(this.unitData[2][key] / 100, 1);
  3647. this.sellData[3][i] = Object(external_number_precision_["times"])(buyFright[i], a).toFixed(2);
  3648. // freight_switch会使qty的运费=0无法计算,故用了initFrightObj
  3649. const fa = Object(external_number_precision_["times"])(this.initFrightObj[i], a);
  3650. frightSummary = Object(external_number_precision_["plus"])(frightSummary, fa).toFixed(2);
  3651. } else {
  3652. this.sellData[3][i] = buyFright[i];
  3653. frightSummary = Object(external_number_precision_["plus"])(frightSummary, this.initFrightObj[i]).toFixed(2);
  3654. }
  3655. const unitQTY = Object(external_number_precision_["times"])(this.sellData[2][i], this.comAttributeList[i]);
  3656. this.$set(this.sellData[4], i, Object(external_number_precision_["plus"])(this.sellData[1][i], unitQTY, this.sellData[3][i]).toFixed(2));
  3657. }
  3658. }
  3659. // 迭代加了Total列,需要统计qty的运费后才能合计运费
  3660. if (this.sellData[2].summary !== '-' && this.sellData[2].summary !== 'POA') {
  3661. if (this.freight_switch) {
  3662. const num = Math.ceil(frightSummary / this.comAttributeList.summary * 100) / 100;
  3663. this.sellData[2].summary = Object(external_number_precision_["plus"])(this.sellData[2].summary, num).toFixed(2);
  3664. this.sellData[3].summary = 0.00;
  3665. const a = Object(external_number_precision_["times"])(this.sellData[2].summary, this.comAttributeList.summary);
  3666. this.sellData[4].summary = Object(external_number_precision_["plus"])(this.sellData[1].summary, a).toFixed(2);
  3667. } else {
  3668. this.sellData[3].summary = frightSummary;
  3669. this.sellData[4].summary = Object(external_number_precision_["plus"])(frightSummary, this.sellData[4].summary).toFixed(2);
  3670. }
  3671. }
  3672. },
  3673. // 低于最小起订量 把该栏的数值重置到最小起订量
  3674. getChildIdx(idx) {
  3675. var _this$comCurBaseColum;
  3676. this.xxContentVisible = true;
  3677. this.$set(this.comCurBaseTotalColumns[idx - 1], 'label', (_this$comCurBaseColum = this.comCurBaseColumns[0]) === null || _this$comCurBaseColum === void 0 ? void 0 : _this$comCurBaseColum.label);
  3678. },
  3679. setMaxNum(val) {
  3680. if (val > 7) {
  3681. this.comCurBasePrice.locationNum = 7;
  3682. } else if (val < 1) {
  3683. this.comCurBasePrice.locationNum = 1;
  3684. }
  3685. },
  3686. ...Object(external_vuex_["mapMutations"])({
  3687. openDialog: 'openDialog',
  3688. setLoading: 'product/setLoading'
  3689. })
  3690. }
  3691. });
  3692. // CONCATENATED MODULE: ./components/product/Quote.vue?vue&type=script&lang=js
  3693. /* harmony default export */ var product_Quotevue_type_script_lang_js = (Quotevue_type_script_lang_js);
  3694. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  3695. var componentNormalizer = __webpack_require__(2);
  3696. // CONCATENATED MODULE: ./components/product/Quote.vue
  3697. function injectStyles (context) {
  3698. var style0 = __webpack_require__(217)
  3699. if (style0.__inject__) style0.__inject__(context)
  3700. }
  3701. /* normalize component */
  3702. var component = Object(componentNormalizer["a" /* default */])(
  3703. product_Quotevue_type_script_lang_js,
  3704. render,
  3705. staticRenderFns,
  3706. false,
  3707. injectStyles,
  3708. "21f896fd",
  3709. "3f1d0f1e"
  3710. )
  3711. /* harmony default export */ var Quote = __webpack_exports__["default"] = (component.exports);
  3712. /* nuxt-component-imports */
  3713. installComponents(component, {TabNav: __webpack_require__(184).default,PriceToImg: __webpack_require__(204).default})
  3714. /***/ }),
  3715. /***/ 228:
  3716. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3717. "use strict";
  3718. // ESM COMPAT FLAG
  3719. __webpack_require__.r(__webpack_exports__);
  3720. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/table/StockTable.vue?vue&type=template&id=13093327&scoped=true
  3721. var render = function render() {
  3722. var _vm = this,
  3723. _c = _vm._self._c;
  3724. return _c('table', [_vm._ssrNode("<tbody data-v-13093327><tr class=\"title\" data-v-13093327><th rowspan=\"2\" data-v-13093327>Model</th> <th rowspan=\"2\" data-v-13093327>Available stock</th> <th colspan=\"2\" data-v-13093327>Next shipment</th></tr> <tr data-v-13093327><th data-v-13093327>Date</th> <th data-v-13093327>QTY</th></tr> " + (_vm.comData.length ? _vm._ssrList(_vm.comData, function (items, key) {
  3725. return "<tr data-v-13093327><td data-v-13093327>" + _vm._ssrEscape(_vm._s(items.sku_model || items.point)) + "</td> <td data-v-13093327>" + _vm._ssrEscape(_vm._s(items.available_stock)) + "</td> <td data-v-13093327>" + _vm._ssrEscape(_vm._s(_vm.$utils.formatTime(items.next_times, 'DD-MM-YYYY', true))) + "</td> <td data-v-13093327>" + _vm._ssrEscape(_vm._s(items.arrival_stock)) + "</td></tr>";
  3726. }) : "<tr data-v-13093327><td rowspan=\"3\" colspan=\"4\" data-v-13093327>No Data</td></tr>") + "</tbody>")]);
  3727. };
  3728. var staticRenderFns = [];
  3729. // CONCATENATED MODULE: ./components/table/StockTable.vue?vue&type=template&id=13093327&scoped=true
  3730. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/table/StockTable.vue?vue&type=script&lang=js
  3731. /* harmony default export */ var StockTablevue_type_script_lang_js = ({
  3732. props: {
  3733. data: []
  3734. },
  3735. computed: {
  3736. comData() {
  3737. return this.data.filter(item => item.is_show);
  3738. }
  3739. }
  3740. });
  3741. // CONCATENATED MODULE: ./components/table/StockTable.vue?vue&type=script&lang=js
  3742. /* harmony default export */ var table_StockTablevue_type_script_lang_js = (StockTablevue_type_script_lang_js);
  3743. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  3744. var componentNormalizer = __webpack_require__(2);
  3745. // CONCATENATED MODULE: ./components/table/StockTable.vue
  3746. function injectStyles (context) {
  3747. var style0 = __webpack_require__(218)
  3748. if (style0.__inject__) style0.__inject__(context)
  3749. }
  3750. /* normalize component */
  3751. var component = Object(componentNormalizer["a" /* default */])(
  3752. table_StockTablevue_type_script_lang_js,
  3753. render,
  3754. staticRenderFns,
  3755. false,
  3756. injectStyles,
  3757. "13093327",
  3758. "0b092fe7"
  3759. )
  3760. /* harmony default export */ var StockTable = __webpack_exports__["default"] = (component.exports);
  3761. /***/ }),
  3762. /***/ 229:
  3763. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3764. "use strict";
  3765. // ESM COMPAT FLAG
  3766. __webpack_require__.r(__webpack_exports__);
  3767. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/table/ChangeTable.vue?vue&type=template&id=4c957f55&scoped=true
  3768. var render = function render() {
  3769. var _vm = this,
  3770. _c = _vm._self._c;
  3771. return _c('div', [_vm.data.length ? _vm._ssrNode("<table data-v-4c957f55>", "</table>", [_vm._ssrNode("<tbody data-v-4c957f55><tr class=\"title\" data-v-4c957f55><th width=\"25%\" data-v-4c957f55>Date</th> <th width=\"25%\" data-v-4c957f55>Change Type</th> <th width=\"50%\" data-v-4c957f55>Details</th></tr> " + _vm._ssrList(_vm.data, function (items, key) {
  3772. return "<tr data-v-4c957f55><td data-v-4c957f55>" + _vm._ssrEscape(_vm._s(_vm.$utils.formatTime(items.update_time))) + "</td> <td data-v-4c957f55>" + _vm._ssrEscape(_vm._s(items.type_name)) + "</td> <td data-v-4c957f55>" + _vm._ssrEscape(_vm._s(items.detail)) + "</td></tr>";
  3773. }) + "</tbody>")], 2) : _vm._ssrNode("<div data-v-4c957f55>", "</div>", [_c('el-empty', {
  3774. attrs: {
  3775. "description": "No Data"
  3776. }
  3777. })], 1)]);
  3778. };
  3779. var staticRenderFns = [];
  3780. // CONCATENATED MODULE: ./components/table/ChangeTable.vue?vue&type=template&id=4c957f55&scoped=true
  3781. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/table/ChangeTable.vue?vue&type=script&lang=js
  3782. /* harmony default export */ var ChangeTablevue_type_script_lang_js = ({
  3783. props: {
  3784. data: {
  3785. type: Array,
  3786. default: () => []
  3787. }
  3788. }
  3789. });
  3790. // CONCATENATED MODULE: ./components/table/ChangeTable.vue?vue&type=script&lang=js
  3791. /* harmony default export */ var table_ChangeTablevue_type_script_lang_js = (ChangeTablevue_type_script_lang_js);
  3792. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  3793. var componentNormalizer = __webpack_require__(2);
  3794. // CONCATENATED MODULE: ./components/table/ChangeTable.vue
  3795. function injectStyles (context) {
  3796. var style0 = __webpack_require__(219)
  3797. if (style0.__inject__) style0.__inject__(context)
  3798. }
  3799. /* normalize component */
  3800. var component = Object(componentNormalizer["a" /* default */])(
  3801. table_ChangeTablevue_type_script_lang_js,
  3802. render,
  3803. staticRenderFns,
  3804. false,
  3805. injectStyles,
  3806. "4c957f55",
  3807. "5f45517f"
  3808. )
  3809. /* harmony default export */ var ChangeTable = __webpack_exports__["default"] = (component.exports);
  3810. /***/ }),
  3811. /***/ 230:
  3812. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3813. "use strict";
  3814. // ESM COMPAT FLAG
  3815. __webpack_require__.r(__webpack_exports__);
  3816. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/Project.vue?vue&type=template&id=fde9769c&scoped=true
  3817. var render = function render() {
  3818. var _vm$productInfo$recor, _vm$recordData;
  3819. var _vm = this,
  3820. _c = _vm._self._c;
  3821. return _c('section', {
  3822. staticClass: "project-wrap"
  3823. }, [_vm._ssrNode("<div class=\"project\" data-v-fde9769c><div class=\"flex btn-nav\"" + _vm._ssrStyle(null, null, {
  3824. display: false ? undefined : 'none'
  3825. }) + " data-v-fde9769c><img" + _vm._ssrAttr("src", __webpack_require__(221)) + " data-v-fde9769c><span data-v-fde9769c>Product builder</span></div> " + (_vm.isLogin && /\@promocollection(.com.au|uk)/.test(_vm.userInfo.email) ? "<a href=\"https://zfrmz.com/2IuJGuGLCRBROyJXZetQ\" target=\"_target\" data-v-fde9769c><div class=\"flex btn-nav\" data-v-fde9769c><img" + _vm._ssrAttr("src", __webpack_require__(180)) + " data-v-fde9769c><span data-v-fde9769c>Ticket</span></div></a>" : "<!---->") + " <a id=\"quickEnqriryLink\" target=\"_blank\" data-v-fde9769c>" + (_vm.isLogin ? "<div class=\"flex btn-nav\" data-v-fde9769c><img" + _vm._ssrAttr("src", __webpack_require__(222)) + " alt style=\"opacity: 0.8\" data-v-fde9769c><span data-v-fde9769c>Quick Enquiry</span></div>" : "<!---->") + "</a> <a target=\"_blank\"" + _vm._ssrAttr("href", _vm.shouldButtonRecordDisabled ? 'javascript:void(0)' : `/product-record/${_vm.productInfo.product_code}?version=${((_vm$productInfo$recor = _vm.productInfo.record) === null || _vm$productInfo$recor === void 0 ? void 0 : _vm$productInfo$recor.version) || ((_vm$recordData = _vm.recordData) === null || _vm$recordData === void 0 ? void 0 : _vm$recordData.version)}`) + _vm._ssrStyle(null, null, {
  3826. display: _vm.btnShow ? '' : 'none'
  3827. }) + " data-v-fde9769c><div" + _vm._ssrClass("flex btn-nav", {
  3828. disabled: _vm.shouldButtonRecordDisabled
  3829. }) + " data-v-fde9769c><img" + _vm._ssrAttr("src", __webpack_require__(180)) + " data-v-fde9769c><span data-v-fde9769c>Item Record</span></div></a></div>")]);
  3830. };
  3831. var staticRenderFns = [];
  3832. // CONCATENATED MODULE: ./components/Project.vue?vue&type=template&id=fde9769c&scoped=true
  3833. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/Project.vue?vue&type=script&lang=js
  3834. /* harmony default export */ var Projectvue_type_script_lang_js = ({
  3835. props: {
  3836. productInfo: {
  3837. type: Object,
  3838. default: () => {
  3839. return {};
  3840. }
  3841. }
  3842. },
  3843. data() {
  3844. return {
  3845. defaultURL: 'https://zfrmz.com/2IuJGuGLCRBROyJXZetQ',
  3846. recordData: null
  3847. };
  3848. },
  3849. computed: {
  3850. isLogin() {
  3851. var _this$$store$state$us;
  3852. return !!((_this$$store$state$us = this.$store.state.userInfo) !== null && _this$$store$state$us !== void 0 && _this$$store$state$us.email);
  3853. },
  3854. userInfo() {
  3855. return this.$store.state.userInfo || {};
  3856. },
  3857. btnShow() {
  3858. return this.isLogin && /@promocollection(.com.au|.uk)/.test(this.userInfo.email);
  3859. },
  3860. shouldButtonRecordDisabled() {
  3861. var _this$productInfo$rec, _this$productInfo$rec2, _this$recordData, _this$recordData$reco;
  3862. if (this.productInfo.record && (_this$productInfo$rec = this.productInfo.record) !== null && _this$productInfo$rec !== void 0 && (_this$productInfo$rec2 = _this$productInfo$rec.record_reason) !== null && _this$productInfo$rec2 !== void 0 && _this$productInfo$rec2.length) {
  3863. return false;
  3864. }
  3865. return !((_this$recordData = this.recordData) !== null && _this$recordData !== void 0 && (_this$recordData$reco = _this$recordData.record_reason) !== null && _this$recordData$reco !== void 0 && _this$recordData$reco.length);
  3866. }
  3867. },
  3868. watch: {
  3869. isLogin: {
  3870. handler(newVal, oldVal) {
  3871. if (newVal && newVal !== oldVal) {
  3872. this.$axios.get(`/uk-api/uk/goods/detail?product_code=${this.productInfo.product_code}`).then(res => {
  3873. if (res.code === 1) {
  3874. this.recordData = res.result.record;
  3875. }
  3876. });
  3877. }
  3878. }
  3879. }
  3880. },
  3881. mounted() {
  3882. this.generateLink();
  3883. },
  3884. methods: {
  3885. generateLink() {
  3886. const target = document.getElementById('quickEnqriryLink');
  3887. const config = {
  3888. name: this.userInfo.contacts,
  3889. phone: this.userInfo.phone,
  3890. email: this.userInfo.email,
  3891. company: this.userInfo.company,
  3892. product: `${this.productInfo.product_name} & ${this.productInfo.product_code}`
  3893. };
  3894. let query = '';
  3895. for (const key in config) {
  3896. if (config[key]) {
  3897. query += `&${key}=${encodeURIComponent(config[key])}`;
  3898. }
  3899. }
  3900. query = query.slice(1);
  3901. target.href = this.defaultURL + '?' + query;
  3902. },
  3903. handleAdd() {
  3904. this.$emit('handleAdd');
  3905. },
  3906. openZoho() {
  3907. document.querySelector('#zsiq_float').click();
  3908. },
  3909. toProductBuilder() {
  3910. if (!this.$utils.checkLogin()) return;
  3911. this.$emit('save-selected-data');
  3912. setTimeout(() => {
  3913. location.href = location.origin + `/product-builder/${this.$route.params.code}`;
  3914. }, 0);
  3915. }
  3916. }
  3917. });
  3918. // CONCATENATED MODULE: ./components/Project.vue?vue&type=script&lang=js
  3919. /* harmony default export */ var components_Projectvue_type_script_lang_js = (Projectvue_type_script_lang_js);
  3920. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  3921. var componentNormalizer = __webpack_require__(2);
  3922. // CONCATENATED MODULE: ./components/Project.vue
  3923. function injectStyles (context) {
  3924. var style0 = __webpack_require__(223)
  3925. if (style0.__inject__) style0.__inject__(context)
  3926. }
  3927. /* normalize component */
  3928. var component = Object(componentNormalizer["a" /* default */])(
  3929. components_Projectvue_type_script_lang_js,
  3930. render,
  3931. staticRenderFns,
  3932. false,
  3933. injectStyles,
  3934. "fde9769c",
  3935. "010c4c4a"
  3936. )
  3937. /* harmony default export */ var Project = __webpack_exports__["default"] = (component.exports);
  3938. /***/ }),
  3939. /***/ 241:
  3940. /***/ (function(module, exports, __webpack_require__) {
  3941. module.exports = __webpack_require__.p + "img/lineart.e4e693b.png";
  3942. /***/ }),
  3943. /***/ 242:
  3944. /***/ (function(module, exports, __webpack_require__) {
  3945. module.exports = __webpack_require__.p + "img/email.0ff3d63.png";
  3946. /***/ }),
  3947. /***/ 243:
  3948. /***/ (function(module, exports, __webpack_require__) {
  3949. module.exports = __webpack_require__.p + "img/product.718b8f1.png";
  3950. /***/ }),
  3951. /***/ 244:
  3952. /***/ (function(module, exports, __webpack_require__) {
  3953. module.exports = __webpack_require__.p + "img/cataloque.c0a544f.png";
  3954. /***/ }),
  3955. /***/ 245:
  3956. /***/ (function(module, exports, __webpack_require__) {
  3957. module.exports = __webpack_require__.p + "img/instruction.bbe58af.png";
  3958. /***/ }),
  3959. /***/ 246:
  3960. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3961. "use strict";
  3962. __webpack_require__.r(__webpack_exports__);
  3963. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductRight_vue_vue_type_style_index_0_id_2188ece4_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(220);
  3964. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductRight_vue_vue_type_style_index_0_id_2188ece4_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductRight_vue_vue_type_style_index_0_id_2188ece4_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
  3965. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductRight_vue_vue_type_style_index_0_id_2188ece4_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductRight_vue_vue_type_style_index_0_id_2188ece4_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  3966. /***/ }),
  3967. /***/ 299:
  3968. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3969. "use strict";
  3970. // ESM COMPAT FLAG
  3971. __webpack_require__.r(__webpack_exports__);
  3972. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/product/ProductRight.vue?vue&type=template&id=2188ece4&scoped=true
  3973. var render = function render() {
  3974. var _vm$pageData$main$ima, _vm$pageData$main, _vm$pageData$main2, _vm$productImgArr, _vm$pageData$goodsCom;
  3975. var _vm = this,
  3976. _c = _vm._self._c;
  3977. return _c('div', {
  3978. staticClass: "product-right"
  3979. }, [_vm._ssrNode("<div class=\"product-right-top\" data-v-2188ece4>", "</div>", [_vm._ssrNode("<div class=\"title\" data-v-2188ece4><span class=\"title-1\" data-v-2188ece4>" + _vm._ssrEscape(_vm._s(_vm.pageData.product_name)) + "</span> <span class=\"title-2\" data-v-2188ece4>" + _vm._ssrEscape(_vm._s(_vm.pageData.product_code)) + "</span> " + _vm._ssrList(_vm.pageData.cycle, function (item) {
  3980. return "<img" + _vm._ssrAttr("src", item.images) + " class=\"title-3\" data-v-2188ece4>";
  3981. }) + " " + _vm._ssrList(_vm.pageData.icon, function (item) {
  3982. return "<img" + _vm._ssrAttr("src", item.url) + " class=\"title-4\" data-v-2188ece4>";
  3983. }) + "</div> "), (_vm$pageData$main$ima = _vm.pageData.main.image_color) !== null && _vm$pageData$main$ima !== void 0 && _vm$pageData$main$ima.length ? _vm._ssrNode("<ul class=\"color\" data-v-2188ece4>", "</ul>", _vm._l(_vm.pageData.main.image_color, function (item, i) {
  3984. var _item$color, _item$color2, _item$color3, _item$color4, _item$color5, _item$color6;
  3985. return _vm._ssrNode("<li data-v-2188ece4>", "</li>", [(_item$color = item.color) !== null && _item$color !== void 0 && _item$color.img ? _vm._ssrNode("<div class=\"color-item\" data-v-2188ece4>", "</div>", [_vm._ssrNode("<div" + _vm._ssrClass(null, _vm.currentPre == _vm.computedIndex(i) ? 'slip' : '') + " data-v-2188ece4>", "</div>", [_c('el-tooltip', {
  3986. attrs: {
  3987. "content": (_item$color2 = item.color) === null || _item$color2 === void 0 ? void 0 : _item$color2.name,
  3988. "placement": "top",
  3989. "effect": "dark"
  3990. }
  3991. }, [_c('img', {
  3992. attrs: {
  3993. "src": (_item$color3 = item.color) !== null && _item$color3 !== void 0 && _item$color3.img && !_vm.$mediaRegExp.test((_item$color4 = item.color) === null || _item$color4 === void 0 ? void 0 : _item$color4.img) ? _vm.$OSS_PREFIX + ((_item$color5 = item.color) === null || _item$color5 === void 0 ? void 0 : _item$color5.img) : (_item$color6 = item.color) === null || _item$color6 === void 0 ? void 0 : _item$color6.img
  3994. }
  3995. })])], 1)]) : _vm._e()]);
  3996. }), 0) : _vm._e(), _vm._ssrNode(" "), _c('tab-nav', {
  3997. attrs: {
  3998. "tabList": _vm.tabList,
  3999. "currTab": _vm.typeTab,
  4000. "marginTop": 15,
  4001. "fontSize": 16,
  4002. "liWidth": 130,
  4003. "liHeight": 40,
  4004. "marginRight": 5,
  4005. "marginBottom": 25
  4006. },
  4007. on: {
  4008. "update:currTab": function ($event) {
  4009. _vm.typeTab = $event;
  4010. },
  4011. "update:curr-tab": function ($event) {
  4012. _vm.typeTab = $event;
  4013. },
  4014. "handle": _vm.clickNav
  4015. }
  4016. })], 2), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"product-right-bottom\" data-v-2188ece4>", "</div>", [_vm._ssrNode("<div class=\"details\"" + _vm._ssrStyle(null, null, {
  4017. display: _vm.typeTab == 0 ? '' : 'none'
  4018. }) + " data-v-2188ece4>", "</div>", [_vm._ssrNode((_vm.pageData.feature_data ? "<div class=\"details-1\" data-v-2188ece4><h3 data-v-2188ece4>Features</h3> <ul data-v-2188ece4>" + _vm._ssrList(_vm.pageData.feature_data, function (i, key) {
  4019. return "<li data-v-2188ece4>" + _vm._ssrEscape(_vm._s(i)) + "</li>";
  4020. }) + "</ul></div>" : "<!---->") + " " + (_vm.comInfo.description ? "<div class=\"details-1\" data-v-2188ece4><h3 data-v-2188ece4>Description</h3> <p data-v-2188ece4>" + _vm._s(_vm.comInfo.description) + "</p></div>" : "<!---->") + " " + (_vm.pageData.pbo ? "<div class=\"details-2\" data-v-2188ece4><h3 data-v-2188ece4>Product Branding Information</h3> <p data-v-2188ece4>" + _vm._s(_vm.pageData.pbo) + "</p></div>" : "<!---->") + " "), _vm._ssrNode("<div class=\"details-3\" data-v-2188ece4>", "</div>", [_vm.comInfo.product_size || _vm.comInfo.product_material || _vm.comInfo.moq || _vm.comInfo.included_packaging || _vm.comInfo.optional_packaging || _vm.comInfo.print_size_area || _vm.comInfo.product_dimensions || _vm.comInfo.additional_info ? _vm._ssrNode("<ul data-v-2188ece4>", "</ul>", [_vm._ssrNode("<li data-v-2188ece4><div class=\"title\" data-v-2188ece4>Product Info</div></li> " + (_vm.comInfo.product_size ? "<li data-v-2188ece4><div class=\"point\" data-v-2188ece4>Product Size</div> <div class=\"info\" data-v-2188ece4>" + _vm._s(_vm.comInfo.product_size) + "</div></li>" : "<!---->") + " " + ((_vm$pageData$main = _vm.pageData.main) !== null && _vm$pageData$main !== void 0 && _vm$pageData$main.colors_text ? "<li data-v-2188ece4><div class=\"point\" data-v-2188ece4>Colour</div> <div class=\"info\" data-v-2188ece4>" + _vm._s((_vm$pageData$main2 = _vm.pageData.main) === null || _vm$pageData$main2 === void 0 ? void 0 : _vm$pageData$main2.colors_text) + "</div></li>" : "<!---->") + " " + (_vm.comInfo.product_material ? "<li data-v-2188ece4><div class=\"point\" data-v-2188ece4>Material</div> <div class=\"info\" data-v-2188ece4>" + _vm._s(_vm.comInfo.product_material) + "</div></li>" : "<!---->") + " " + (_vm.pageData.moq ? "<li data-v-2188ece4><div class=\"point\" data-v-2188ece4>MOQ</div> <div class=\"info\" data-v-2188ece4>" + _vm._s(_vm.pageData.moq) + "</div></li>" : "<!---->") + " "), _vm.comInfo.included_packaging ? _vm._ssrNode("<li data-v-2188ece4>", "</li>", [_vm._ssrNode("<div class=\"point\" data-v-2188ece4>Included Packaging</div> "), _vm._l(_vm.comIncluded_packaging, function (item, i) {
  4021. return _vm._ssrNode("<div class=\"info blue\" data-v-2188ece4>", "</div>", [_vm.isProduct(item.trim()) ? _c('nuxt-link', {
  4022. attrs: {
  4023. "to": {
  4024. name: 'product-code',
  4025. params: {
  4026. code: item.trim()
  4027. }
  4028. }
  4029. }
  4030. }, [_c('span', [_vm._v(_vm._s(item)), i < _vm.comIncluded_packaging.length - 1 ? _c('em', [_vm._v(",")]) : _vm._e()])]) : _c('span', [_vm._v(_vm._s(item)), i < _vm.comIncluded_packaging.length - 1 ? _c('em', [_vm._v(",")]) : _vm._e()])], 1);
  4031. })], 2) : _vm._e(), _vm._ssrNode(" "), _vm.comInfo.optional_packaging ? _vm._ssrNode("<li data-v-2188ece4>", "</li>", [_vm._ssrNode("<div class=\"point\" data-v-2188ece4>Optional Packaging</div> "), _vm._l(_vm.comOptional_packaging, function (item, i) {
  4032. return _vm._ssrNode("<div class=\"info blue\" data-v-2188ece4>", "</div>", [_vm.isProduct(item.trim()) ? _c('nuxt-link', {
  4033. attrs: {
  4034. "to": {
  4035. name: 'product-code',
  4036. params: {
  4037. code: item.trim()
  4038. }
  4039. }
  4040. }
  4041. }, [_c('span', [_vm._v(_vm._s(item)), i < _vm.comOptional_packaging.length - 1 ? _c('em', [_vm._v(",")]) : _vm._e()])]) : _c('span', [_vm._v(_vm._s(item)), i < _vm.comOptional_packaging.length - 1 ? _c('em', [_vm._v(",")]) : _vm._e()])], 1);
  4042. })], 2) : _vm._e(), _vm._ssrNode(" "), _vm.comInfo.optional_attachments ? _vm._ssrNode("<li data-v-2188ece4>", "</li>", [_vm._ssrNode("<div class=\"point\" data-v-2188ece4>Optional Attachments</div> "), _vm._ssrNode("<div class=\"info\" data-v-2188ece4>", "</div>", _vm._l(_vm.comOptional_attachments, function (item, i) {
  4043. return _c('nuxt-link', {
  4044. key: item,
  4045. attrs: {
  4046. "to": {
  4047. name: 'product-code',
  4048. params: {
  4049. code: item
  4050. }
  4051. }
  4052. }
  4053. }, [_c('span', [_vm._v(_vm._s(item)), i < _vm.comOptional_attachments.length - 1 ? _c('em', [_vm._v(",")]) : _vm._e()])]);
  4054. }), 1)], 2) : _vm._e(), _vm._ssrNode(" " + (_vm.comInfo.product_dimensions ? "<li data-v-2188ece4><div class=\"point\" data-v-2188ece4>Product dimensions</div> <div class=\"info\" data-v-2188ece4>" + _vm._s(_vm.comInfo.product_dimensions) + "</div></li>" : "<!---->") + " " + (_vm.comInfo.additional_info ? "<li data-v-2188ece4><div class=\"point\" data-v-2188ece4>Additional Info</div> <div class=\"info\" data-v-2188ece4>" + _vm._s(_vm.comInfo.additional_info) + "</div></li>" : "<!---->"))], 2) : _vm._e(), _vm._ssrNode(" " + (_vm.comInfo.print_position || _vm.comInfo.print_size_area || _vm.comInfo.print_marketing ? "<ul data-v-2188ece4><li data-v-2188ece4><div class=\"title\" data-v-2188ece4>Print Info</div></li> " + (_vm.comInfo.print_position ? "<li data-v-2188ece4><div class=\"point\" data-v-2188ece4>Print Position</div> <div class=\"info\" data-v-2188ece4>" + _vm._s(_vm.comInfo.print_position) + "</div></li>" : "<!---->") + " " + (_vm.comInfo.print_size_area ? "<li data-v-2188ece4><div class=\"point\" data-v-2188ece4>Print Size Area</div> <div class=\"info\" data-v-2188ece4>" + _vm._s(_vm.comInfo.print_size_area) + "</div></li>" : "<!---->") + " " + (_vm.comInfo.print_marketing ? "<li data-v-2188ece4><div class=\"point\" data-v-2188ece4>Print Marketing</div> <div class=\"info\" data-v-2188ece4>" + _vm._s(_vm.comInfo.print_marketing) + "</div></li>" : "<!---->") + "</ul>" : "<!---->") + " " + (_vm.comInfo.data_services || _vm.comInfo.chip_grade || _vm.comInfo.certifications || _vm.comInfo.capacity || _vm.comInfo.warranty || _vm.comInfo.battery_type || _vm.comInfo.additional_description ? "<ul data-v-2188ece4><li data-v-2188ece4><div class=\"title\" data-v-2188ece4>Functional Info</div></li> " + (_vm.comInfo.data_services ? "<li data-v-2188ece4><div class=\"point\" data-v-2188ece4>Data Services</div> <div class=\"info\" data-v-2188ece4>" + _vm._s(_vm.comInfo.data_services) + "</div></li>" : "<!---->") + " " + (_vm.comInfo.chip_grade ? "<li data-v-2188ece4><div class=\"point\" data-v-2188ece4>Chip Grade</div> <div class=\"info\" data-v-2188ece4>" + _vm._s(_vm.comInfo.chip_grade) + "</div></li>" : "<!---->") + " " + (_vm.comInfo.certifications ? "<li data-v-2188ece4><div class=\"point\" data-v-2188ece4>Certifications</div> <div class=\"info\" data-v-2188ece4>" + _vm._s(_vm.comInfo.certifications) + "</div></li>" : "<!---->") + " " + (_vm.comInfo.capacity ? "<li data-v-2188ece4><div class=\"point\" data-v-2188ece4>Capacity</div> <div class=\"info\" data-v-2188ece4>" + _vm._s(_vm.comInfo.capacity) + "</div></li>" : "<!---->") + " " + (_vm.comInfo.warranty ? "<li data-v-2188ece4><div class=\"point\" data-v-2188ece4>Warranty</div> <div class=\"info\" data-v-2188ece4>" + _vm._s(_vm.comInfo.warranty) + "</div></li>" : "<!---->") + " " + (_vm.comInfo.battery_type ? "<li data-v-2188ece4><div class=\"point\" data-v-2188ece4>Battery Type</div> <div class=\"info\" data-v-2188ece4>" + _vm._s(_vm.comInfo.battery_type) + "</div></li>" : "<!---->") + " " + (_vm.comInfo.additional_description ? "<li data-v-2188ece4><div class=\"point\" data-v-2188ece4>Additional Info</div> <div class=\"info\" data-v-2188ece4>" + _vm._s(_vm.comInfo.additional_description) + "</div></li>" : "<!---->") + "</ul>" : "<!---->"))], 2), _vm._ssrNode(" <p class=\"details-1\" data-v-2188ece4>\n Due to differences between production batches, product sizes may vary\n slightly. The above Colours and measurements are approximate, and for\n guidance only.\n </p>")], 2), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"quote\"" + _vm._ssrStyle(null, null, {
  4055. display: _vm.typeTab == 1 ? '' : 'none'
  4056. }) + " data-v-2188ece4>", "</div>", [_c('quote', {
  4057. ref: "quote",
  4058. attrs: {
  4059. "pageData": _vm.pageData,
  4060. "id": _vm.id
  4061. }
  4062. })], 1), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"stock\"" + _vm._ssrStyle(null, null, {
  4063. display: false ? undefined : 'none'
  4064. }) + " data-v-2188ece4>", "</div>", [_vm.stockData.length > 0 ? _vm._ssrNode("<div data-v-2188ece4>", "</div>", [_c('stock-table', {
  4065. attrs: {
  4066. "data": _vm.stockData
  4067. }
  4068. }), _vm._ssrNode(" <p class=\"quote-tips\" data-v-2188ece4>For quantities over available stock levels, please contact us for pricing and timing</p>")], 2) : _vm._ssrNode("<div class=\"quote-tips\" data-v-2188ece4>\n This product is made offshore, and is available for any quantity equal to, or above the listed MOQ\n </div>")]), _vm._ssrNode(" <div" + _vm._ssrStyle(null, null, {
  4069. display: _vm.typeTab == 3 ? '' : 'none'
  4070. }) + " data-v-2188ece4><h5 data-v-2188ece4>Maketing Resource</h5> <div class=\"resources maketing\" data-v-2188ece4>" + (_vm.comInfo.line_artwork ? "<p data-v-2188ece4><img" + _vm._ssrAttr("src", __webpack_require__(241)) + " data-v-2188ece4>Lineart Download\n </p>" : "<!---->") + " " + (_vm.pageData.edm_url ? "<p data-v-2188ece4><img" + _vm._ssrAttr("src", __webpack_require__(242)) + " data-v-2188ece4>Email Digital Marketing\n </p>" : "<!---->") + " " + ((_vm$productImgArr = _vm.productImgArr) !== null && _vm$productImgArr !== void 0 && _vm$productImgArr.length ? "<p data-v-2188ece4><img" + _vm._ssrAttr("src", __webpack_require__(243)) + " data-v-2188ece4>Product Image\n </p>" : "<!---->") + " " + (_vm.pageData.cataloque_url ? "<p data-v-2188ece4><img" + _vm._ssrAttr("src", __webpack_require__(244)) + " data-v-2188ece4>Catalogue\n </p>" : "<!---->") + " " + (_vm.comInfo.product_instruction ? "<p data-v-2188ece4><img" + _vm._ssrAttr("src", __webpack_require__(245)) + " data-v-2188ece4>Product Instruction\n </p>" : "<!---->") + "</div> " + ((_vm$pageData$goodsCom = _vm.pageData.goodsCompliance) !== null && _vm$pageData$goodsCom !== void 0 && _vm$pageData$goodsCom.length ? "<h5 data-v-2188ece4>Compliance Resource</h5>" : "<!---->") + " <div class=\"resources compliance\" data-v-2188ece4>" + _vm._ssrList(_vm.pageData.goodsCompliance, function (item, i) {
  4071. var _item$filter;
  4072. return "<img" + _vm._ssrAttr("src", (_item$filter = item.filter) === null || _item$filter === void 0 ? void 0 : _item$filter.img) + " data-v-2188ece4>";
  4073. }) + "</div></div>")], 2), _vm._ssrNode(" "), _c('no-ssr', [_c('project', {
  4074. attrs: {
  4075. "productInfo": _vm.pageData
  4076. }
  4077. }), _vm._v(" "), _vm.showViewer ? _c('ElImageViewer', {
  4078. attrs: {
  4079. "on-close": _vm.closeViewer,
  4080. "url-list": _vm.productImgArr
  4081. }
  4082. }) : _vm._e()], 1)], 2);
  4083. };
  4084. var staticRenderFns = [];
  4085. // CONCATENATED MODULE: ./components/product/ProductRight.vue?vue&type=template&id=2188ece4&scoped=true
  4086. // EXTERNAL MODULE: ./components/product/Quote.vue + 4 modules
  4087. var Quote = __webpack_require__(227);
  4088. // EXTERNAL MODULE: ./components/table/StockTable.vue + 4 modules
  4089. var StockTable = __webpack_require__(228);
  4090. // EXTERNAL MODULE: ./components/table/ChangeTable.vue + 4 modules
  4091. var ChangeTable = __webpack_require__(229);
  4092. // EXTERNAL MODULE: ./node_modules/element-ui/packages/image/src/image-viewer.vue + 7 modules
  4093. var image_viewer = __webpack_require__(156);
  4094. // EXTERNAL MODULE: external "vuex"
  4095. var external_vuex_ = __webpack_require__(6);
  4096. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/product/ProductRight.vue?vue&type=script&lang=js
  4097. /*eslint-disable*/
  4098. /* harmony default export */ var ProductRightvue_type_script_lang_js = ({
  4099. components: {
  4100. StockTable: StockTable["default"],
  4101. ChangeTable: ChangeTable["default"],
  4102. Quote: Quote["default"],
  4103. ElImageViewer: image_viewer["a" /* default */]
  4104. },
  4105. props: {
  4106. pageData: {},
  4107. id: Number
  4108. },
  4109. // head(){
  4110. // return {
  4111. // meta: [{ 'http-equiv': "Content-Security-Policy", content: "upgrade-insecure-requests" }]
  4112. // }
  4113. // },
  4114. data() {
  4115. return {
  4116. tabList: [{
  4117. name: 'Details',
  4118. isClick: false,
  4119. isShow: true
  4120. }, {
  4121. name: 'Quick Quote',
  4122. isClick: false,
  4123. isShow: false
  4124. }, {
  4125. name: 'Stock',
  4126. isClick: false,
  4127. isShow: false
  4128. }, {
  4129. name: 'Resources',
  4130. isClick: false,
  4131. isShow: true
  4132. }, {
  4133. name: 'Changes',
  4134. isClick: false,
  4135. isShow: false
  4136. }],
  4137. typeTab: 0,
  4138. stockData: [],
  4139. showViewer: false,
  4140. projectdDialogVisible: false,
  4141. projectObj: {
  4142. decoration_id: ''
  4143. },
  4144. // ticketFormVisible:false,
  4145. ticketForm: {
  4146. 英文品名: this.pageData.product_name,
  4147. SKU: this.pageData.product_code,
  4148. 问题类型: [],
  4149. 反馈详情: ''
  4150. },
  4151. ticketConfig: [{
  4152. prop: '英文品名',
  4153. type: 'text'
  4154. }, {
  4155. prop: 'SKU',
  4156. type: 'text'
  4157. }, {
  4158. prop: '问题类型',
  4159. type: 'checkbox',
  4160. selectlist: ['网页信息', '供应商质量', '样品管理', '产品部管理']
  4161. }, {
  4162. prop: '反馈详情',
  4163. type: 'textarea'
  4164. }],
  4165. rules: {
  4166. '问题类型': [{
  4167. required: true,
  4168. message: 'Please select',
  4169. trigger: 'change'
  4170. }],
  4171. '反馈详情': [{
  4172. required: true,
  4173. message: 'Please enter',
  4174. trigger: 'blur'
  4175. }]
  4176. }
  4177. };
  4178. },
  4179. computed: {
  4180. currentPre() {
  4181. return this.$store.state.product.smImgUlIdx;
  4182. },
  4183. isLogin() {
  4184. var _this$$store$state$us;
  4185. return !!((_this$$store$state$us = this.$store.state.userInfo) !== null && _this$$store$state$us !== void 0 && _this$$store$state$us.email);
  4186. },
  4187. comInfo() {
  4188. var _this$pageData;
  4189. return (_this$pageData = this.pageData) === null || _this$pageData === void 0 ? void 0 : _this$pageData.main;
  4190. },
  4191. productImgArr() {
  4192. return this.comInfo.mergeImages;
  4193. },
  4194. userInfo() {
  4195. return this.$store.state.userInfo;
  4196. },
  4197. comIncluded_packaging() {
  4198. return this.comInfo.included_packaging.split(',');
  4199. },
  4200. comOptional_packaging() {
  4201. return this.comInfo.optional_packaging.split(',');
  4202. },
  4203. comOptional_attachments() {
  4204. return this.comInfo.optional_attachments.split(',');
  4205. }
  4206. },
  4207. watch: {
  4208. //登陆立即显示Quick Quote和Changes选项
  4209. isLogin: {
  4210. handler(val) {
  4211. if (val) {
  4212. this.tabList[1].isShow = true;
  4213. // this.tabList[4].isShow = true
  4214. }
  4215. },
  4216. immediate: true
  4217. }
  4218. },
  4219. mounted() {},
  4220. methods: {
  4221. ...Object(external_vuex_["mapActions"])(['getUserInfo']),
  4222. ...Object(external_vuex_["mapMutations"])({
  4223. openDialog: 'openDialog',
  4224. setSmImgUlIdx: 'product/setSmImgUlIdx',
  4225. setLoading: 'product/setLoading'
  4226. }),
  4227. // 判断字符串是否符合商品code规律
  4228. isProduct(str) {
  4229. return /^[A-z]{1,4}\d{1,4}[A-z]?$/.test(str);
  4230. },
  4231. computedIndex(i) {
  4232. var _this$pageData$main;
  4233. return (_this$pageData$main = this.pageData.main) !== null && _this$pageData$main !== void 0 && _this$pageData$main.image ? 1 + i : i;
  4234. },
  4235. // 保存一下用户选择的周期、型号、打印服务、addon、packaging, product builder页面要用到
  4236. saveUserSelected() {
  4237. let result = {
  4238. addon: [],
  4239. packaging: [],
  4240. printService: {}
  4241. };
  4242. for (let key in this.allSelData) {
  4243. if (key === 'addon') {
  4244. result.addon = this.allSelData[key].map(item => item.id);
  4245. }
  4246. if (key === 'packaging') {
  4247. result.packaging = this.allSelData[key].map(item => item.id);
  4248. }
  4249. }
  4250. // 周期
  4251. if (this.priceList[this.currTab].cycle_id) {
  4252. result.cycle = this.priceList[this.currTab].cycle_id;
  4253. }
  4254. // 型号
  4255. if (this.priceList[this.currTab].undecoratedSelectId) {
  4256. result.model = this.priceList[this.currTab].undecoratedSelectId;
  4257. }
  4258. // 打印服务
  4259. const printService = this.priceList[this.currTab][2];
  4260. console.log(printService, 'printService');
  4261. if (Array.isArray(printService) && printService.length) {
  4262. printService.forEach(item => {
  4263. if (item.decorationSelectId) {
  4264. const temp = item.decorationList.filter(i => i.id === item.decorationSelectId);
  4265. result.printService[`${item.id}`] = {
  4266. id: item.decorationSelectId,
  4267. num: temp[0].num
  4268. };
  4269. }
  4270. });
  4271. }
  4272. localStorage.setItem(`product-user-select-${this.$route.params.code}`, JSON.stringify(result));
  4273. },
  4274. // getStock() {
  4275. // this.$axios.get('/api/quote/stock_new', { params: {id: this.id} }).then(res => {
  4276. // this.stockData = res.result
  4277. // })
  4278. // },
  4279. openProjectdDialog() {
  4280. if (!isLogin) {
  4281. this.openDialog();
  4282. return;
  4283. }
  4284. this.projectdDialogVisible = true;
  4285. this.projectObj.cycle_id = this.comCurrPriceList.cycle_id;
  4286. this.projectObj.price_unit_id = this.comCurrPriceList.undecoratedSelectId;
  4287. //获取Decoration Method
  4288. this.projectObj.decoration_methods = this.comDecoration.map(item => {
  4289. let temp = {};
  4290. temp.decoration_id = item.id;
  4291. temp.price_unit_id = item.parentId;
  4292. temp.colours_number = item.num;
  4293. return temp;
  4294. });
  4295. this.projectObj.addition_ids = this.allSelData.addon.map(item => {
  4296. return item.id;
  4297. }).join();
  4298. this.projectObj.packaging_addition_ids = this.allSelData.packaging.map(item => {
  4299. return item.id;
  4300. }).join();
  4301. },
  4302. download(url) {
  4303. var urlStr = url.match('[^/]+(?!.*/)')[0];
  4304. const repaceDomainUrl = this.$utils.repaceDomain(url);
  4305. if (url.endsWith(".pdf")) {
  4306. this.$utils.handleFileDownload(repaceDomainUrl, urlStr, false);
  4307. } else {
  4308. this.$utils.downloadBlob(url, urlStr);
  4309. }
  4310. },
  4311. onPreview() {
  4312. this.showViewer = true;
  4313. },
  4314. closeViewer() {
  4315. this.showViewer = false;
  4316. },
  4317. clickNav(i) {
  4318. if (this.typeTab == 1 && !this.tabList[1].isClick) {
  4319. this.checkNav(1);
  4320. } else if (this.typeTab == 2 && !this.tabList[2].isClick) {
  4321. this.checkNav(2);
  4322. }
  4323. },
  4324. checkNav(i) {
  4325. if (this.isLogin) {
  4326. this.getUserInfo();
  4327. if (this.userInfo.audit_status == 1) {
  4328. if (i == 1) {
  4329. this.$refs.quote.getQuote();
  4330. // this.$refs.quote.getWeight()
  4331. this.tabList[1].isClick = true;
  4332. } else if (i == 2) {
  4333. // uk 没有这个
  4334. // this.getStock()
  4335. // this.tabList[2].isClick = true
  4336. }
  4337. } else {
  4338. this.typeTab = 0;
  4339. this.$message({
  4340. message: 'Your account has not been audited',
  4341. type: 'warning'
  4342. });
  4343. }
  4344. } else {
  4345. this.openDialog();
  4346. this.typeTab = 0;
  4347. }
  4348. },
  4349. openLink(url) {
  4350. let a = url.indexOf('http') > -1 ? url : 'http://' + url;
  4351. window.open(a, '_blank');
  4352. }
  4353. // sendTicket() {
  4354. // this.$axios.post('/api/ticket/add', { product_code: this.pageData.product_code,ticket_type: this.ticketForm['问题类型'].join(),content: this.ticketForm['反馈详情'] }).then(res => {
  4355. // this.setLoading(false)
  4356. // this.$notify({
  4357. // title: "success",
  4358. // message: "提交成功",
  4359. // type: "success",
  4360. // duration: 3000,
  4361. // });
  4362. // }).catch(() => {
  4363. // this.setLoading(false)
  4364. // })
  4365. // }
  4366. }
  4367. });
  4368. // CONCATENATED MODULE: ./components/product/ProductRight.vue?vue&type=script&lang=js
  4369. /* harmony default export */ var product_ProductRightvue_type_script_lang_js = (ProductRightvue_type_script_lang_js);
  4370. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  4371. var componentNormalizer = __webpack_require__(2);
  4372. // CONCATENATED MODULE: ./components/product/ProductRight.vue
  4373. function injectStyles (context) {
  4374. var style0 = __webpack_require__(246)
  4375. if (style0.__inject__) style0.__inject__(context)
  4376. }
  4377. /* normalize component */
  4378. var component = Object(componentNormalizer["a" /* default */])(
  4379. product_ProductRightvue_type_script_lang_js,
  4380. render,
  4381. staticRenderFns,
  4382. false,
  4383. injectStyles,
  4384. "2188ece4",
  4385. "3d8ffb3b"
  4386. )
  4387. /* harmony default export */ var ProductRight = __webpack_exports__["default"] = (component.exports);
  4388. /* nuxt-component-imports */
  4389. installComponents(component, {TabNav: __webpack_require__(184).default,Project: __webpack_require__(230).default})
  4390. /***/ })
  4391. };;
  4392. //# sourceMappingURL=product-right.js.map