product-right.js 174 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720
  1. exports.ids = [27,24,26,33,34,35,36,38,39,40];
  2. exports.modules = {
  3. /***/ 147:
  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. /***/ 148:
  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. /***/ 149:
  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. /***/ 157:
  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__(147);
  607. // EXTERNAL MODULE: ./node_modules/element-ui/src/utils/util.js + 1 modules
  608. var util = __webpack_require__(148);
  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__(149);
  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. /***/ 167:
  1271. /***/ (function(module, exports) {
  1272. // Exports
  1273. module.exports = {
  1274. };
  1275. /***/ }),
  1276. /***/ 168:
  1277. /***/ (function(module, exports) {
  1278. // Exports
  1279. module.exports = {
  1280. };
  1281. /***/ }),
  1282. /***/ 169:
  1283. /***/ (function(module, exports) {
  1284. // Exports
  1285. module.exports = {
  1286. };
  1287. /***/ }),
  1288. /***/ 170:
  1289. /***/ (function(module, exports) {
  1290. // Exports
  1291. module.exports = {
  1292. };
  1293. /***/ }),
  1294. /***/ 178:
  1295. /***/ (function(module, exports) {
  1296. // Exports
  1297. module.exports = {
  1298. };
  1299. /***/ }),
  1300. /***/ 179:
  1301. /***/ (function(module, exports) {
  1302. // Exports
  1303. module.exports = {
  1304. };
  1305. /***/ }),
  1306. /***/ 180:
  1307. /***/ (function(module, exports) {
  1308. // Exports
  1309. module.exports = {
  1310. };
  1311. /***/ }),
  1312. /***/ 183:
  1313. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1314. "use strict";
  1315. // ESM COMPAT FLAG
  1316. __webpack_require__.r(__webpack_exports__);
  1317. // 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
  1318. var render = function render() {
  1319. var _vm = this,
  1320. _c = _vm._self._c;
  1321. return _c('div', {
  1322. staticClass: "tabs",
  1323. style: {
  1324. marginTop: _vm.marginTop + 'px',
  1325. marginBottom: _vm.marginBottom + 'px',
  1326. fontSize: _vm.fontSize + 'px'
  1327. }
  1328. }, [_vm._ssrNode(Array.isArray(_vm.tabList) ? "<ul" + _vm._ssrClass(null, _vm.borderType) + " data-v-8a32da06>" + _vm._ssrList(_vm.tabList, function (item, i) {
  1329. return !item.hasOwnProperty('isShow') || item.isShow ? "<li" + _vm._ssrClass(null, {
  1330. active: i === _vm.currTab
  1331. }) + _vm._ssrStyle(null, {
  1332. minWidth: _vm.liWidth + 'px',
  1333. height: _vm.liHeight + 'px',
  1334. lineHeight: _vm.liHeight + 'px',
  1335. marginRight: _vm.marginRight + 'px'
  1336. }, null) + " data-v-8a32da06><div data-v-8a32da06>" + _vm._ssrEscape(_vm._s(item.name)) + "</div></li>" : "<!---->";
  1337. }) + _vm._ssrList(_vm.comRemaining, function (item) {
  1338. return "<li class=\"unclickable\"" + _vm._ssrStyle(null, {
  1339. minWidth: _vm.liWidth + 'px',
  1340. lineHeight: _vm.liHeight + 'px',
  1341. marginRight: _vm.marginRight + 'px'
  1342. }, null) + " data-v-8a32da06><div data-v-8a32da06>" + _vm._ssrEscape(_vm._s(item)) + "</div></li>";
  1343. }) + "</ul>" : "<ul data-v-8a32da06>" + _vm._ssrList(Object.keys(_vm.tabList), function (val, i) {
  1344. return "<li" + _vm._ssrClass(null, {
  1345. active: i === _vm.currTab
  1346. }) + _vm._ssrStyle(null, {
  1347. minWidth: _vm.liWidth + 'px',
  1348. marginRight: _vm.marginRight + 'px'
  1349. }, null) + " data-v-8a32da06><div data-v-8a32da06>" + _vm._ssrEscape(_vm._s(val)) + "</div></li>";
  1350. }) + "</ul>")]);
  1351. };
  1352. var staticRenderFns = [];
  1353. // CONCATENATED MODULE: ./components/TabNav.vue?vue&type=template&id=8a32da06&scoped=true
  1354. // 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
  1355. /* harmony default export */ var TabNavvue_type_script_lang_js = ({
  1356. props: {
  1357. // color: {
  1358. // type: String,
  1359. // },
  1360. borderType: {
  1361. type: String,
  1362. default: 'noBorder'
  1363. },
  1364. fontSize: {
  1365. type: Number,
  1366. default: 14
  1367. },
  1368. marginTop: {
  1369. type: Number,
  1370. default: 0
  1371. },
  1372. marginBottom: {
  1373. type: Number,
  1374. default: 10
  1375. },
  1376. liWidth: {
  1377. type: Number,
  1378. default: 0
  1379. },
  1380. liHeight: {
  1381. type: Number,
  1382. default: 28
  1383. },
  1384. marginRight: {
  1385. type: Number,
  1386. default: 0
  1387. },
  1388. currTab: {
  1389. type: [Number, String],
  1390. default: 0
  1391. },
  1392. tabList: {
  1393. type: [Array, Object],
  1394. default: () => {
  1395. return [];
  1396. }
  1397. },
  1398. allPrintTab: {
  1399. type: [Array, Object],
  1400. default: () => {
  1401. return [];
  1402. }
  1403. }
  1404. },
  1405. data() {
  1406. return {
  1407. textColor: 'red'
  1408. };
  1409. },
  1410. computed: {
  1411. comRemaining() {
  1412. const mapTabList = this.tabList.map(i => i.name);
  1413. return this.allPrintTab.filter(element => !mapTabList.includes(element));
  1414. }
  1415. },
  1416. methods: {
  1417. selTab(i) {
  1418. this.$emit('update:currTab', i);
  1419. this.$emit('handle');
  1420. }
  1421. }
  1422. });
  1423. // CONCATENATED MODULE: ./components/TabNav.vue?vue&type=script&lang=js
  1424. /* harmony default export */ var components_TabNavvue_type_script_lang_js = (TabNavvue_type_script_lang_js);
  1425. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  1426. var componentNormalizer = __webpack_require__(2);
  1427. // CONCATENATED MODULE: ./components/TabNav.vue
  1428. function injectStyles (context) {
  1429. var style0 = __webpack_require__(190)
  1430. if (style0.__inject__) style0.__inject__(context)
  1431. }
  1432. /* normalize component */
  1433. var component = Object(componentNormalizer["a" /* default */])(
  1434. components_TabNavvue_type_script_lang_js,
  1435. render,
  1436. staticRenderFns,
  1437. false,
  1438. injectStyles,
  1439. "8a32da06",
  1440. "1ce05afc"
  1441. )
  1442. /* harmony default export */ var TabNav = __webpack_exports__["default"] = (component.exports);
  1443. /***/ }),
  1444. /***/ 187:
  1445. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1446. "use strict";
  1447. __webpack_require__.r(__webpack_exports__);
  1448. /* 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__(167);
  1449. /* 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__);
  1450. /* 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__));
  1451. /***/ }),
  1452. /***/ 188:
  1453. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1454. "use strict";
  1455. __webpack_require__.r(__webpack_exports__);
  1456. /* 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__(168);
  1457. /* 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__);
  1458. /* 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__));
  1459. /***/ }),
  1460. /***/ 189:
  1461. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1462. "use strict";
  1463. __webpack_require__.r(__webpack_exports__);
  1464. /* 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__(169);
  1465. /* 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__);
  1466. /* 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__));
  1467. /***/ }),
  1468. /***/ 190:
  1469. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1470. "use strict";
  1471. __webpack_require__.r(__webpack_exports__);
  1472. /* 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__(170);
  1473. /* 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__);
  1474. /* 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__));
  1475. /***/ }),
  1476. /***/ 198:
  1477. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1478. "use strict";
  1479. // ESM COMPAT FLAG
  1480. __webpack_require__.r(__webpack_exports__);
  1481. // 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
  1482. var render = function render() {
  1483. var _vm = this,
  1484. _c = _vm._self._c;
  1485. return _c('div', {
  1486. staticClass: "wrap",
  1487. style: {
  1488. marginBottom: _vm.marginBottom + 'px'
  1489. }
  1490. }, [_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', {
  1491. ref: "elTable",
  1492. staticStyle: {
  1493. "width": "100%"
  1494. },
  1495. attrs: {
  1496. "show-header": _vm.tableType != 'Addon',
  1497. "data": _vm.comTableData,
  1498. "header-cell-style": {
  1499. backgroundColor: '#fff',
  1500. fontWeight: 'normal',
  1501. fontSize: '14px',
  1502. fontFamily: 'Proxima Nova',
  1503. color: '#000',
  1504. '--comDisplayCss': _vm.comDisplayCss
  1505. },
  1506. "row-key": "id",
  1507. "span-method": _vm.arraySpanMethod,
  1508. "row-class-name": _vm.tableRowClassName
  1509. },
  1510. on: {
  1511. "selection-change": _vm.handleSelectionChange,
  1512. "select": _vm.dialogCheck
  1513. }
  1514. }, [_vm.tableType != 'Comparison' ? _c('el-table-column', {
  1515. attrs: {
  1516. "type": "selection",
  1517. "width": "50",
  1518. "align": "center",
  1519. "reserve-selection": true,
  1520. "selectable": _vm.handleSelectable
  1521. }
  1522. }) : _vm._e(), _vm._v(" "), _vm._l(_vm.tableColumns, function (item) {
  1523. return [item.type ? _c('el-table-column', {
  1524. key: item.prop,
  1525. attrs: {
  1526. "align": item.align ? item.align : 'left',
  1527. "prop": item.prop,
  1528. "label": item.label,
  1529. "formatter": item.formatter,
  1530. "width": item.width,
  1531. "sortable": item.sortable
  1532. },
  1533. scopedSlots: _vm._u([{
  1534. key: "default",
  1535. fn: function ({
  1536. row
  1537. }) {
  1538. return [item.type == 'radioInput' ? [_c('div', {
  1539. staticClass: "flex between"
  1540. }, [_c('span', [_vm._v(_vm._s(row.decName))]), _vm._v(" "), _c('el-input', {
  1541. staticClass: "edit-input",
  1542. attrs: {
  1543. "min": "0",
  1544. "max": row.max_num,
  1545. "type": "number",
  1546. "size": "small"
  1547. },
  1548. on: {
  1549. "input": function ($event) {
  1550. return _vm.getNumber($event, row, row.max_num);
  1551. }
  1552. },
  1553. model: {
  1554. value: row.num,
  1555. callback: function ($$v) {
  1556. _vm.$set(row, "num", $$v);
  1557. },
  1558. expression: "row.num"
  1559. }
  1560. })], 1)] : _c('div', [row.filter_boolean ? [_c('div', {
  1561. staticClass: "triangle"
  1562. }), _vm._v(" "), _c('div', {
  1563. staticClass: "text"
  1564. }, [_vm._v("Eco")])] : _vm._e(), _vm._v("\n " + _vm._s(row[item.prop]) + "\n "), _vm.tableType == 'Undecorated' ? _c('el-popover', {
  1565. attrs: {
  1566. "placement": "top-start",
  1567. "trigger": "hover"
  1568. }
  1569. }, [_c('i', {
  1570. staticClass: "el-icon-warning",
  1571. attrs: {
  1572. "slot": "reference"
  1573. },
  1574. slot: "reference"
  1575. }), _vm._v(" "), _c('p', {
  1576. staticClass: "popover-text"
  1577. }, [_vm._v(_vm._s(_vm.comTitle))])]) : _vm._e()], 2)];
  1578. }
  1579. }], null, true)
  1580. }) : _vm._e(), _vm._v(" "), !item.type ? _c('el-table-column', {
  1581. key: item.prop,
  1582. attrs: {
  1583. "align": item.align ? item.align : 'center',
  1584. "prop": item.prop,
  1585. "label": item.label,
  1586. "formatter": item.formatter,
  1587. "sortable": item.sortable,
  1588. "show-overflow-tooltip": "",
  1589. "width": (798 - _vm.tableColumns[0].width - _vm.tableColumns[0].extraWidth) / (_vm.tableColumns.length - 1)
  1590. },
  1591. scopedSlots: _vm._u([{
  1592. key: "default",
  1593. fn: function ({
  1594. row,
  1595. $index
  1596. }) {
  1597. 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)))])])];
  1598. }
  1599. }], null, true)
  1600. }) : _vm._e()];
  1601. })], 2)], 1)], 2);
  1602. };
  1603. var staticRenderFns = [];
  1604. // CONCATENATED MODULE: ./components/table/NewPriceTable.vue?vue&type=template&id=8da20436&scoped=true
  1605. // EXTERNAL MODULE: external "number-precision"
  1606. var external_number_precision_ = __webpack_require__(122);
  1607. // 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
  1608. /* harmony default export */ var NewPriceTablevue_type_script_lang_js = ({
  1609. filters: {
  1610. // Decoration Table:打印价格+附加价格
  1611. multiplyPrice(a1, row, prop) {
  1612. const rep = /^[0-9]+.?[0-9]*$/;
  1613. if (!rep.test(a1)) {
  1614. return a1;
  1615. } else {
  1616. return Object(external_number_precision_["times"])(a1, row.num);
  1617. }
  1618. },
  1619. // Undecorated Table:基础价格+Decoration所选价格(包含附加价格)
  1620. plusPrice(a1, a2) {
  1621. return a2 ? Object(external_number_precision_["plus"])(a1, a2) : a1;
  1622. },
  1623. // Decoration Table:计算差价
  1624. differencePrice(a1, row, prop, selectRow) {
  1625. const rep = /^[0-9]+.?[0-9]*$/;
  1626. if (rep.test(a1)) {
  1627. const temp = prop.split('_');
  1628. const supplier = +row[`supplier_${temp[1]}`];
  1629. const suppliers = Object(external_number_precision_["times"])(row.num - 1, supplier);
  1630. const noIncludePrice = Object(external_number_precision_["plus"])(a1, suppliers);
  1631. const selSupplier = +selectRow[`supplier_${temp[1]}`];
  1632. const selSuppliers = Object(external_number_precision_["times"])(selectRow.num - 1, selSupplier);
  1633. const isIncludePrice = Object(external_number_precision_["plus"])(+selectRow[prop], selSuppliers);
  1634. return noIncludePrice > isIncludePrice ? `+${Object(external_number_precision_["minus"])(noIncludePrice, isIncludePrice)}` : Object(external_number_precision_["minus"])(noIncludePrice, isIncludePrice);
  1635. } else {
  1636. return a1;
  1637. }
  1638. }
  1639. },
  1640. props: {
  1641. hasDecAdd: {
  1642. type: Number,
  1643. default: 0
  1644. },
  1645. tableData: {
  1646. type: Array,
  1647. default: () => {
  1648. return [];
  1649. }
  1650. },
  1651. tableColumns: {
  1652. type: Array,
  1653. default: () => {
  1654. return [];
  1655. }
  1656. },
  1657. operateWith: {
  1658. type: String,
  1659. default: '100%'
  1660. },
  1661. isCheckBox: {
  1662. type: Boolean,
  1663. default: false
  1664. },
  1665. tableType: {
  1666. type: String,
  1667. default: 'Undecorated'
  1668. },
  1669. decorationObj: {
  1670. type: Object,
  1671. default: () => {
  1672. return {};
  1673. }
  1674. },
  1675. selectId: {
  1676. type: Number,
  1677. default: null
  1678. },
  1679. selectRow: {
  1680. type: Object,
  1681. default: () => {
  1682. return {};
  1683. }
  1684. },
  1685. multipleSelection: {
  1686. type: Array,
  1687. default: () => {
  1688. return [];
  1689. }
  1690. },
  1691. selectDecoration: {
  1692. type: Object,
  1693. default: () => {
  1694. return {};
  1695. }
  1696. },
  1697. curPrint: {
  1698. type: String,
  1699. default: ''
  1700. },
  1701. curModel: {
  1702. type: String,
  1703. default: ''
  1704. },
  1705. marginBottom: {
  1706. type: Number,
  1707. default: 20
  1708. },
  1709. decorationMultiple: {
  1710. type: Number,
  1711. default: 1
  1712. },
  1713. headerShow: {
  1714. type: Boolean,
  1715. default: true
  1716. }
  1717. },
  1718. data() {
  1719. return {
  1720. setupConfigList: [{
  1721. id: 1,
  1722. name: '/col'
  1723. }, {
  1724. id: 2,
  1725. name: '/desgin'
  1726. }, {
  1727. id: 3,
  1728. name: '/pos'
  1729. }, {
  1730. id: 4,
  1731. name: '/pos desgin'
  1732. }, {
  1733. id: 5,
  1734. name: 'POA'
  1735. }, {
  1736. id: 6,
  1737. name: 'Waived'
  1738. }],
  1739. setupTitleList: ['1st', '2nd', '3rd']
  1740. };
  1741. },
  1742. computed: {
  1743. getTableContainerClass() {
  1744. // 根据tableType的值返回不同的class
  1745. return {
  1746. 'table-container': true,
  1747. 'border-Decoration': this.tableType === 'Decoration' && this.hasDecAdd
  1748. };
  1749. },
  1750. comTitle() {
  1751. if (this.tableType === 'Undecorated') {
  1752. return `Includes ${this.curModel}`;
  1753. } else if (this.tableType === 'Decoration') {
  1754. return `Add-Ons`;
  1755. } else {
  1756. return this.curPrint;
  1757. }
  1758. },
  1759. comDisplayCss() {
  1760. return this.tableType === 'Comparison' ? '1px solid #efefef' : 'none';
  1761. },
  1762. comMultipleSelID() {
  1763. return this.multipleSelection.map(i => i.id);
  1764. },
  1765. comTableData() {
  1766. if (this.tableType === 'Decoration') {
  1767. return this.tableData;
  1768. } else {
  1769. return this.tableData;
  1770. }
  1771. }
  1772. },
  1773. mounted() {
  1774. // 初始勾上默认选择打印项
  1775. if (JSON.stringify(this.selectRow) !== '{}') {
  1776. this.$refs.elTable.toggleRowSelection(this.selectRow);
  1777. }
  1778. },
  1779. methods: {
  1780. judgeProp(row, prop, $index) {
  1781. if ($index === 0 && this.tableType === 'Decoration') {
  1782. const temp = prop.split('_');
  1783. return row[`supplier_${temp[1]}`];
  1784. } else {
  1785. return row[prop];
  1786. }
  1787. },
  1788. $_setupPriceFilter(setupPriceID) {
  1789. const result = this.setupConfigList.filter(item => item.id === setupPriceID);
  1790. return result.length > 0 ? result[0].name : '';
  1791. },
  1792. isNumber(val) {
  1793. const rep = /^[0-9]+.?[0-9]*$/;
  1794. return rep.test(val);
  1795. },
  1796. /* 暂不实现此功能
  1797. //点击table栏时选中按钮
  1798. handleCurrentChange(currentRow, oldCurrentRow) {
  1799. this.$refs.elTable.clearSelection()
  1800. this.$emit('update:selectId', currentRow.id)
  1801. this.addCar(currentRow)
  1802. },
  1803. */
  1804. // table全选
  1805. handleSelectionChange(val) {
  1806. this.$emit('update:multipleSelection', val);
  1807. },
  1808. dialogCheck(selection, row) {
  1809. if (this.isCheckBox) return; // 是多选框返回
  1810. this.$refs.elTable.clearSelection();
  1811. // 初始化
  1812. if (selection.length === 0) {
  1813. this.$emit('update:selectId', null);
  1814. this.$emit('update:selectRow', {});
  1815. return;
  1816. }
  1817. if (row) {
  1818. this.$emit('update:selectId', row.id);
  1819. this.$emit('update:selectRow', row);
  1820. this.$refs.elTable.toggleRowSelection(row, true);
  1821. }
  1822. },
  1823. addCar(currentRow) {
  1824. // 加入购物车需要parentId
  1825. const selrow = Object.assign({}, currentRow);
  1826. selrow.parentId = this.decorationObj.parentId;
  1827. this.$emit('update:selectRow', selrow);
  1828. this.$refs.elTable.toggleRowSelection(currentRow);
  1829. },
  1830. getRowKey(row) {
  1831. return row.id;
  1832. },
  1833. arraySpanMethod({
  1834. row,
  1835. column,
  1836. rowIndex,
  1837. columnIndex
  1838. }) {
  1839. // 隐藏'Decoration'选项框
  1840. if (this.tableType === 'Decoration' && columnIndex === 0) {
  1841. return [0, 1];
  1842. }
  1843. if (this.tableType === 'Decoration' && columnIndex === 1) {
  1844. return [1, 2];
  1845. }
  1846. },
  1847. tableRowClassName({
  1848. row
  1849. }) {
  1850. if (this.tableType === 'Decoration') {
  1851. return this.decorationMultiple ? 'borderNone' : 'hiddenRow';
  1852. }
  1853. return 'fontBold';
  1854. },
  1855. handleSelectable(row, index) {
  1856. // website_setup_id 5为POA,不可选
  1857. return row.website_setup_id !== 5;
  1858. },
  1859. getNumber(e, row, max) {
  1860. if (parseInt(e) > max) {
  1861. row.num = max;
  1862. }
  1863. }
  1864. }
  1865. });
  1866. // CONCATENATED MODULE: ./components/table/NewPriceTable.vue?vue&type=script&lang=js
  1867. /* harmony default export */ var table_NewPriceTablevue_type_script_lang_js = (NewPriceTablevue_type_script_lang_js);
  1868. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  1869. var componentNormalizer = __webpack_require__(2);
  1870. // CONCATENATED MODULE: ./components/table/NewPriceTable.vue
  1871. function injectStyles (context) {
  1872. var style0 = __webpack_require__(187)
  1873. if (style0.__inject__) style0.__inject__(context)
  1874. }
  1875. /* normalize component */
  1876. var component = Object(componentNormalizer["a" /* default */])(
  1877. table_NewPriceTablevue_type_script_lang_js,
  1878. render,
  1879. staticRenderFns,
  1880. false,
  1881. injectStyles,
  1882. "8da20436",
  1883. "518290f4"
  1884. )
  1885. /* harmony default export */ var NewPriceTable = __webpack_exports__["default"] = (component.exports);
  1886. /***/ }),
  1887. /***/ 199:
  1888. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1889. "use strict";
  1890. // ESM COMPAT FLAG
  1891. __webpack_require__.r(__webpack_exports__);
  1892. // 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
  1893. var render = function render() {
  1894. var _vm = this,
  1895. _c = _vm._self._c;
  1896. return _c('div', {
  1897. staticClass: "wrap"
  1898. }, [_vm._ssrNode("<p" + _vm._ssrClass("tb-title", {
  1899. 'left': _vm.tableType
  1900. }) + " 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, {
  1901. width: _vm.comWidth + 'px'
  1902. }, null) + " data-v-8afd0988>Total</span>" : "<!---->") + "</p> "), _c('el-table', {
  1903. ref: "elTable",
  1904. attrs: {
  1905. "border": "",
  1906. "data": _vm.tableData,
  1907. "header-cell-style": {
  1908. backgroundColor: '#fff',
  1909. color: '#606266',
  1910. fontWeight: 500,
  1911. fontSize: '16px'
  1912. },
  1913. "stripe": ""
  1914. }
  1915. }, _vm._l(_vm.tableColumns, function (item, index) {
  1916. return _c('el-table-column', {
  1917. key: `${_vm.curOrder}-${item.prop}`,
  1918. attrs: {
  1919. "align": item.align ? item.align : 'center',
  1920. "prop": item.prop,
  1921. "label": item.label,
  1922. "formatter": item.formatter,
  1923. "sortable": item.sortable
  1924. },
  1925. scopedSlots: _vm._u([{
  1926. key: "header",
  1927. fn: function (scope) {
  1928. return [_vm.title == 'Buy Price' && _vm.comLocationNum === 1 ? _c('div', [_c('el-input', {
  1929. directives: [{
  1930. name: "show",
  1931. rawName: "v-show",
  1932. value: !item.isFirstColumn,
  1933. expression: "!item.isFirstColumn"
  1934. }],
  1935. attrs: {
  1936. "size": "small",
  1937. "type": "number",
  1938. "min": _vm.min
  1939. },
  1940. on: {
  1941. "blur": function ($event) {
  1942. return _vm.getNumber($event, index);
  1943. }
  1944. },
  1945. model: {
  1946. value: item.label,
  1947. callback: function ($$v) {
  1948. _vm.$set(item, "label", $$v);
  1949. },
  1950. expression: "item.label"
  1951. }
  1952. }), _vm._v(" "), _c('span', {
  1953. directives: [{
  1954. name: "show",
  1955. rawName: "v-show",
  1956. value: item.isFirstColumn,
  1957. expression: "item.isFirstColumn"
  1958. }]
  1959. }, [_vm._v(_vm._s(item.label))])], 1) : _c('div', [_c('span', [_vm._v(_vm._s(item.label))])])];
  1960. }
  1961. }, {
  1962. key: "default",
  1963. fn: function (scope) {
  1964. 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'))])]];
  1965. }
  1966. }], null, true)
  1967. });
  1968. }), 1)], 2);
  1969. };
  1970. var staticRenderFns = [];
  1971. // CONCATENATED MODULE: ./components/table/TotalTable.vue?vue&type=template&id=8afd0988&scoped=true
  1972. // EXTERNAL MODULE: external "number-precision"
  1973. var external_number_precision_ = __webpack_require__(122);
  1974. // 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
  1975. /* harmony default export */ var TotalTablevue_type_script_lang_js = ({
  1976. filters: {
  1977. differencePrice(a, curDecoVal, indexDecoVal, poaConfig) {
  1978. const rep = /^[0-9]+(\.[0-9]*)?$/;
  1979. if (!rep.test(a)) {
  1980. return a || 'Waived';
  1981. }
  1982. if (poaConfig.includes(curDecoVal) || poaConfig.includes(indexDecoVal)) {
  1983. if (curDecoVal === '111' || curDecoVal === '111.00' || indexDecoVal === '111' || indexDecoVal === '111.00') {
  1984. return '-';
  1985. } else if (curDecoVal === '999' || curDecoVal === '999.00' || indexDecoVal === '999' || indexDecoVal === '999.00') {
  1986. return 'POA';
  1987. }
  1988. } else if (curDecoVal === indexDecoVal) {
  1989. return 0;
  1990. } else if (+curDecoVal > +indexDecoVal) {
  1991. return `-£ ${Object(external_number_precision_["minus"])(curDecoVal, indexDecoVal)}`;
  1992. } else if (+curDecoVal < +indexDecoVal) {
  1993. return `+£ ${Object(external_number_precision_["minus"])(indexDecoVal, curDecoVal)}`;
  1994. } else {
  1995. return 'Waived';
  1996. }
  1997. }
  1998. },
  1999. props: {
  2000. tableData: {
  2001. type: Array,
  2002. default: () => []
  2003. },
  2004. tableColumns: {
  2005. type: Array,
  2006. default: () => []
  2007. },
  2008. tableType: {
  2009. type: String,
  2010. default: ''
  2011. },
  2012. curDecoration: {
  2013. type: Object,
  2014. default: () => {}
  2015. },
  2016. indexDecoration: {
  2017. type: Object,
  2018. default: () => {}
  2019. },
  2020. comLocationNum: {
  2021. type: Number,
  2022. default: 1
  2023. },
  2024. curOrder: {
  2025. type: String,
  2026. default: ''
  2027. },
  2028. min: {
  2029. type: String,
  2030. default: ''
  2031. },
  2032. title: {
  2033. type: String,
  2034. default: ''
  2035. }
  2036. },
  2037. data() {
  2038. return {
  2039. poaConfig: ['111', '111.00', '999', '999.00']
  2040. };
  2041. },
  2042. methods: {
  2043. getNumber(e, index) {
  2044. if (parseInt(e.target.value) < this.min) {
  2045. this.$emit('send-idx', index);
  2046. }
  2047. }
  2048. },
  2049. computed: {
  2050. comWidth() {
  2051. return 800 / this.tableColumns.length - 1;
  2052. }
  2053. }
  2054. });
  2055. // CONCATENATED MODULE: ./components/table/TotalTable.vue?vue&type=script&lang=js
  2056. /* harmony default export */ var table_TotalTablevue_type_script_lang_js = (TotalTablevue_type_script_lang_js);
  2057. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  2058. var componentNormalizer = __webpack_require__(2);
  2059. // CONCATENATED MODULE: ./components/table/TotalTable.vue
  2060. function injectStyles (context) {
  2061. var style0 = __webpack_require__(188)
  2062. if (style0.__inject__) style0.__inject__(context)
  2063. }
  2064. /* normalize component */
  2065. var component = Object(componentNormalizer["a" /* default */])(
  2066. table_TotalTablevue_type_script_lang_js,
  2067. render,
  2068. staticRenderFns,
  2069. false,
  2070. injectStyles,
  2071. "8afd0988",
  2072. "35501f79"
  2073. )
  2074. /* harmony default export */ var TotalTable = __webpack_exports__["default"] = (component.exports);
  2075. /***/ }),
  2076. /***/ 200:
  2077. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2078. "use strict";
  2079. // ESM COMPAT FLAG
  2080. __webpack_require__.r(__webpack_exports__);
  2081. // 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
  2082. var render = function render() {
  2083. var _vm = this,
  2084. _c = _vm._self._c;
  2085. return _c('div', [_vm._ssrNode("<p class=\"tb-title\" data-v-931e8840>Markup %</p> "), _c('el-table', {
  2086. ref: "elTable",
  2087. style: {
  2088. width: _vm.operateWith
  2089. },
  2090. attrs: {
  2091. "border": "",
  2092. "data": _vm.tableData,
  2093. "highlight-current-row": false,
  2094. "header-cell-style": {
  2095. backgroundColor: '#fff',
  2096. color: '#606266',
  2097. fontWeight: 500,
  2098. fontSize: '16px'
  2099. }
  2100. }
  2101. }, [_vm._l(_vm.tableColumns, function (item) {
  2102. return [item.isText ? _c('el-table-column', {
  2103. key: item.prop,
  2104. attrs: {
  2105. "align": "center",
  2106. "prop": item.prop,
  2107. "label": item.label,
  2108. "formatter": item.formatter,
  2109. "width": item.width,
  2110. "sortable": item.sortable
  2111. }
  2112. }) : _vm._e(), _vm._v(" "), !item.isText ? _c('el-table-column', {
  2113. key: item.prop,
  2114. attrs: {
  2115. "prop": item.prop,
  2116. "label": item.label,
  2117. "formatter": item.formatter,
  2118. "width": item.width,
  2119. "align": item.align ? item.align : 'center',
  2120. "sortable": item.sortable
  2121. },
  2122. scopedSlots: _vm._u([{
  2123. key: "default",
  2124. fn: function ({
  2125. row,
  2126. $index
  2127. }) {
  2128. return [_c('el-input', {
  2129. staticClass: "edit-input",
  2130. attrs: {
  2131. "size": "small",
  2132. "type": "number",
  2133. "min": "0"
  2134. },
  2135. on: {
  2136. "input": function ($event) {
  2137. return _vm.saveUnitData(row, $index);
  2138. }
  2139. },
  2140. model: {
  2141. value: row[item.prop],
  2142. callback: function ($$v) {
  2143. _vm.$set(row, item.prop, $$v);
  2144. },
  2145. expression: "row[item.prop]"
  2146. }
  2147. })];
  2148. }
  2149. }], null, true)
  2150. }) : _vm._e()];
  2151. })], 2)], 2);
  2152. };
  2153. var staticRenderFns = [];
  2154. // CONCATENATED MODULE: ./components/table/UnitTable.vue?vue&type=template&id=931e8840&scoped=true
  2155. // 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
  2156. /* harmony default export */ var UnitTablevue_type_script_lang_js = ({
  2157. props: {
  2158. tableData: {
  2159. type: Array,
  2160. default: []
  2161. },
  2162. tableColumns: {
  2163. type: Array,
  2164. default: []
  2165. },
  2166. operateWith: {
  2167. type: String,
  2168. default: "100%"
  2169. },
  2170. selectionShow: {
  2171. type: Boolean,
  2172. default: false
  2173. },
  2174. handleShow: {
  2175. type: Boolean,
  2176. default: false
  2177. }
  2178. },
  2179. methods: {
  2180. saveUnitData(row, idx) {
  2181. this.tableData[idx] = row;
  2182. localStorage.setItem('unit', JSON.stringify(this.tableData));
  2183. }
  2184. }
  2185. });
  2186. // CONCATENATED MODULE: ./components/table/UnitTable.vue?vue&type=script&lang=js
  2187. /* harmony default export */ var table_UnitTablevue_type_script_lang_js = (UnitTablevue_type_script_lang_js);
  2188. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  2189. var componentNormalizer = __webpack_require__(2);
  2190. // CONCATENATED MODULE: ./components/table/UnitTable.vue
  2191. function injectStyles (context) {
  2192. var style0 = __webpack_require__(189)
  2193. if (style0.__inject__) style0.__inject__(context)
  2194. }
  2195. /* normalize component */
  2196. var component = Object(componentNormalizer["a" /* default */])(
  2197. table_UnitTablevue_type_script_lang_js,
  2198. render,
  2199. staticRenderFns,
  2200. false,
  2201. injectStyles,
  2202. "931e8840",
  2203. "01507f2a"
  2204. )
  2205. /* harmony default export */ var UnitTable = __webpack_exports__["default"] = (component.exports);
  2206. /***/ }),
  2207. /***/ 201:
  2208. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2209. "use strict";
  2210. // ESM COMPAT FLAG
  2211. __webpack_require__.r(__webpack_exports__);
  2212. // 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
  2213. var render = function render() {
  2214. var _vm = this,
  2215. _c = _vm._self._c;
  2216. 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) {
  2217. return "<tr data-v-13e7bb30><td" + _vm._ssrStyle({
  2218. "padding": "18px 0",
  2219. "width": "40%",
  2220. "text-align": "center",
  2221. "color": "#000"
  2222. }, (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) {
  2223. 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>";
  2224. }) + "</div>" : _vm._ssrList(items, function (item, i) {
  2225. return "<div style=\"line-height: 20px\" data-v-13e7bb30><span data-v-13e7bb30>" + _vm._ssrEscape(_vm._s(item)) + "</span></div>";
  2226. })) + "</td></tr>";
  2227. }) + " "), _vm._ssrNode("<tr data-v-13e7bb30>", "</tr>", [_vm._ssrNode("<td colspan=\"2\" style=\"padding: 20px\" data-v-13e7bb30>", "</td>", [_vm._t("default")], 2)])], 2)])]);
  2228. };
  2229. var staticRenderFns = [];
  2230. // CONCATENATED MODULE: ./components/table/MailTable.vue?vue&type=template&id=13e7bb30&scoped=true
  2231. // 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
  2232. /* harmony default export */ var MailTablevue_type_script_lang_js = ({
  2233. props: {
  2234. mailData: {},
  2235. buyData: {}
  2236. },
  2237. data() {
  2238. return {
  2239. objStyle: {
  2240. fontWeight: 'bold',
  2241. backgroundColor: '#efefef'
  2242. }
  2243. };
  2244. }
  2245. });
  2246. // CONCATENATED MODULE: ./components/table/MailTable.vue?vue&type=script&lang=js
  2247. /* harmony default export */ var table_MailTablevue_type_script_lang_js = (MailTablevue_type_script_lang_js);
  2248. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  2249. var componentNormalizer = __webpack_require__(2);
  2250. // CONCATENATED MODULE: ./components/table/MailTable.vue
  2251. function injectStyles (context) {
  2252. }
  2253. /* normalize component */
  2254. var component = Object(componentNormalizer["a" /* default */])(
  2255. table_MailTablevue_type_script_lang_js,
  2256. render,
  2257. staticRenderFns,
  2258. false,
  2259. injectStyles,
  2260. "13e7bb30",
  2261. "f622c4d0"
  2262. )
  2263. /* harmony default export */ var MailTable = __webpack_exports__["default"] = (component.exports);
  2264. /***/ }),
  2265. /***/ 202:
  2266. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2267. "use strict";
  2268. // ESM COMPAT FLAG
  2269. __webpack_require__.r(__webpack_exports__);
  2270. // 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
  2271. var render = function render() {
  2272. var _vm = this,
  2273. _c = _vm._self._c;
  2274. return _c('div', {
  2275. ref: "printArea",
  2276. staticStyle: {
  2277. "font-family": "ProximaNova-Regular",
  2278. "background-color": "#fff",
  2279. "padding": "20px",
  2280. "word-break": "break-word",
  2281. "box-sizing": "border-box"
  2282. }
  2283. }, [_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) {
  2284. return "<td style=\"padding:10px 0;color:#00213B;width: 25%;font-size: 14px;border:1px solid #EFEFEF\">" + _vm._ssrEscape(_vm._s(item.label)) + "</td>";
  2285. }) + "</tr> <tr>" + _vm._ssrList(_vm.headerColumns, function (item, key) {
  2286. 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) {
  2287. return "<div style=\"padding-bottom:4px;\">" + _vm._ssrEscape(_vm._s(opt)) + "</div>";
  2288. })) + "</div>" : "<span>-</span>") + "</td>";
  2289. }) + "</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({
  2290. "padding": "10px 0",
  2291. "color": "#00213B",
  2292. "border": "1px solid #EFEFEF"
  2293. }, {
  2294. width: _vm.comWidth
  2295. }, null) + ">Total</td></tr>" : "<!---->") + " <tr style=\"background-color: #F7F8FC;font-weight: bold;\">" + _vm._ssrList(_vm.tableColumns, function (item, key) {
  2296. return "<td" + _vm._ssrStyle({
  2297. "padding": "10px 0",
  2298. "color": "#00213B",
  2299. "border": "1px solid #EFEFEF"
  2300. }, {
  2301. width: _vm.comWidth
  2302. }, null) + ">" + _vm._ssrEscape(_vm._s(item.label)) + "</td>";
  2303. }) + "</tr> " + _vm._ssrList(_vm.tableData, function (row) {
  2304. return "<tr style=\"padding:10px 0;\">" + _vm._ssrList(_vm.tableColumns, function (column) {
  2305. return "<td" + _vm._ssrStyle({
  2306. "padding": "10px 0",
  2307. "color": "#00213B",
  2308. "border": "1px solid #EFEFEF",
  2309. "white-space": "nowrap"
  2310. }, _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>";
  2311. }) + "</tr>";
  2312. }) + "</tbody></table></div> " + (_vm.emailForm.Comments ? "<div style=\"color:#00213B\"><p style=\"margin: 20px 0;\">" + _vm._ssrEscape(_vm._s(_vm.emailForm.Comments)) + "</p></div>" : "<!---->"))]);
  2313. };
  2314. var staticRenderFns = [];
  2315. // CONCATENATED MODULE: ./components/PriceToImg.vue?vue&type=template&id=2e991f10
  2316. // EXTERNAL MODULE: external "html2canvas"
  2317. var external_html2canvas_ = __webpack_require__(142);
  2318. var external_html2canvas_default = /*#__PURE__*/__webpack_require__.n(external_html2canvas_);
  2319. // 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
  2320. /* harmony default export */ var PriceToImgvue_type_script_lang_js = ({
  2321. props: {
  2322. pageData: {
  2323. type: Object,
  2324. default: {}
  2325. },
  2326. specificationsObj: {
  2327. type: Object,
  2328. default: {}
  2329. },
  2330. tableData: {
  2331. type: Array,
  2332. default: []
  2333. },
  2334. tableColumns: {
  2335. type: Array,
  2336. default: []
  2337. },
  2338. comLocationNum: {
  2339. type: Number,
  2340. default: 1
  2341. },
  2342. emailForm: {
  2343. type: Object,
  2344. default: {}
  2345. },
  2346. loading: {
  2347. type: Boolean,
  2348. default: false
  2349. },
  2350. isImgSrc: {
  2351. type: Boolean,
  2352. default: true
  2353. },
  2354. width: {
  2355. type: String,
  2356. default: '100%'
  2357. }
  2358. },
  2359. data() {
  2360. return {
  2361. headerColumns: [{
  2362. label: "LeadTime",
  2363. prop: "time",
  2364. type: "pre" //去掉$符号
  2365. }, {
  2366. label: "Model",
  2367. prop: "model",
  2368. type: "pre" //去掉$符号
  2369. }, {
  2370. label: "Decoration",
  2371. prop: "decoration",
  2372. type: "pre" //去掉$符号
  2373. }, {
  2374. label: "Add On",
  2375. prop: "addonArr",
  2376. type: "pre" //去掉$符号
  2377. }]
  2378. };
  2379. },
  2380. computed: {
  2381. comInfo() {
  2382. var _this$pageData;
  2383. return (_this$pageData = this.pageData) === null || _this$pageData === void 0 ? void 0 : _this$pageData.main;
  2384. },
  2385. comWidth() {
  2386. return 100 / this.tableColumns.length + '%';
  2387. }
  2388. },
  2389. created() {
  2390. if (!this.isImgSrc) {
  2391. this.getBase64Image(this.comInfo.image, 'productImg');
  2392. }
  2393. },
  2394. methods: {
  2395. getColumnHeaderStyle(column) {
  2396. if (column.prop === 'project') {
  2397. return {
  2398. 'font-weight': 'bold'
  2399. };
  2400. }
  2401. return {};
  2402. },
  2403. //Base64生成产品图片,因为跨域
  2404. getBase64Image(url, ref) {
  2405. var that = this;
  2406. var image = new Image();
  2407. image.src = url + '?v=' + Math.random(); // 处理缓存
  2408. image.crossOrigin = '*'; // 支持跨域图片
  2409. image.onload = function () {
  2410. var base64 = that.drawBase64Image(image);
  2411. that.$refs[ref].src = base64;
  2412. };
  2413. },
  2414. drawBase64Image(img) {
  2415. var canvas = document.createElement('canvas');
  2416. canvas.width = img.width;
  2417. canvas.height = img.height;
  2418. var ctx = canvas.getContext('2d');
  2419. ctx.drawImage(img, 0, 0, img.width, img.height);
  2420. var dataURL = canvas.toDataURL('image/png');
  2421. return dataURL;
  2422. },
  2423. htmlToPdf(title) {
  2424. const element = this.$refs.printArea;
  2425. const clientWidth = element.offsetWidth;
  2426. const clientHeight = element.offsetHeight;
  2427. const kh = [clientWidth, clientHeight];
  2428. const opts = {
  2429. scale: 1.5,
  2430. // 缩放比例,提高生成图片清晰度
  2431. useCORS: true,
  2432. // 允许加载跨域的图片
  2433. // allowTaint: true, // 允许图片跨域,和 useCORS 二者不可共同使用
  2434. tainttest: true,
  2435. // 检测每张图片已经加载完成
  2436. logging: true // 日志开关,发布的时候记得改成 false
  2437. };
  2438. external_html2canvas_default()(element, opts).then(canvas => {
  2439. const dataURL = canvas.toDataURL('image/png');
  2440. this.downloadImage(dataURL, kh, title);
  2441. this.$emit('update:loading', false);
  2442. }).catch(() => {
  2443. this.$emit('update:loading', false);
  2444. // Bus.$emit("finishDownload");
  2445. });
  2446. },
  2447. getUrlBase64(url, kh) {
  2448. return new Promise(resolve => {
  2449. let canvas = document.createElement('canvas');
  2450. const ctx = canvas.getContext('2d');
  2451. const img = new Image();
  2452. img.crossOrigin = 'Anonymous'; // 允许跨域
  2453. img.src = url;
  2454. img.onload = () => {
  2455. // eslint-disable-next-line prefer-destructuring
  2456. canvas.height = kh[1];
  2457. // eslint-disable-next-line prefer-destructuring
  2458. canvas.width = kh[0];
  2459. ctx.drawImage(img, 0, 0, kh[0], kh[1]);
  2460. const dataURL = canvas.toDataURL('image/png');
  2461. canvas = null;
  2462. resolve(dataURL);
  2463. };
  2464. });
  2465. },
  2466. downloadImage(imgUrl, kh, title) {
  2467. this.getUrlBase64(imgUrl, kh).then(base64 => {
  2468. const link = document.createElement('a');
  2469. link.href = base64;
  2470. link.download = `${title}.png`;
  2471. link.click();
  2472. });
  2473. }
  2474. }
  2475. });
  2476. // CONCATENATED MODULE: ./components/PriceToImg.vue?vue&type=script&lang=js
  2477. /* harmony default export */ var components_PriceToImgvue_type_script_lang_js = (PriceToImgvue_type_script_lang_js);
  2478. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  2479. var componentNormalizer = __webpack_require__(2);
  2480. // CONCATENATED MODULE: ./components/PriceToImg.vue
  2481. /* normalize component */
  2482. var component = Object(componentNormalizer["a" /* default */])(
  2483. components_PriceToImgvue_type_script_lang_js,
  2484. render,
  2485. staticRenderFns,
  2486. false,
  2487. null,
  2488. null,
  2489. "dda7dca6"
  2490. )
  2491. /* harmony default export */ var PriceToImg = __webpack_exports__["default"] = (component.exports);
  2492. /***/ }),
  2493. /***/ 216:
  2494. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2495. "use strict";
  2496. __webpack_require__.r(__webpack_exports__);
  2497. /* 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__(178);
  2498. /* 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__);
  2499. /* 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__));
  2500. /***/ }),
  2501. /***/ 217:
  2502. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2503. "use strict";
  2504. __webpack_require__.r(__webpack_exports__);
  2505. /* 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__(179);
  2506. /* 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__);
  2507. /* 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__));
  2508. /***/ }),
  2509. /***/ 218:
  2510. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2511. "use strict";
  2512. __webpack_require__.r(__webpack_exports__);
  2513. /* 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__(180);
  2514. /* 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__);
  2515. /* 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__));
  2516. /***/ }),
  2517. /***/ 219:
  2518. /***/ (function(module, exports) {
  2519. // Exports
  2520. module.exports = {
  2521. };
  2522. /***/ }),
  2523. /***/ 223:
  2524. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2525. "use strict";
  2526. // ESM COMPAT FLAG
  2527. __webpack_require__.r(__webpack_exports__);
  2528. // 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
  2529. var render = function render() {
  2530. var _vm = this,
  2531. _c = _vm._self._c;
  2532. return _c('div', [_vm.quoteLoadState == 0 ? _c('div', {
  2533. directives: [{
  2534. name: "loading",
  2535. rawName: "v-loading",
  2536. value: true,
  2537. expression: "true"
  2538. }],
  2539. staticClass: "com-loading"
  2540. }) : _vm.quoteLoadState == 1 ? _vm._ssrNode("<div data-v-21f896fd>", "</div>", [_c('tab-nav', {
  2541. attrs: {
  2542. "borderType": 'allBorder',
  2543. "liWidth": 100,
  2544. "liHeight": 40,
  2545. "marginRight": 5,
  2546. "currTab": _vm.curWeek,
  2547. "tabList": _vm.priceList
  2548. },
  2549. on: {
  2550. "update:currTab": function ($event) {
  2551. _vm.curWeek = $event;
  2552. },
  2553. "update:curr-tab": function ($event) {
  2554. _vm.curWeek = $event;
  2555. }
  2556. }
  2557. }), _vm._ssrNode(" "), _vm._l(_vm.priceList, function (items, indexs) {
  2558. var _items$basePrice, _items$decoration, _items$basePrice2, _items$basePrice2$ite, _items$basePrice2$ite2, _items$basePrice3, _items$basePrice3$ite, _items$basePrice3$ite2;
  2559. return _vm._ssrNode("<div" + _vm._ssrStyle(null, null, {
  2560. display: _vm.curWeek == indexs ? '' : 'none'
  2561. }) + " data-v-21f896fd>", "</div>", [_vm._ssrNode("<div data-v-21f896fd>", "</div>", [_c('tab-nav', {
  2562. attrs: {
  2563. "borderType": 'incompleteBorder',
  2564. "currTab": items.curPrint,
  2565. "tabList": items.basePrice,
  2566. "allPrintTab": _vm.allPrintTab,
  2567. "marginTop": 0,
  2568. "marginRight": 5,
  2569. "marginBottom": ((_items$basePrice = items.basePrice) === null || _items$basePrice === void 0 ? void 0 : _items$basePrice.length) > 1 ? 7 : 0
  2570. },
  2571. on: {
  2572. "update:currTab": function ($event) {
  2573. return _vm.$set(items, "curPrint", $event);
  2574. },
  2575. "update:curr-tab": function ($event) {
  2576. return _vm.$set(items, "curPrint", $event);
  2577. },
  2578. "handle": function ($event) {
  2579. return _vm.sortBy(items);
  2580. }
  2581. }
  2582. })], 1), _vm._ssrNode(" "), _vm._l(items.basePrice, function (item, index) {
  2583. var _items$decorationOrig;
  2584. return _vm._ssrNode("<div" + _vm._ssrStyle(null, null, {
  2585. display: items.curPrint == index ? '' : 'none'
  2586. }) + " data-v-21f896fd>", "</div>", [_c('new-price-table', {
  2587. attrs: {
  2588. "tableColumns": [..._vm.undecorated_columns, ...item.part_columns],
  2589. "tableData": item.data,
  2590. "tableType": 'Undecorated',
  2591. "curPrint": item.name,
  2592. "curModel": (_items$decorationOrig = items.decorationOrign[index]) === null || _items$decorationOrig === void 0 ? void 0 : _items$decorationOrig.model,
  2593. "data": items,
  2594. "selectRow": item.selectBaseRow
  2595. },
  2596. on: {
  2597. "update:selectRow": function ($event) {
  2598. return _vm.$set(item, "selectBaseRow", $event);
  2599. },
  2600. "update:select-row": function ($event) {
  2601. return _vm.$set(item, "selectBaseRow", $event);
  2602. }
  2603. }
  2604. })], 1);
  2605. }), _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', {
  2606. attrs: {
  2607. "tableData": items.decoration,
  2608. "tableColumns": [..._vm.decoration_columns, ..._vm.comCurBaseColumns],
  2609. "tableType": 'Decoration',
  2610. "marginBottom": 0,
  2611. "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
  2612. }
  2613. }) : _vm._e(), _vm._ssrNode(" "), _vm._l(items.basePrice, function (item, index) {
  2614. return _vm._ssrNode("<div" + _vm._ssrStyle(null, null, {
  2615. display: items.curPrint == index && item.decoration_addition.length ? '' : 'none'
  2616. }) + " data-v-21f896fd>", "</div>", [_c('new-price-table', {
  2617. attrs: {
  2618. "tableData": item.decoration_addition,
  2619. "tableColumns": [..._vm.addon_columns, ...item.part_columns],
  2620. "isCheckBox": true,
  2621. "tableType": 'Addon',
  2622. "multipleSelection": items.selectAdditionRow
  2623. },
  2624. on: {
  2625. "update:multipleSelection": function ($event) {
  2626. return _vm.$set(items, "selectAdditionRow", $event);
  2627. },
  2628. "update:multiple-selection": function ($event) {
  2629. return _vm.$set(items, "selectAdditionRow", $event);
  2630. }
  2631. }
  2632. })], 1);
  2633. })], 2);
  2634. })], 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', {
  2635. directives: [{
  2636. name: "show",
  2637. rawName: "v-show",
  2638. value: false,
  2639. expression: "false"
  2640. }],
  2641. ref: "mailtable",
  2642. attrs: {
  2643. "mailData": _vm.mailData
  2644. }
  2645. }, [_c('price-to-img', {
  2646. attrs: {
  2647. "pageData": _vm.pageData,
  2648. "specificationsObj": _vm.specificationsObj,
  2649. "tableData": _vm.comFilterSwitchSellData,
  2650. "tableColumns": _vm.comMergeColumns,
  2651. "comLocationNum": _vm.comLocationNum,
  2652. "emailForm": _vm.commentObj
  2653. }
  2654. })], 1), _vm._v(" "), _c('el-dialog', {
  2655. ref: "dialogRef",
  2656. attrs: {
  2657. "lock-scroll": false,
  2658. "title": "Customer Quote",
  2659. "visible": _vm.priceToImgVisible,
  2660. "custom-class": "price-to-img-dialog"
  2661. },
  2662. on: {
  2663. "update:visible": function ($event) {
  2664. _vm.priceToImgVisible = $event;
  2665. }
  2666. }
  2667. }, [_c('price-to-img', {
  2668. ref: "priceToImgRef",
  2669. attrs: {
  2670. "isImgSrc": false,
  2671. "loading": _vm.pdfLoading,
  2672. "pageData": _vm.pageData,
  2673. "specificationsObj": _vm.specificationsObj,
  2674. "tableData": _vm.comFilterSwitchSellData,
  2675. "tableColumns": _vm.comMergeColumns,
  2676. "comLocationNum": _vm.comLocationNum,
  2677. "emailForm": _vm.commentObj
  2678. },
  2679. on: {
  2680. "update:loading": function ($event) {
  2681. _vm.pdfLoading = $event;
  2682. }
  2683. }
  2684. }), _vm._v(" "), _c('p', {
  2685. staticClass: "tips"
  2686. }, [_vm._v("Change default standard comment:")]), _vm._v(" "), _c('el-input', {
  2687. model: {
  2688. value: _vm.commentObj.Comments,
  2689. callback: function ($$v) {
  2690. _vm.$set(_vm.commentObj, "Comments", $$v);
  2691. },
  2692. expression: "commentObj.Comments"
  2693. }
  2694. }), _vm._v(" "), _c('div', {
  2695. staticClass: "btn-wrap"
  2696. }, [_c('el-button', {
  2697. staticClass: "button-black button-margin",
  2698. attrs: {
  2699. "size": "medium",
  2700. "loading": _vm.pdfLoading
  2701. },
  2702. on: {
  2703. "click": _vm.handleDownloadPdf
  2704. }
  2705. }, [_vm._v("Download")])], 1)], 1), _vm._v(" "), _c('price-to-img', {
  2706. directives: [{
  2707. name: "show",
  2708. rawName: "v-show",
  2709. value: false,
  2710. expression: "false"
  2711. }],
  2712. ref: "pdf",
  2713. attrs: {
  2714. "loading": _vm.pdfLoading,
  2715. "pageData": _vm.pageData,
  2716. "specificationsObj": _vm.specificationsObj,
  2717. "tableData": _vm.comFilterSwitchSellData,
  2718. "tableColumns": _vm.comMergeColumns,
  2719. "comLocationNum": _vm.comLocationNum,
  2720. "emailForm": _vm.commentObj
  2721. },
  2722. on: {
  2723. "update:loading": function ($event) {
  2724. _vm.pdfLoading = $event;
  2725. }
  2726. }
  2727. }), _vm._v(" "), _c('dialog-XX-success', {
  2728. attrs: {
  2729. "visible": _vm.xxContentVisible,
  2730. "imgType": false,
  2731. "content": 'This quantity is below the MOQ for this product'
  2732. },
  2733. on: {
  2734. "update:visible": function ($event) {
  2735. _vm.xxContentVisible = $event;
  2736. }
  2737. }
  2738. })], 1) : _vm._e()])], 2);
  2739. };
  2740. var staticRenderFns = [];
  2741. // CONCATENATED MODULE: ./components/product/Quote.vue?vue&type=template&id=21f896fd&scoped=true
  2742. // EXTERNAL MODULE: external "vuex"
  2743. var external_vuex_ = __webpack_require__(6);
  2744. // EXTERNAL MODULE: external "lodash"
  2745. var external_lodash_ = __webpack_require__(141);
  2746. var external_lodash_default = /*#__PURE__*/__webpack_require__.n(external_lodash_);
  2747. // EXTERNAL MODULE: external "number-precision"
  2748. var external_number_precision_ = __webpack_require__(122);
  2749. // EXTERNAL MODULE: ./components/table/NewPriceTable.vue + 4 modules
  2750. var NewPriceTable = __webpack_require__(198);
  2751. // EXTERNAL MODULE: ./components/table/TotalTable.vue + 4 modules
  2752. var TotalTable = __webpack_require__(199);
  2753. // EXTERNAL MODULE: ./components/table/UnitTable.vue + 4 modules
  2754. var UnitTable = __webpack_require__(200);
  2755. // EXTERNAL MODULE: ./components/table/MailTable.vue + 4 modules
  2756. var MailTable = __webpack_require__(201);
  2757. // EXTERNAL MODULE: ./components/DIalogXXSuccess.vue + 4 modules
  2758. var DIalogXXSuccess = __webpack_require__(30);
  2759. // 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
  2760. /* harmony default export */ var Quotevue_type_script_lang_js = ({
  2761. components: {
  2762. NewPriceTable: NewPriceTable["default"],
  2763. TotalTable: TotalTable["default"],
  2764. UnitTable: UnitTable["default"],
  2765. MailTable: MailTable["default"],
  2766. 'dialog-XX-success': DIalogXXSuccess["default"]
  2767. },
  2768. props: {
  2769. pageData: {
  2770. type: Object,
  2771. default: () => {
  2772. return {};
  2773. }
  2774. },
  2775. id: {
  2776. type: Number,
  2777. default: null
  2778. }
  2779. },
  2780. data() {
  2781. return {
  2782. quoteLoadState: 0,
  2783. curWeek: 0,
  2784. allPrintTab: [],
  2785. priceList: [],
  2786. initZeroObj: {},
  2787. initSetupObj: {},
  2788. initUnitObj: {},
  2789. initChangeUnitObj: {},
  2790. initFrightObj: {},
  2791. initTotalObj: {},
  2792. xxContentVisible: false,
  2793. setup_switch: false,
  2794. freight_switch: false,
  2795. weight: {},
  2796. undecorated_columns: [{
  2797. label: 'MODEL',
  2798. prop: 'model',
  2799. type: 'text',
  2800. align: 'left',
  2801. width: 150,
  2802. extraWidth: 50,
  2803. // 配合组件 (820-tableColumns[0].width-tableColumns[0].extraWidth)/(tableColumns.length-1)
  2804. isFirstColumn: true // 去掉$符号
  2805. }, {
  2806. label: 'SETUP',
  2807. prop: 'website_setup'
  2808. }],
  2809. decoration_columns: [{
  2810. label: 'PRINT OPTION',
  2811. prop: 'dec_code',
  2812. type: 'radioInput',
  2813. align: 'left',
  2814. width: 150,
  2815. extraWidth: 50
  2816. }, {
  2817. label: 'SETUP',
  2818. prop: 'website_setup'
  2819. }],
  2820. addon_columns: [{
  2821. label: 'Addon',
  2822. prop: 'name',
  2823. type: 'text',
  2824. width: 150,
  2825. extraWidth: 50,
  2826. isFirstColumn: true // 去掉$符号
  2827. }, {
  2828. label: 'Setup',
  2829. prop: 'website_setup'
  2830. }],
  2831. buy_columns: [{
  2832. label: 'QTY',
  2833. prop: 'project',
  2834. isFirstColumn: true // 去掉$符号
  2835. }],
  2836. unit_columns: [{
  2837. label: 'QTY',
  2838. prop: 'total',
  2839. align: 'left',
  2840. isText: true
  2841. }],
  2842. buyData: [{
  2843. project: 'Setup'
  2844. }, {
  2845. project: 'Unit'
  2846. }, {
  2847. project: 'Freight'
  2848. }, {
  2849. project: 'Total'
  2850. }],
  2851. unitData: [{
  2852. total: 'Unit Rate %'
  2853. }, {
  2854. total: 'Setup %'
  2855. }, {
  2856. total: 'Freight %'
  2857. }],
  2858. sellData: [{
  2859. project: 'Postcode',
  2860. summary: '-'
  2861. }, {
  2862. project: 'Setup',
  2863. summary: 0.00
  2864. }, {
  2865. project: 'Unit',
  2866. summary: 0.00
  2867. }, {
  2868. project: 'Freight',
  2869. summary: 0.00
  2870. }, {
  2871. project: 'Total',
  2872. summary: 0.00
  2873. }],
  2874. POA_Config: ['111', '111.00', '999', '999.00'],
  2875. enquiryFormVisible: false,
  2876. enquiryForm: {
  2877. Name: '',
  2878. Email: '',
  2879. Phone: '',
  2880. 'Customer manager': null,
  2881. Comments: ''
  2882. },
  2883. enquiryConfig: [{
  2884. prop: 'Name',
  2885. type: 'input'
  2886. }, {
  2887. prop: 'Email',
  2888. type: 'input'
  2889. }, {
  2890. prop: 'Phone',
  2891. type: 'input'
  2892. }, {
  2893. prop: 'Customer manager',
  2894. type: 'select',
  2895. selectlist: [],
  2896. isShow: true
  2897. }, {
  2898. prop: 'Comments',
  2899. type: 'textarea'
  2900. }],
  2901. rules: {
  2902. Name: [{
  2903. required: true,
  2904. message: 'Please enter',
  2905. trigger: 'blur'
  2906. }],
  2907. Email: [{
  2908. required: true,
  2909. message: 'Please enter the correct format',
  2910. pattern: /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((.[a-zA-Z0-9_-]{2,3}){1,2})$/,
  2911. trigger: 'blur'
  2912. }],
  2913. Phone: [{
  2914. required: true,
  2915. message: 'Please enter the correct format',
  2916. // pattern: /^1[0-9]{10}$/,
  2917. trigger: 'blur'
  2918. }],
  2919. 'Customer manager': [{
  2920. required: true,
  2921. message: 'Please select',
  2922. trigger: 'change'
  2923. }]
  2924. },
  2925. mailData: {
  2926. Url: ''
  2927. },
  2928. priceToImgVisible: false,
  2929. downloadDialogVisible: false,
  2930. commentObj: {
  2931. 'Email Address': '',
  2932. Comments: ''
  2933. },
  2934. enquiryConfig1: [{
  2935. prop: 'Email Address',
  2936. type: 'input'
  2937. }, {
  2938. prop: 'Comments',
  2939. type: 'input'
  2940. }],
  2941. rules1: {
  2942. 'Email Address': [{
  2943. required: true,
  2944. message: 'Please enter the correct format',
  2945. pattern: /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((.[a-zA-Z0-9_-]{2,3}){1,2})$/,
  2946. trigger: 'blur'
  2947. }]
  2948. },
  2949. specificationsObj: {
  2950. time: null,
  2951. model: null,
  2952. decoration: null,
  2953. addonArr: null
  2954. },
  2955. pdfLoading: false
  2956. };
  2957. },
  2958. computed: {
  2959. ...Object(external_vuex_["mapState"])('config', {
  2960. configInfo: state => state.configInfo
  2961. }),
  2962. userInfo() {
  2963. return this.$store.state.userInfo;
  2964. },
  2965. comCurWeekPrice() {
  2966. return this.priceList[this.curWeek] || {};
  2967. },
  2968. comCurPrint() {
  2969. return this.comCurWeekPrice.curPrint;
  2970. },
  2971. comCurBasePrice() {
  2972. return this.comCurWeekPrice.basePrice[this.comCurPrint];
  2973. },
  2974. comLocationNum() {
  2975. return +this.comCurWeekPrice.basePrice[this.comCurPrint].locationNum;
  2976. },
  2977. comCurBaseColumns() {
  2978. return this.comCurBasePrice.part_columns;
  2979. },
  2980. comCurBaseTotalColumns() {
  2981. const d = this.comCurWeekPrice.basePrice[this.comCurPrint].total_part_columns;
  2982. const n = this.comLocationNum;
  2983. if (n === 1) {
  2984. return d;
  2985. } else {
  2986. const concatAdd = [...d, ...this.comCurWeekPrice.basePrice[this.comCurPrint].remainingAttr].slice(0, n);
  2987. return concatAdd;
  2988. }
  2989. },
  2990. comTotalLabel() {
  2991. // 计算所有元素label的和
  2992. return this.comCurBaseTotalColumns.reduce((sum, item) => sum + Number(item.label), 0);
  2993. },
  2994. comSummaryColumns() {
  2995. return [{
  2996. label: this.comTotalLabel.toString(),
  2997. prop: 'summary'
  2998. }];
  2999. },
  3000. comAttributeList() {
  3001. var _this$comCurBaseTotal;
  3002. const obj = {};
  3003. (_this$comCurBaseTotal = this.comCurBaseTotalColumns) === null || _this$comCurBaseTotal === void 0 ? void 0 : _this$comCurBaseTotal.forEach(item => {
  3004. obj[item.prop] = item.label;
  3005. });
  3006. obj.summary = this.comTotalLabel;
  3007. return obj;
  3008. },
  3009. // 当前已选基础价
  3010. comBasePrice() {
  3011. return this.comCurBasePrice.selectBaseRow;
  3012. },
  3013. // 当前累加打印价
  3014. comDecoPrice() {
  3015. var _this$comCurWeekPrice;
  3016. if (!((_this$comCurWeekPrice = this.comCurWeekPrice.decoration) !== null && _this$comCurWeekPrice !== void 0 && _this$comCurWeekPrice.length)) {
  3017. return [];
  3018. }
  3019. const arr = this.comCurWeekPrice.decoration.map((item, idx) => {
  3020. const obj = {};
  3021. if (+item.num > 0) {
  3022. for (const i in this.initUnitObj) {
  3023. if (idx === 0) {
  3024. // 首个打印价要取附加价计算
  3025. const keyArr = i.split('_');
  3026. const supplier_val = item[`supplier_${keyArr[1]}`];
  3027. if (this.POA_Config.includes(supplier_val)) {
  3028. obj[`${i}`] = supplier_val;
  3029. } else {
  3030. obj[`${i}`] = Object(external_number_precision_["times"])(+supplier_val, item.num);
  3031. }
  3032. } else {
  3033. obj[`${i}`] = this.POA_Config.includes(item[i]) ? item[i] : Object(external_number_precision_["times"])(+item[i], item.num);
  3034. }
  3035. }
  3036. }
  3037. return obj;
  3038. }).filter(obj => Object.keys(obj).length !== 0);
  3039. return arr;
  3040. },
  3041. comBuyData() {
  3042. this.calculateBuyData();
  3043. return this.buyData;
  3044. },
  3045. comNoSumCol() {
  3046. return [...this.buy_columns, ...this.comCurBaseTotalColumns];
  3047. },
  3048. comHasSumCol() {
  3049. return [...this.buy_columns, ...this.comCurBaseTotalColumns, ...this.comSummaryColumns];
  3050. },
  3051. comMergeColumns() {
  3052. return this.comLocationNum == 1 ? this.comNoSumCol : this.comHasSumCol;
  3053. },
  3054. comSellData() {
  3055. if (Object.keys(this.comAttributeList).length !== 0) {
  3056. this.calculateSellData();
  3057. }
  3058. return this.sellData;
  3059. },
  3060. comFilterSwitchSellData() {
  3061. var _this$comSellData;
  3062. return (_this$comSellData = this.comSellData) === null || _this$comSellData === void 0 ? void 0 : _this$comSellData.filter((item, i) => {
  3063. if (i === 1 && this.setup_switch) {
  3064. return false;
  3065. } else if (i === 3 && this.freight_switch) {
  3066. return false;
  3067. } else {
  3068. return item;
  3069. }
  3070. });
  3071. }
  3072. },
  3073. methods: {
  3074. ...Object(external_vuex_["mapActions"])(['getUserInfo']),
  3075. getQuote() {
  3076. this.$axios.post('/uk-api/quote/pricequote', {
  3077. id: this.id
  3078. }).then(res => {
  3079. if (localStorage.getItem('unit')) {
  3080. this.unitData = JSON.parse(localStorage.getItem('unit'));
  3081. }
  3082. const {
  3083. attributeList,
  3084. priceList,
  3085. default: defaultID
  3086. } = res.result;
  3087. if (!Object.keys(attributeList).length || !Object.keys(priceList).length) {
  3088. this.quoteLoadState = 2;
  3089. return;
  3090. }
  3091. for (const a in attributeList) {
  3092. // 过滤掉website_qty标签无数量
  3093. if (attributeList[a]) {
  3094. this.initZeroObj[a] = 0;
  3095. } else {
  3096. delete attributeList[a];
  3097. }
  3098. for (const unit of this.unitData) {
  3099. // 如果对象中缺少 attributeList 的 key,则设置为 40
  3100. if (!(a in unit) || unit[a] === '') {
  3101. this.$set(unit, a, 40);
  3102. }
  3103. }
  3104. }
  3105. // 格式化数据,对象改成数组
  3106. for (const keys in priceList) {
  3107. const vals = {};
  3108. const {
  3109. decoration,
  3110. additionlist,
  3111. ...remaining
  3112. } = priceList[keys];
  3113. vals.basePrice = [];
  3114. vals.selectAdditionRow = [];
  3115. vals.curPrint = 0;
  3116. vals.name = this.formatDurationString(keys);
  3117. vals.nameOrigin = keys;
  3118. vals.decorationOrign = [...decoration];
  3119. vals.decorationID = decoration.map(i => i.id);
  3120. vals.decoration = [...decoration].flatMap(item => {
  3121. const result = [];
  3122. if (item.max_color > 0) {
  3123. result.push({
  3124. ...item,
  3125. max_num: item.max_color,
  3126. id: `${item.id}-1`,
  3127. decName: item.max_color_name
  3128. });
  3129. }
  3130. if (item.max_point > 0) {
  3131. result.push({
  3132. ...item,
  3133. max_num: item.max_point,
  3134. id: `${item.id}-2`,
  3135. decName: item.max_point_name
  3136. });
  3137. }
  3138. return result;
  3139. });
  3140. vals.additionlist = additionlist;
  3141. for (const k in remaining) {
  3142. var _remaining$k, _remaining$k2;
  3143. const o = {};
  3144. o.attributeList = this.copyData(attributeList);
  3145. if (((_remaining$k = remaining[k]) === null || _remaining$k === void 0 ? void 0 : _remaining$k.length) > 1) {
  3146. // 检查数组中各元素的 website_qtyN 是否都等于 "-" or "POA",则删除key
  3147. for (const a in attributeList) {
  3148. const is111Poa = remaining[k].every(item => this.POA_Config.includes(item[a]));
  3149. if (is111Poa) {
  3150. delete o.attributeList[a];
  3151. }
  3152. }
  3153. } else if (((_remaining$k2 = remaining[k]) === null || _remaining$k2 === void 0 ? void 0 : _remaining$k2.length) === 1) {
  3154. // 判断 remaining[k][0] 中是否包含 vals.attributeList 的键,并且对应的值都等于 "-" or "POA",则不删除key
  3155. const obj = remaining[k][0];
  3156. const attributeKeys = Object.keys(o.attributeList);
  3157. const areAllKeysInPOAConfig = attributeKeys.every(key => {
  3158. return Object.prototype.hasOwnProperty.call(obj, key) && this.POA_Config.includes(obj[key]);
  3159. });
  3160. if (!areAllKeysInPOAConfig) {
  3161. attributeKeys.forEach(key => {
  3162. if (Object.prototype.hasOwnProperty.call(obj, key) && this.POA_Config.includes(obj[key])) {
  3163. delete o.attributeList[key];
  3164. }
  3165. });
  3166. }
  3167. }
  3168. o.name = k;
  3169. o.data = remaining[k];
  3170. o.locationNum = 1;
  3171. o.part_columns = Object.keys(o.attributeList).map(e => {
  3172. return {
  3173. label: o.attributeList[e].toString(),
  3174. prop: e
  3175. };
  3176. });
  3177. const freightParam = {
  3178. postcode: '',
  3179. freight_type: 1,
  3180. freight: {}
  3181. };
  3182. o.total_part_columns = this.copyData(o.part_columns).map(obj => ({
  3183. ...obj,
  3184. ...freightParam
  3185. }));
  3186. o.remainingAttr = [];
  3187. const firstColumns = {
  3188. ...o.part_columns[0],
  3189. ...freightParam
  3190. };
  3191. for (let i = 1; i < 9; i++) {
  3192. if (!Object.keys(o.attributeList).includes(`website_qty${i}`)) {
  3193. const newColumn = {
  3194. ...firstColumns
  3195. };
  3196. this.$set(newColumn, 'prop', `website_qty${i}`);
  3197. o.remainingAttr.push(newColumn);
  3198. }
  3199. }
  3200. ;
  3201. vals.basePrice.push(o);
  3202. if (!this.allPrintTab.includes(k)) {
  3203. this.allPrintTab.push(k);
  3204. }
  3205. }
  3206. this.priceList.push(vals);
  3207. }
  3208. this.priceList.forEach((options, index) => {
  3209. // 原始数据name没空格,需要映射到
  3210. if (options.nameOrigin === (defaultID === null || defaultID === void 0 ? void 0 : defaultID.name)) {
  3211. this.curWeek = index;
  3212. options.decorationOrign.forEach((opt, idx) => {
  3213. var _defaultID$decoration;
  3214. if (opt.id === (defaultID === null || defaultID === void 0 ? void 0 : (_defaultID$decoration = defaultID.decoration) === null || _defaultID$decoration === void 0 ? void 0 : _defaultID$decoration.id)) {
  3215. this.$set(options, 'curPrint', idx);
  3216. }
  3217. });
  3218. }
  3219. // 所有周期的所有打印,进来页面时默认勾选第一条价格
  3220. options.basePrice.forEach((opt, idx) => {
  3221. var _options$decorationOr, _options$decorationOr2;
  3222. this.$set(opt, 'selectBaseRow', opt.data[0] || {});
  3223. 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 || [])];
  3224. });
  3225. options.decoration.forEach(opt => {
  3226. this.$set(opt, 'num', 0);
  3227. });
  3228. });
  3229. this.initSetupObj = Object.assign({}, this.initZeroObj);
  3230. this.initUnitObj = Object.assign({}, this.initZeroObj, {
  3231. website_setup: 0
  3232. });
  3233. this.initFrightObj = Object.assign({}, this.initZeroObj);
  3234. this.buyData = this.buyData.map(item => {
  3235. return {
  3236. ...item,
  3237. ...this.initSetupObj
  3238. };
  3239. });
  3240. this.sellData = this.sellData.map(item => {
  3241. return {
  3242. ...item,
  3243. ...this.initSetupObj
  3244. };
  3245. });
  3246. this.quoteLoadState = 1;
  3247. }).catch(e => {
  3248. console.log('this.quoteLoadState1: ', e);
  3249. this.quoteLoadState = 2;
  3250. });
  3251. },
  3252. formatDurationString(input) {
  3253. // 匹配数字和字符串的正则表达式
  3254. const regex = /(\d+)([a-zA-Z]+)/g;
  3255. const result = input.replace(regex, '$1 $2');
  3256. return result;
  3257. },
  3258. // getWeight() {
  3259. // this.$axios
  3260. // .post('/api/quote/weight', { id: this.id })
  3261. // .then(res => {
  3262. // this.weight = res.result
  3263. // })
  3264. // .catch(() => {})
  3265. // },
  3266. // getFreight(k) {
  3267. // const postcode = this.comCurBaseTotalColumns[k].postcode
  3268. // const type = this.comCurBaseTotalColumns[k].freight_type
  3269. // const init = { basic:0,pickup:0,minimum:0 }
  3270. // if (postcode.length < 3) {
  3271. // this.comCurBaseTotalColumns[k].freight = init
  3272. // return
  3273. // }
  3274. // this.$axios
  3275. // .post('/api/quote/freight', {
  3276. // postcode,
  3277. // type
  3278. // })
  3279. // .then(res => {
  3280. // this.comCurBaseTotalColumns[k].freight = Array.isArray(res.result)?init:res.result
  3281. // })
  3282. // },
  3283. getDebFreight: external_lodash_default.a.debounce(function (k) {
  3284. this.getFreight(k);
  3285. }, 200),
  3286. getNumber(e, row, min) {
  3287. if (parseInt(e.target.value) < min) {
  3288. this.xxContentVisible = true;
  3289. row.label = min;
  3290. } else {
  3291. this.xxContentVisible = false;
  3292. }
  3293. },
  3294. sortBy(items) {
  3295. // items.decoration.sort(this.customSort(items.decorationID))
  3296. // const targetElement = items.decoration.splice(items.curPrint, 1)[0]
  3297. // items.decoration.unshift(targetElement)
  3298. },
  3299. // 按原打印数组的id字段排序
  3300. customSort(decorationID) {
  3301. return (a, b) => {
  3302. return decorationID.indexOf(a.id) - decorationID.indexOf(b.id);
  3303. };
  3304. },
  3305. dividePrice(a) {
  3306. return Object(external_number_precision_["divide"])(+a, 100);
  3307. },
  3308. // openMailDialog() {
  3309. // if (this.$utils.checkLogin()) {
  3310. // this.getUserInfo()
  3311. // const { contacts, email, phone, crm_users_id:crmUsersId } = this.userInfo
  3312. // this.enquiryForm.Name = contacts
  3313. // this.enquiryForm.Email = email
  3314. // this.enquiryForm.Phone = phone
  3315. // if (crmUsersId?.length) {
  3316. // this.enquiryConfig[3].selectlist = crmUsersId
  3317. // if (crmUsersId?.length === 1) {
  3318. // this.enquiryForm['Customer manager'] = crmUsersId[0].name
  3319. // }
  3320. // } else {
  3321. // this.enquiryConfig[3].isShow = false
  3322. // this.$delete(this.enquiryForm, 'Customer manager')
  3323. // }
  3324. // this.enquiryFormVisible = true
  3325. // } else {
  3326. // this.openDialog()
  3327. // }
  3328. // },
  3329. getMailData() {
  3330. this.mailData.Url = window.location.href;
  3331. const {
  3332. Name,
  3333. Email,
  3334. Phone,
  3335. Comments
  3336. } = this.enquiryForm;
  3337. this.mailData['Customer Name'] = Name;
  3338. this.mailData['Customer Email'] = Email;
  3339. this.mailData['Customer Phone'] = Phone;
  3340. this.mailData.Comments = Comments;
  3341. const {
  3342. email,
  3343. level,
  3344. createTime
  3345. } = this.userInfo;
  3346. this.mailData['Member Account'] = email;
  3347. this.mailData['Member Grade'] = level.name;
  3348. this.mailData['Member Registration time'] = createTime;
  3349. this.mailData['Quote time'] = this.$utils.formatTime(new Date());
  3350. },
  3351. // 发送价格邮件 Enquiry按钮
  3352. // async sendPriceMail() {
  3353. // await this.getMailData()
  3354. // await this.getCustomerQuoteData()
  3355. // const {
  3356. // Name,
  3357. // Email,
  3358. // Phone,
  3359. // Comments,
  3360. // 'Customer manager': customerManager,
  3361. // } = this.enquiryForm
  3362. // this.$axios
  3363. // .post('/uk-api/quote/sendenquiry', {
  3364. // content: this.$refs.mailtable.$el.innerHTML,
  3365. // name: Name,
  3366. // email: Email,
  3367. // phone: Phone,
  3368. // customer_manager: customerManager || '',
  3369. // url: this.mailData.Url,
  3370. // product_code: this.pageData.product_code,
  3371. // comments: Comments,
  3372. // member_id: this.userInfo.id,
  3373. // })
  3374. // .then(res => {
  3375. // this.setLoading(false)
  3376. // this.enquiryFormVisible = false
  3377. // this.$confirm('Enquiry Sent', {
  3378. // confirmButtonText: 'OK',
  3379. // showCancelButton: false,
  3380. // type: 'success',
  3381. // center: true,
  3382. // showClose: false,
  3383. // confirmButtonClass: 'com-btnblack',
  3384. // }).then(() => {})
  3385. // })
  3386. // .catch(() => {
  3387. // this.setLoading(false)
  3388. // })
  3389. // },
  3390. // getCustomerQuoteData() {
  3391. // const { name, selectAdditionRow } = this.comCurWeekPrice
  3392. // this.specificationsObj.time = name
  3393. // this.specificationsObj.model = this.comBasePrice.model
  3394. // this.specificationsObj.decoration = this.comCurBasePrice.name
  3395. // if (selectAdditionRow.length) {
  3396. // this.specificationsObj.addonArr = selectAdditionRow.map(
  3397. // item => item.name
  3398. // )
  3399. // } else {
  3400. // this.specificationsObj.addonArr = null
  3401. // }
  3402. // },
  3403. // openDownloadDialog(type) {
  3404. // this.getCustomerQuoteData()
  3405. // type
  3406. // ? (this.downloadDialogVisible = true)
  3407. // : (this.priceToImgVisible = true)
  3408. // },
  3409. handleDownloadPdf() {
  3410. this.pdfLoading = true;
  3411. this.$nextTick(() => {
  3412. this.$refs.priceToImgRef.htmlToPdf(this.pageData.product_code);
  3413. });
  3414. },
  3415. // 发送PDF邮件
  3416. // sendPdfMail() {
  3417. // this.$axios
  3418. // .post('/api/quote/sendpdf', {
  3419. // content: this.$refs.pdf.$el.innerHTML,
  3420. // product_code: this.pageData.product_code,
  3421. // email: this.commentObj['Email Address'],
  3422. // })
  3423. // .then(res => {
  3424. // this.setLoading(false)
  3425. // this.downloadDialogVisible = false
  3426. // this.$confirm('Enquiry Sent', {
  3427. // confirmButtonText: 'OK',
  3428. // showCancelButton: false,
  3429. // type: 'success',
  3430. // center: true,
  3431. // showClose: false,
  3432. // confirmButtonClass: 'com-btnblack',
  3433. // })
  3434. // })
  3435. // .catch(() => {
  3436. // this.setLoading(false)
  3437. // })
  3438. // },
  3439. copyData(data) {
  3440. return JSON.parse(JSON.stringify(data));
  3441. },
  3442. calculateBuyData() {
  3443. const selPriceArr = [];
  3444. if (JSON.stringify(this.comBasePrice) !== '{}') {
  3445. selPriceArr.push(this.comBasePrice);
  3446. }
  3447. selPriceArr.push(...this.comDecoPrice, ...this.comCurWeekPrice.selectAdditionRow);
  3448. if (selPriceArr.length === 0) {
  3449. this.buyData = this.buyData.map(item => ({
  3450. ...item,
  3451. ...this.initZeroObj
  3452. }));
  3453. return;
  3454. }
  3455. // 累加所选,初始数量对应的单价。赋值给this.initUnitObj
  3456. for (const i in this.initUnitObj) {
  3457. const columnSum = this.copyData(selPriceArr).reduce(function (prev, cur) {
  3458. if (cur[i] === '111' || cur[i] === '111.00') {
  3459. return cur[i] = '-';
  3460. } else if (cur[i] === '999' || cur[i] === '999.00') {
  3461. return cur[i] = 'POA';
  3462. } else {
  3463. // 当基础价格是-POA,后续累加价格是正常数字价,依然返回-POA
  3464. if (prev === '-' || prev === 'POA') {
  3465. return prev;
  3466. }
  3467. return Object(external_number_precision_["plus"])(+cur[i], prev).toFixed(2);
  3468. }
  3469. }, 0);
  3470. this.$set(this.initUnitObj, i, columnSum);
  3471. }
  3472. for (const a in this.comAttributeList) {
  3473. // 每次更改选择价格,必须遍历整个comAttributeList
  3474. const tempIdx = this.comCurBaseColumns.findIndex(items => +this.comAttributeList[a] < +items.label);
  3475. if (tempIdx > 0) {
  3476. const key = this.comCurBaseColumns[tempIdx - 1].prop;
  3477. this.$set(this.initChangeUnitObj, a, this.initUnitObj[key]);
  3478. } else {
  3479. const length = this.comCurBaseColumns.length;
  3480. const key = this.comCurBaseColumns[length - 1].prop;
  3481. this.$set(this.initChangeUnitObj, a, this.initUnitObj[key]);
  3482. }
  3483. if (this.initChangeUnitObj[a] === 'POA' || this.initChangeUnitObj[a] === '-') {
  3484. this.$set(this.initSetupObj, a, this.initChangeUnitObj[a]);
  3485. this.$set(this.initFrightObj, a, this.initChangeUnitObj[a]);
  3486. } else {
  3487. this.$set(this.initSetupObj, a, this.initUnitObj.website_setup);
  3488. // 计算运费
  3489. // 单独批次数量的总重
  3490. // weight定义是{},后端没数据传回[]
  3491. const unitWLocal = this.weight.unit_w_local ? +this.weight.unit_w_local : 0;
  3492. const totalWeight = Math.ceil(Object(external_number_precision_["times"])(unitWLocal, this.comAttributeList[a]));
  3493. // Road express 1 AAE:AAEFactor 2
  3494. const setupFuel = this.dividePrice(this.configInfo.fuel);
  3495. const setupBagFreight = this.dividePrice(this.configInfo.bag_freight);
  3496. const setupExpressFreight = this.dividePrice(this.configInfo.express_freight);
  3497. const AAEFactor = Object(external_number_precision_["plus"])(1, setupBagFreight, setupFuel);
  3498. const expressFactor = Object(external_number_precision_["plus"])(1, setupExpressFreight, setupFuel);
  3499. let frightCost = 0;
  3500. let freightType;
  3501. let postcode;
  3502. let freight = {};
  3503. const matchIndex = this.comCurBaseTotalColumns.findIndex(item => item.prop === a);
  3504. // 1,所有按第一个运费统计;不为1,则只计算 comCurBaseTotalColumns的[地址数]长度
  3505. if (+this.comLocationNum === 1 || this.comLocationNum >= matchIndex + 1) {
  3506. ({
  3507. freight,
  3508. freight_type: freightType,
  3509. postcode
  3510. } = this.comCurBaseTotalColumns[+this.comLocationNum === 1 ? 0 : matchIndex] || {});
  3511. }
  3512. if (freightType === 1 && postcode >= 3) {
  3513. if (totalWeight > 20) {
  3514. const a1 = Object(external_number_precision_["minus"])(totalWeight, 20);
  3515. const a2 = Object(external_number_precision_["times"])(a1, +freight.basic);
  3516. const a3 = Object(external_number_precision_["plus"])(+freight.pickup, a2);
  3517. frightCost = Object(external_number_precision_["times"])(a3, expressFactor);
  3518. } else {
  3519. frightCost = Object(external_number_precision_["times"])(+freight.pickup, expressFactor);
  3520. }
  3521. } else if (freightType === 2 && postcode >= 3) {
  3522. const a1 = Object(external_number_precision_["divide"])(totalWeight, 5);
  3523. const a2 = Object(external_number_precision_["times"])(+freight.minimum, Math.ceil(a1));
  3524. frightCost = Object(external_number_precision_["times"])(a2, AAEFactor);
  3525. } else {
  3526. frightCost = 0;
  3527. }
  3528. this.$set(this.initFrightObj, a, Math.ceil(frightCost).toFixed(2));
  3529. }
  3530. if (this.initChangeUnitObj[a] === '-' || this.initChangeUnitObj[a] === 'POA') {
  3531. this.$set(this.initTotalObj, a, this.initChangeUnitObj[a]);
  3532. } else {
  3533. const unitQTY = Object(external_number_precision_["times"])(this.initChangeUnitObj[a], this.comAttributeList[a]);
  3534. this.$set(this.initTotalObj, a, Object(external_number_precision_["plus"])(this.initUnitObj.website_setup, unitQTY, this.initFrightObj[a]).toFixed(2));
  3535. }
  3536. if (this.setup_switch) {
  3537. // 业务:Setup价格/对应数量后向上取整
  3538. if (this.initChangeUnitObj[a] === '-' || this.initChangeUnitObj[a] === 'POA') {
  3539. this.$set(this.initChangeUnitObj, a, this.initChangeUnitObj[a]);
  3540. } else {
  3541. const num = Math.ceil(this.initSetupObj[a] / this.comAttributeList[a] * 100) / 100;
  3542. this.$set(this.initChangeUnitObj, a, Object(external_number_precision_["plus"])(this.initChangeUnitObj[a], num).toFixed(2));
  3543. }
  3544. }
  3545. if (this.freight_switch) {
  3546. if (this.initChangeUnitObj[a] === '-' || this.initChangeUnitObj[a] === 'POA') {
  3547. this.$set(this.initChangeUnitObj, a, this.initChangeUnitObj[a]);
  3548. } else {
  3549. const num = Math.ceil(this.initFrightObj[a] / this.comAttributeList[a] * 100) / 100;
  3550. this.$set(this.initChangeUnitObj, a, Object(external_number_precision_["plus"])(this.initChangeUnitObj[a], num).toFixed(2));
  3551. }
  3552. }
  3553. }
  3554. if (this.setup_switch) {
  3555. this.$set(this.buyData, 0, {
  3556. ...this.buyData[0],
  3557. ...this.initZeroObj,
  3558. ...{
  3559. 'summary': 0.00
  3560. }
  3561. });
  3562. } else {
  3563. this.$set(this.buyData, 0, {
  3564. ...this.buyData[0],
  3565. ...this.initSetupObj
  3566. });
  3567. }
  3568. this.$set(this.buyData, 1, {
  3569. ...this.buyData[1],
  3570. ...this.initChangeUnitObj
  3571. });
  3572. if (this.freight_switch) {
  3573. this.$set(this.buyData, 2, {
  3574. ...this.buyData[2],
  3575. ...this.initZeroObj
  3576. });
  3577. } else {
  3578. this.$set(this.buyData, 2, {
  3579. ...this.buyData[2],
  3580. ...this.initFrightObj
  3581. });
  3582. }
  3583. this.$set(this.buyData, 3, {
  3584. ...this.buyData[3],
  3585. ...this.initTotalObj
  3586. });
  3587. },
  3588. calculateSellData() {
  3589. // 放置comSellData计算和副作用的代码
  3590. const buySetup = this.comBuyData[0];
  3591. const buyUnit = this.comBuyData[1];
  3592. const buyFright = this.comBuyData[2];
  3593. let frightSummary = 0;
  3594. for (const i in this.comAttributeList) {
  3595. if (buyUnit[i] === '-' || buyUnit[i] === 'POA') {
  3596. this.sellData[0][i] = '-';
  3597. this.sellData[1][i] = buyUnit[i];
  3598. this.sellData[2][i] = buyUnit[i];
  3599. this.sellData[3][i] = buyUnit[i];
  3600. this.sellData[4][i] = buyUnit[i];
  3601. } else {
  3602. var _this$comCurBaseTotal2;
  3603. const item = this.comLocationNum === 1 ? this.comCurBaseTotalColumns[0] : this.comCurBaseTotalColumns.find(element => element.prop === i);
  3604. this.sellData[0][i] = item && item.postcode !== '' ? item.postcode : '-';
  3605. // 分别乘以Markup %表格
  3606. const key = (_this$comCurBaseTotal2 = this.comCurBaseTotalColumns[0]) === null || _this$comCurBaseTotal2 === void 0 ? void 0 : _this$comCurBaseTotal2.prop;
  3607. if (this.unitData[1] && this.unitData[1][key]) {
  3608. const a = Object(external_number_precision_["plus"])(this.unitData[1][key] / 100, 1);
  3609. this.sellData[1][i] = Object(external_number_precision_["times"])(buySetup[i], a).toFixed(2);
  3610. } else {
  3611. this.sellData[1][i] = buySetup[i];
  3612. }
  3613. if (this.unitData[0][i]) {
  3614. const a = Object(external_number_precision_["plus"])(this.unitData[0][i] / 100, 1);
  3615. this.sellData[2][i] = Object(external_number_precision_["times"])(buyUnit[i], a).toFixed(2);
  3616. } else {
  3617. this.sellData[2][i] = buyUnit[i];
  3618. }
  3619. if (this.unitData[2] && this.unitData[2][key]) {
  3620. const a = Object(external_number_precision_["plus"])(this.unitData[2][key] / 100, 1);
  3621. this.sellData[3][i] = Object(external_number_precision_["times"])(buyFright[i], a).toFixed(2);
  3622. // freight_switch会使qty的运费=0无法计算,故用了initFrightObj
  3623. const fa = Object(external_number_precision_["times"])(this.initFrightObj[i], a);
  3624. frightSummary = Object(external_number_precision_["plus"])(frightSummary, fa).toFixed(2);
  3625. } else {
  3626. this.sellData[3][i] = buyFright[i];
  3627. frightSummary = Object(external_number_precision_["plus"])(frightSummary, this.initFrightObj[i]).toFixed(2);
  3628. }
  3629. const unitQTY = Object(external_number_precision_["times"])(this.sellData[2][i], this.comAttributeList[i]);
  3630. this.$set(this.sellData[4], i, Object(external_number_precision_["plus"])(this.sellData[1][i], unitQTY, this.sellData[3][i]).toFixed(2));
  3631. }
  3632. }
  3633. // 迭代加了Total列,需要统计qty的运费后才能合计运费
  3634. if (this.sellData[2].summary !== '-' && this.sellData[2].summary !== 'POA') {
  3635. if (this.freight_switch) {
  3636. const num = Math.ceil(frightSummary / this.comAttributeList.summary * 100) / 100;
  3637. this.sellData[2].summary = Object(external_number_precision_["plus"])(this.sellData[2].summary, num).toFixed(2);
  3638. this.sellData[3].summary = 0.00;
  3639. const a = Object(external_number_precision_["times"])(this.sellData[2].summary, this.comAttributeList.summary);
  3640. this.sellData[4].summary = Object(external_number_precision_["plus"])(this.sellData[1].summary, a).toFixed(2);
  3641. } else {
  3642. this.sellData[3].summary = frightSummary;
  3643. this.sellData[4].summary = Object(external_number_precision_["plus"])(frightSummary, this.sellData[4].summary).toFixed(2);
  3644. }
  3645. }
  3646. },
  3647. // 低于最小起订量 把该栏的数值重置到最小起订量
  3648. getChildIdx(idx) {
  3649. var _this$comCurBaseColum;
  3650. this.xxContentVisible = true;
  3651. this.$set(this.comCurBaseTotalColumns[idx - 1], 'label', (_this$comCurBaseColum = this.comCurBaseColumns[0]) === null || _this$comCurBaseColum === void 0 ? void 0 : _this$comCurBaseColum.label);
  3652. },
  3653. setMaxNum(val) {
  3654. if (val > 7) {
  3655. this.comCurBasePrice.locationNum = 7;
  3656. } else if (val < 1) {
  3657. this.comCurBasePrice.locationNum = 1;
  3658. }
  3659. },
  3660. ...Object(external_vuex_["mapMutations"])({
  3661. openDialog: 'openDialog',
  3662. setLoading: 'product/setLoading'
  3663. })
  3664. }
  3665. });
  3666. // CONCATENATED MODULE: ./components/product/Quote.vue?vue&type=script&lang=js
  3667. /* harmony default export */ var product_Quotevue_type_script_lang_js = (Quotevue_type_script_lang_js);
  3668. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  3669. var componentNormalizer = __webpack_require__(2);
  3670. // CONCATENATED MODULE: ./components/product/Quote.vue
  3671. function injectStyles (context) {
  3672. var style0 = __webpack_require__(216)
  3673. if (style0.__inject__) style0.__inject__(context)
  3674. }
  3675. /* normalize component */
  3676. var component = Object(componentNormalizer["a" /* default */])(
  3677. product_Quotevue_type_script_lang_js,
  3678. render,
  3679. staticRenderFns,
  3680. false,
  3681. injectStyles,
  3682. "21f896fd",
  3683. "3f1d0f1e"
  3684. )
  3685. /* harmony default export */ var Quote = __webpack_exports__["default"] = (component.exports);
  3686. /* nuxt-component-imports */
  3687. installComponents(component, {TabNav: __webpack_require__(183).default,PriceToImg: __webpack_require__(202).default})
  3688. /***/ }),
  3689. /***/ 224:
  3690. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3691. "use strict";
  3692. // ESM COMPAT FLAG
  3693. __webpack_require__.r(__webpack_exports__);
  3694. // 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
  3695. var render = function render() {
  3696. var _vm = this,
  3697. _c = _vm._self._c;
  3698. 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) {
  3699. 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>";
  3700. }) : "<tr data-v-13093327><td rowspan=\"3\" colspan=\"4\" data-v-13093327>No Data</td></tr>") + "</tbody>")]);
  3701. };
  3702. var staticRenderFns = [];
  3703. // CONCATENATED MODULE: ./components/table/StockTable.vue?vue&type=template&id=13093327&scoped=true
  3704. // 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
  3705. /* harmony default export */ var StockTablevue_type_script_lang_js = ({
  3706. props: {
  3707. data: []
  3708. },
  3709. computed: {
  3710. comData() {
  3711. return this.data.filter(item => item.is_show);
  3712. }
  3713. }
  3714. });
  3715. // CONCATENATED MODULE: ./components/table/StockTable.vue?vue&type=script&lang=js
  3716. /* harmony default export */ var table_StockTablevue_type_script_lang_js = (StockTablevue_type_script_lang_js);
  3717. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  3718. var componentNormalizer = __webpack_require__(2);
  3719. // CONCATENATED MODULE: ./components/table/StockTable.vue
  3720. function injectStyles (context) {
  3721. var style0 = __webpack_require__(217)
  3722. if (style0.__inject__) style0.__inject__(context)
  3723. }
  3724. /* normalize component */
  3725. var component = Object(componentNormalizer["a" /* default */])(
  3726. table_StockTablevue_type_script_lang_js,
  3727. render,
  3728. staticRenderFns,
  3729. false,
  3730. injectStyles,
  3731. "13093327",
  3732. "0b092fe7"
  3733. )
  3734. /* harmony default export */ var StockTable = __webpack_exports__["default"] = (component.exports);
  3735. /***/ }),
  3736. /***/ 225:
  3737. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3738. "use strict";
  3739. // ESM COMPAT FLAG
  3740. __webpack_require__.r(__webpack_exports__);
  3741. // 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
  3742. var render = function render() {
  3743. var _vm = this,
  3744. _c = _vm._self._c;
  3745. 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) {
  3746. 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>";
  3747. }) + "</tbody>")], 2) : _vm._ssrNode("<div data-v-4c957f55>", "</div>", [_c('el-empty', {
  3748. attrs: {
  3749. "description": "No Data"
  3750. }
  3751. })], 1)]);
  3752. };
  3753. var staticRenderFns = [];
  3754. // CONCATENATED MODULE: ./components/table/ChangeTable.vue?vue&type=template&id=4c957f55&scoped=true
  3755. // 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
  3756. /* harmony default export */ var ChangeTablevue_type_script_lang_js = ({
  3757. props: {
  3758. data: {
  3759. type: Array,
  3760. default: () => []
  3761. }
  3762. }
  3763. });
  3764. // CONCATENATED MODULE: ./components/table/ChangeTable.vue?vue&type=script&lang=js
  3765. /* harmony default export */ var table_ChangeTablevue_type_script_lang_js = (ChangeTablevue_type_script_lang_js);
  3766. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  3767. var componentNormalizer = __webpack_require__(2);
  3768. // CONCATENATED MODULE: ./components/table/ChangeTable.vue
  3769. function injectStyles (context) {
  3770. var style0 = __webpack_require__(218)
  3771. if (style0.__inject__) style0.__inject__(context)
  3772. }
  3773. /* normalize component */
  3774. var component = Object(componentNormalizer["a" /* default */])(
  3775. table_ChangeTablevue_type_script_lang_js,
  3776. render,
  3777. staticRenderFns,
  3778. false,
  3779. injectStyles,
  3780. "4c957f55",
  3781. "5f45517f"
  3782. )
  3783. /* harmony default export */ var ChangeTable = __webpack_exports__["default"] = (component.exports);
  3784. /***/ }),
  3785. /***/ 236:
  3786. /***/ (function(module, exports, __webpack_require__) {
  3787. module.exports = __webpack_require__.p + "img/lineart.e4e693b.png";
  3788. /***/ }),
  3789. /***/ 237:
  3790. /***/ (function(module, exports, __webpack_require__) {
  3791. module.exports = __webpack_require__.p + "img/email.0ff3d63.png";
  3792. /***/ }),
  3793. /***/ 238:
  3794. /***/ (function(module, exports, __webpack_require__) {
  3795. module.exports = __webpack_require__.p + "img/product.718b8f1.png";
  3796. /***/ }),
  3797. /***/ 239:
  3798. /***/ (function(module, exports, __webpack_require__) {
  3799. module.exports = __webpack_require__.p + "img/cataloque.c0a544f.png";
  3800. /***/ }),
  3801. /***/ 240:
  3802. /***/ (function(module, exports, __webpack_require__) {
  3803. module.exports = __webpack_require__.p + "img/instruction.bbe58af.png";
  3804. /***/ }),
  3805. /***/ 241:
  3806. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3807. "use strict";
  3808. __webpack_require__.r(__webpack_exports__);
  3809. /* 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_3bc79372_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(219);
  3810. /* 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_3bc79372_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_3bc79372_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
  3811. /* 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_3bc79372_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_3bc79372_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  3812. /***/ }),
  3813. /***/ 293:
  3814. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3815. "use strict";
  3816. // ESM COMPAT FLAG
  3817. __webpack_require__.r(__webpack_exports__);
  3818. // 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=3bc79372&scoped=true
  3819. var render = function render() {
  3820. var _vm$pageData$main$ima, _vm$pageData$main, _vm$pageData$main2, _vm$productImgArr, _vm$pageData$goodsCom;
  3821. var _vm = this,
  3822. _c = _vm._self._c;
  3823. return _c('div', {
  3824. staticClass: "product-right"
  3825. }, [_vm._ssrNode("<div class=\"product-right-top\" data-v-3bc79372>", "</div>", [_vm._ssrNode("<div class=\"title\" data-v-3bc79372><span class=\"title-1\" data-v-3bc79372>" + _vm._ssrEscape(_vm._s(_vm.pageData.product_name)) + "</span> <span class=\"title-2\" data-v-3bc79372>" + _vm._ssrEscape(_vm._s(_vm.pageData.product_code)) + "</span> " + _vm._ssrList(_vm.pageData.cycle, function (item) {
  3826. return "<img" + _vm._ssrAttr("src", item.images) + " class=\"title-3\" data-v-3bc79372>";
  3827. }) + " " + _vm._ssrList(_vm.pageData.icon, function (item) {
  3828. return "<img" + _vm._ssrAttr("src", item.url) + " class=\"title-4\" data-v-3bc79372>";
  3829. }) + "</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-3bc79372>", "</ul>", _vm._l(_vm.pageData.main.image_color, function (item, i) {
  3830. var _item$color, _item$color2, _item$color3, _item$color4, _item$color5, _item$color6;
  3831. return _vm._ssrNode("<li data-v-3bc79372>", "</li>", [(_item$color = item.color) !== null && _item$color !== void 0 && _item$color.img ? _vm._ssrNode("<div class=\"color-item\" data-v-3bc79372>", "</div>", [_vm._ssrNode("<div" + _vm._ssrClass(null, _vm.currentPre == _vm.computedIndex(i) ? 'slip' : '') + " data-v-3bc79372>", "</div>", [_c('el-tooltip', {
  3832. attrs: {
  3833. "content": (_item$color2 = item.color) === null || _item$color2 === void 0 ? void 0 : _item$color2.name,
  3834. "placement": "top",
  3835. "effect": "dark"
  3836. }
  3837. }, [_c('img', {
  3838. attrs: {
  3839. "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
  3840. }
  3841. })])], 1)]) : _vm._e()]);
  3842. }), 0) : _vm._e(), _vm._ssrNode(" "), _c('tab-nav', {
  3843. attrs: {
  3844. "tabList": _vm.tabList,
  3845. "currTab": _vm.typeTab,
  3846. "marginTop": 15,
  3847. "fontSize": 16,
  3848. "liWidth": 130,
  3849. "liHeight": 40,
  3850. "marginRight": 5,
  3851. "marginBottom": 25
  3852. },
  3853. on: {
  3854. "update:currTab": function ($event) {
  3855. _vm.typeTab = $event;
  3856. },
  3857. "update:curr-tab": function ($event) {
  3858. _vm.typeTab = $event;
  3859. },
  3860. "handle": _vm.clickNav
  3861. }
  3862. })], 2), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"product-right-bottom\" data-v-3bc79372>", "</div>", [_vm._ssrNode("<div class=\"details\"" + _vm._ssrStyle(null, null, {
  3863. display: _vm.typeTab == 0 ? '' : 'none'
  3864. }) + " data-v-3bc79372>", "</div>", [_vm._ssrNode((_vm.pageData.feature_data ? "<div class=\"details-1\" data-v-3bc79372><h3 data-v-3bc79372>Features</h3> <ul data-v-3bc79372>" + _vm._ssrList(_vm.pageData.feature_data, function (i, key) {
  3865. return "<li data-v-3bc79372>" + _vm._ssrEscape(_vm._s(i)) + "</li>";
  3866. }) + "</ul></div>" : "<!---->") + " " + (_vm.comInfo.description ? "<div class=\"details-1\" data-v-3bc79372><h3 data-v-3bc79372>Description</h3> <p data-v-3bc79372>" + _vm._s(_vm.comInfo.description) + "</p></div>" : "<!---->") + " " + (_vm.pageData.pbo ? "<div class=\"details-2\" data-v-3bc79372><h3 data-v-3bc79372>Product Branding Information</h3> <p data-v-3bc79372>" + _vm._s(_vm.pageData.pbo) + "</p></div>" : "<!---->") + " "), _vm._ssrNode("<div class=\"details-3\" data-v-3bc79372>", "</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-3bc79372>", "</ul>", [_vm._ssrNode("<li data-v-3bc79372><div class=\"title\" data-v-3bc79372>Product Info</div></li> " + (_vm.comInfo.product_size ? "<li data-v-3bc79372><div class=\"point\" data-v-3bc79372>Product Size</div> <div class=\"info\" data-v-3bc79372>" + _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-3bc79372><div class=\"point\" data-v-3bc79372>Colour</div> <div class=\"info\" data-v-3bc79372>" + _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-3bc79372><div class=\"point\" data-v-3bc79372>Material</div> <div class=\"info\" data-v-3bc79372>" + _vm._s(_vm.comInfo.product_material) + "</div></li>" : "<!---->") + " " + (_vm.pageData.moq ? "<li data-v-3bc79372><div class=\"point\" data-v-3bc79372>MOQ</div> <div class=\"info\" data-v-3bc79372>" + _vm._s(_vm.pageData.moq) + "</div></li>" : "<!---->") + " "), _vm.comInfo.included_packaging ? _vm._ssrNode("<li data-v-3bc79372>", "</li>", [_vm._ssrNode("<div class=\"point\" data-v-3bc79372>Included Packaging</div> "), _vm._l(_vm.comIncluded_packaging, function (item, i) {
  3867. return _vm._ssrNode("<div class=\"info blue\" data-v-3bc79372>", "</div>", [_vm.isProduct(item.trim()) ? _c('nuxt-link', {
  3868. attrs: {
  3869. "to": {
  3870. name: 'product-code',
  3871. params: {
  3872. code: item.trim()
  3873. }
  3874. }
  3875. }
  3876. }, [_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);
  3877. })], 2) : _vm._e(), _vm._ssrNode(" "), _vm.comInfo.optional_packaging ? _vm._ssrNode("<li data-v-3bc79372>", "</li>", [_vm._ssrNode("<div class=\"point\" data-v-3bc79372>Optional Packaging</div> "), _vm._l(_vm.comOptional_packaging, function (item, i) {
  3878. return _vm._ssrNode("<div class=\"info blue\" data-v-3bc79372>", "</div>", [_vm.isProduct(item.trim()) ? _c('nuxt-link', {
  3879. attrs: {
  3880. "to": {
  3881. name: 'product-code',
  3882. params: {
  3883. code: item.trim()
  3884. }
  3885. }
  3886. }
  3887. }, [_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);
  3888. })], 2) : _vm._e(), _vm._ssrNode(" "), _vm.comInfo.optional_attachments ? _vm._ssrNode("<li data-v-3bc79372>", "</li>", [_vm._ssrNode("<div class=\"point\" data-v-3bc79372>Optional Attachments</div> "), _vm._ssrNode("<div class=\"info\" data-v-3bc79372>", "</div>", _vm._l(_vm.comOptional_attachments, function (item, i) {
  3889. return _c('nuxt-link', {
  3890. key: item,
  3891. attrs: {
  3892. "to": {
  3893. name: 'product-code',
  3894. params: {
  3895. code: item
  3896. }
  3897. }
  3898. }
  3899. }, [_c('span', [_vm._v(_vm._s(item)), i < _vm.comOptional_attachments.length - 1 ? _c('em', [_vm._v(",")]) : _vm._e()])]);
  3900. }), 1)], 2) : _vm._e(), _vm._ssrNode(" " + (_vm.comInfo.product_dimensions ? "<li data-v-3bc79372><div class=\"point\" data-v-3bc79372>Product dimensions</div> <div class=\"info\" data-v-3bc79372>" + _vm._s(_vm.comInfo.product_dimensions) + "</div></li>" : "<!---->") + " " + (_vm.comInfo.additional_info ? "<li data-v-3bc79372><div class=\"point\" data-v-3bc79372>Additional Info</div> <div class=\"info\" data-v-3bc79372>" + _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-3bc79372><li data-v-3bc79372><div class=\"title\" data-v-3bc79372>Print Info</div></li> " + (_vm.comInfo.print_position ? "<li data-v-3bc79372><div class=\"point\" data-v-3bc79372>Print Position</div> <div class=\"info\" data-v-3bc79372>" + _vm._s(_vm.comInfo.print_position) + "</div></li>" : "<!---->") + " " + (_vm.comInfo.print_size_area ? "<li data-v-3bc79372><div class=\"point\" data-v-3bc79372>Print Size Area</div> <div class=\"info\" data-v-3bc79372>" + _vm._s(_vm.comInfo.print_size_area) + "</div></li>" : "<!---->") + " " + (_vm.comInfo.print_marketing ? "<li data-v-3bc79372><div class=\"point\" data-v-3bc79372>Print Marketing</div> <div class=\"info\" data-v-3bc79372>" + _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-3bc79372><li data-v-3bc79372><div class=\"title\" data-v-3bc79372>Functional Info</div></li> " + (_vm.comInfo.data_services ? "<li data-v-3bc79372><div class=\"point\" data-v-3bc79372>Data Services</div> <div class=\"info\" data-v-3bc79372>" + _vm._s(_vm.comInfo.data_services) + "</div></li>" : "<!---->") + " " + (_vm.comInfo.chip_grade ? "<li data-v-3bc79372><div class=\"point\" data-v-3bc79372>Chip Grade</div> <div class=\"info\" data-v-3bc79372>" + _vm._s(_vm.comInfo.chip_grade) + "</div></li>" : "<!---->") + " " + (_vm.comInfo.certifications ? "<li data-v-3bc79372><div class=\"point\" data-v-3bc79372>Certifications</div> <div class=\"info\" data-v-3bc79372>" + _vm._s(_vm.comInfo.certifications) + "</div></li>" : "<!---->") + " " + (_vm.comInfo.capacity ? "<li data-v-3bc79372><div class=\"point\" data-v-3bc79372>Capacity</div> <div class=\"info\" data-v-3bc79372>" + _vm._s(_vm.comInfo.capacity) + "</div></li>" : "<!---->") + " " + (_vm.comInfo.warranty ? "<li data-v-3bc79372><div class=\"point\" data-v-3bc79372>Warranty</div> <div class=\"info\" data-v-3bc79372>" + _vm._s(_vm.comInfo.warranty) + "</div></li>" : "<!---->") + " " + (_vm.comInfo.battery_type ? "<li data-v-3bc79372><div class=\"point\" data-v-3bc79372>Battery Type</div> <div class=\"info\" data-v-3bc79372>" + _vm._s(_vm.comInfo.battery_type) + "</div></li>" : "<!---->") + " " + (_vm.comInfo.additional_description ? "<li data-v-3bc79372><div class=\"point\" data-v-3bc79372>Additional Info</div> <div class=\"info\" data-v-3bc79372>" + _vm._s(_vm.comInfo.additional_description) + "</div></li>" : "<!---->") + "</ul>" : "<!---->"))], 2), _vm._ssrNode(" <p class=\"details-1\" data-v-3bc79372>\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, {
  3901. display: _vm.typeTab == 1 ? '' : 'none'
  3902. }) + " data-v-3bc79372>", "</div>", [_c('quote', {
  3903. ref: "quote",
  3904. attrs: {
  3905. "pageData": _vm.pageData,
  3906. "id": _vm.id
  3907. }
  3908. })], 1), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"stock\"" + _vm._ssrStyle(null, null, {
  3909. display: false ? undefined : 'none'
  3910. }) + " data-v-3bc79372>", "</div>", [_vm.stockData.length > 0 ? _vm._ssrNode("<div data-v-3bc79372>", "</div>", [_c('stock-table', {
  3911. attrs: {
  3912. "data": _vm.stockData
  3913. }
  3914. }), _vm._ssrNode(" <p class=\"quote-tips\" data-v-3bc79372>For quantities over available stock levels, please contact us for pricing and timing</p>")], 2) : _vm._ssrNode("<div class=\"quote-tips\" data-v-3bc79372>\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, {
  3915. display: _vm.typeTab == 3 ? '' : 'none'
  3916. }) + " data-v-3bc79372><h5 data-v-3bc79372>Maketing Resource</h5> <div class=\"resources maketing\" data-v-3bc79372>" + (_vm.comInfo.line_artwork ? "<p data-v-3bc79372><img" + _vm._ssrAttr("src", __webpack_require__(236)) + " data-v-3bc79372>Lineart Download\n </p>" : "<!---->") + " " + (_vm.pageData.edm_url ? "<p data-v-3bc79372><img" + _vm._ssrAttr("src", __webpack_require__(237)) + " data-v-3bc79372>Email Digital Marketing\n </p>" : "<!---->") + " " + ((_vm$productImgArr = _vm.productImgArr) !== null && _vm$productImgArr !== void 0 && _vm$productImgArr.length ? "<p data-v-3bc79372><img" + _vm._ssrAttr("src", __webpack_require__(238)) + " data-v-3bc79372>Product Image\n </p>" : "<!---->") + " " + (_vm.pageData.cataloque_url ? "<p data-v-3bc79372><img" + _vm._ssrAttr("src", __webpack_require__(239)) + " data-v-3bc79372>Catalogue\n </p>" : "<!---->") + " " + (_vm.comInfo.product_instruction ? "<p data-v-3bc79372><img" + _vm._ssrAttr("src", __webpack_require__(240)) + " data-v-3bc79372>Product Instruction\n </p>" : "<!---->") + "</div> " + ((_vm$pageData$goodsCom = _vm.pageData.goodsCompliance) !== null && _vm$pageData$goodsCom !== void 0 && _vm$pageData$goodsCom.length ? "<h5 data-v-3bc79372>Compliance Resource</h5>" : "<!---->") + " <div class=\"resources compliance\" data-v-3bc79372>" + _vm._ssrList(_vm.pageData.goodsCompliance, function (item, i) {
  3917. var _item$filter;
  3918. return "<img" + _vm._ssrAttr("src", (_item$filter = item.filter) === null || _item$filter === void 0 ? void 0 : _item$filter.img) + " data-v-3bc79372>";
  3919. }) + "</div></div>")], 2), _vm._ssrNode(" "), _c('no-ssr', [_vm.showViewer ? _c('ElImageViewer', {
  3920. attrs: {
  3921. "on-close": _vm.closeViewer,
  3922. "url-list": _vm.productImgArr
  3923. }
  3924. }) : _vm._e()], 1)], 2);
  3925. };
  3926. var staticRenderFns = [];
  3927. // CONCATENATED MODULE: ./components/product/ProductRight.vue?vue&type=template&id=3bc79372&scoped=true
  3928. // EXTERNAL MODULE: ./components/product/Quote.vue + 4 modules
  3929. var Quote = __webpack_require__(223);
  3930. // EXTERNAL MODULE: ./components/table/StockTable.vue + 4 modules
  3931. var StockTable = __webpack_require__(224);
  3932. // EXTERNAL MODULE: ./components/table/ChangeTable.vue + 4 modules
  3933. var ChangeTable = __webpack_require__(225);
  3934. // EXTERNAL MODULE: ./node_modules/element-ui/packages/image/src/image-viewer.vue + 7 modules
  3935. var image_viewer = __webpack_require__(157);
  3936. // EXTERNAL MODULE: external "vuex"
  3937. var external_vuex_ = __webpack_require__(6);
  3938. // 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
  3939. /*eslint-disable*/
  3940. /* harmony default export */ var ProductRightvue_type_script_lang_js = ({
  3941. components: {
  3942. StockTable: StockTable["default"],
  3943. ChangeTable: ChangeTable["default"],
  3944. Quote: Quote["default"],
  3945. ElImageViewer: image_viewer["a" /* default */]
  3946. },
  3947. props: {
  3948. pageData: {},
  3949. id: Number
  3950. },
  3951. // head(){
  3952. // return {
  3953. // meta: [{ 'http-equiv': "Content-Security-Policy", content: "upgrade-insecure-requests" }]
  3954. // }
  3955. // },
  3956. data() {
  3957. return {
  3958. tabList: [{
  3959. name: 'Details',
  3960. isClick: false,
  3961. isShow: true
  3962. }, {
  3963. name: 'Quick Quote',
  3964. isClick: false,
  3965. isShow: false
  3966. }, {
  3967. name: 'Stock',
  3968. isClick: false,
  3969. isShow: false
  3970. }, {
  3971. name: 'Resources',
  3972. isClick: false,
  3973. isShow: true
  3974. }, {
  3975. name: 'Changes',
  3976. isClick: false,
  3977. isShow: false
  3978. }],
  3979. typeTab: 0,
  3980. stockData: [],
  3981. showViewer: false,
  3982. projectdDialogVisible: false,
  3983. projectObj: {
  3984. decoration_id: ''
  3985. },
  3986. // ticketFormVisible:false,
  3987. ticketForm: {
  3988. 英文品名: this.pageData.product_name,
  3989. SKU: this.pageData.product_code,
  3990. 问题类型: [],
  3991. 反馈详情: ''
  3992. },
  3993. ticketConfig: [{
  3994. prop: '英文品名',
  3995. type: 'text'
  3996. }, {
  3997. prop: 'SKU',
  3998. type: 'text'
  3999. }, {
  4000. prop: '问题类型',
  4001. type: 'checkbox',
  4002. selectlist: ['网页信息', '供应商质量', '样品管理', '产品部管理']
  4003. }, {
  4004. prop: '反馈详情',
  4005. type: 'textarea'
  4006. }],
  4007. rules: {
  4008. '问题类型': [{
  4009. required: true,
  4010. message: 'Please select',
  4011. trigger: 'change'
  4012. }],
  4013. '反馈详情': [{
  4014. required: true,
  4015. message: 'Please enter',
  4016. trigger: 'blur'
  4017. }]
  4018. }
  4019. };
  4020. },
  4021. computed: {
  4022. currentPre() {
  4023. return this.$store.state.product.smImgUlIdx;
  4024. },
  4025. isLogin() {
  4026. var _this$$store$state$us;
  4027. return !!((_this$$store$state$us = this.$store.state.userInfo) !== null && _this$$store$state$us !== void 0 && _this$$store$state$us.email);
  4028. },
  4029. comInfo() {
  4030. var _this$pageData;
  4031. return (_this$pageData = this.pageData) === null || _this$pageData === void 0 ? void 0 : _this$pageData.main;
  4032. },
  4033. productImgArr() {
  4034. return this.comInfo.mergeImages;
  4035. },
  4036. userInfo() {
  4037. return this.$store.state.userInfo;
  4038. },
  4039. comIncluded_packaging() {
  4040. return this.comInfo.included_packaging.split(',');
  4041. },
  4042. comOptional_packaging() {
  4043. return this.comInfo.optional_packaging.split(',');
  4044. },
  4045. comOptional_attachments() {
  4046. return this.comInfo.optional_attachments.split(',');
  4047. }
  4048. },
  4049. watch: {
  4050. //登陆立即显示Quick Quote和Changes选项
  4051. isLogin: {
  4052. handler(val) {
  4053. if (val) {
  4054. this.tabList[1].isShow = true;
  4055. // this.tabList[4].isShow = true
  4056. }
  4057. },
  4058. immediate: true
  4059. }
  4060. },
  4061. mounted() {},
  4062. methods: {
  4063. ...Object(external_vuex_["mapActions"])(['getUserInfo']),
  4064. ...Object(external_vuex_["mapMutations"])({
  4065. openDialog: 'openDialog',
  4066. setSmImgUlIdx: 'product/setSmImgUlIdx',
  4067. setLoading: 'product/setLoading'
  4068. }),
  4069. // 判断字符串是否符合商品code规律
  4070. isProduct(str) {
  4071. return /^[A-z]{1,4}\d{1,4}[A-z]?$/.test(str);
  4072. },
  4073. computedIndex(i) {
  4074. var _this$pageData$main;
  4075. return (_this$pageData$main = this.pageData.main) !== null && _this$pageData$main !== void 0 && _this$pageData$main.image ? 1 + i : i;
  4076. },
  4077. // 保存一下用户选择的周期、型号、打印服务、addon、packaging, product builder页面要用到
  4078. saveUserSelected() {
  4079. let result = {
  4080. addon: [],
  4081. packaging: [],
  4082. printService: {}
  4083. };
  4084. for (let key in this.allSelData) {
  4085. if (key === 'addon') {
  4086. result.addon = this.allSelData[key].map(item => item.id);
  4087. }
  4088. if (key === 'packaging') {
  4089. result.packaging = this.allSelData[key].map(item => item.id);
  4090. }
  4091. }
  4092. // 周期
  4093. if (this.priceList[this.currTab].cycle_id) {
  4094. result.cycle = this.priceList[this.currTab].cycle_id;
  4095. }
  4096. // 型号
  4097. if (this.priceList[this.currTab].undecoratedSelectId) {
  4098. result.model = this.priceList[this.currTab].undecoratedSelectId;
  4099. }
  4100. // 打印服务
  4101. const printService = this.priceList[this.currTab][2];
  4102. console.log(printService, 'printService');
  4103. if (Array.isArray(printService) && printService.length) {
  4104. printService.forEach(item => {
  4105. if (item.decorationSelectId) {
  4106. const temp = item.decorationList.filter(i => i.id === item.decorationSelectId);
  4107. result.printService[`${item.id}`] = {
  4108. id: item.decorationSelectId,
  4109. num: temp[0].num
  4110. };
  4111. }
  4112. });
  4113. }
  4114. localStorage.setItem(`product-user-select-${this.$route.params.code}`, JSON.stringify(result));
  4115. },
  4116. // getStock() {
  4117. // this.$axios.get('/api/quote/stock_new', { params: {id: this.id} }).then(res => {
  4118. // this.stockData = res.result
  4119. // })
  4120. // },
  4121. openProjectdDialog() {
  4122. if (!isLogin) {
  4123. this.openDialog();
  4124. return;
  4125. }
  4126. this.projectdDialogVisible = true;
  4127. this.projectObj.cycle_id = this.comCurrPriceList.cycle_id;
  4128. this.projectObj.price_unit_id = this.comCurrPriceList.undecoratedSelectId;
  4129. //获取Decoration Method
  4130. this.projectObj.decoration_methods = this.comDecoration.map(item => {
  4131. let temp = {};
  4132. temp.decoration_id = item.id;
  4133. temp.price_unit_id = item.parentId;
  4134. temp.colours_number = item.num;
  4135. return temp;
  4136. });
  4137. this.projectObj.addition_ids = this.allSelData.addon.map(item => {
  4138. return item.id;
  4139. }).join();
  4140. this.projectObj.packaging_addition_ids = this.allSelData.packaging.map(item => {
  4141. return item.id;
  4142. }).join();
  4143. },
  4144. download(url) {
  4145. var urlStr = url.match('[^/]+(?!.*/)')[0];
  4146. const repaceDomainUrl = this.$utils.repaceDomain(url);
  4147. if (url.endsWith(".pdf")) {
  4148. this.$utils.handleFileDownload(repaceDomainUrl, urlStr, false);
  4149. } else {
  4150. this.$utils.downloadBlob(url, urlStr);
  4151. }
  4152. },
  4153. onPreview() {
  4154. this.showViewer = true;
  4155. },
  4156. closeViewer() {
  4157. this.showViewer = false;
  4158. },
  4159. clickNav(i) {
  4160. if (this.typeTab == 1 && !this.tabList[1].isClick) {
  4161. this.checkNav(1);
  4162. } else if (this.typeTab == 2 && !this.tabList[2].isClick) {
  4163. this.checkNav(2);
  4164. }
  4165. },
  4166. checkNav(i) {
  4167. if (this.isLogin) {
  4168. this.getUserInfo();
  4169. if (this.userInfo.audit_status == 1) {
  4170. if (i == 1) {
  4171. this.$refs.quote.getQuote();
  4172. // this.$refs.quote.getWeight()
  4173. this.tabList[1].isClick = true;
  4174. } else if (i == 2) {
  4175. // uk 没有这个
  4176. // this.getStock()
  4177. // this.tabList[2].isClick = true
  4178. }
  4179. } else {
  4180. this.typeTab = 0;
  4181. this.$message({
  4182. message: 'Your account has not been audited',
  4183. type: 'warning'
  4184. });
  4185. }
  4186. } else {
  4187. this.openDialog();
  4188. this.typeTab = 0;
  4189. }
  4190. },
  4191. openLink(url) {
  4192. let a = url.indexOf('http') > -1 ? url : 'http://' + url;
  4193. window.open(a, '_blank');
  4194. }
  4195. // sendTicket() {
  4196. // this.$axios.post('/api/ticket/add', { product_code: this.pageData.product_code,ticket_type: this.ticketForm['问题类型'].join(),content: this.ticketForm['反馈详情'] }).then(res => {
  4197. // this.setLoading(false)
  4198. // this.$notify({
  4199. // title: "success",
  4200. // message: "提交成功",
  4201. // type: "success",
  4202. // duration: 3000,
  4203. // });
  4204. // }).catch(() => {
  4205. // this.setLoading(false)
  4206. // })
  4207. // }
  4208. }
  4209. });
  4210. // CONCATENATED MODULE: ./components/product/ProductRight.vue?vue&type=script&lang=js
  4211. /* harmony default export */ var product_ProductRightvue_type_script_lang_js = (ProductRightvue_type_script_lang_js);
  4212. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  4213. var componentNormalizer = __webpack_require__(2);
  4214. // CONCATENATED MODULE: ./components/product/ProductRight.vue
  4215. function injectStyles (context) {
  4216. var style0 = __webpack_require__(241)
  4217. if (style0.__inject__) style0.__inject__(context)
  4218. }
  4219. /* normalize component */
  4220. var component = Object(componentNormalizer["a" /* default */])(
  4221. product_ProductRightvue_type_script_lang_js,
  4222. render,
  4223. staticRenderFns,
  4224. false,
  4225. injectStyles,
  4226. "3bc79372",
  4227. "3d8ffb3b"
  4228. )
  4229. /* harmony default export */ var ProductRight = __webpack_exports__["default"] = (component.exports);
  4230. /* nuxt-component-imports */
  4231. installComponents(component, {TabNav: __webpack_require__(183).default})
  4232. /***/ })
  4233. };;
  4234. //# sourceMappingURL=product-right.js.map