orderDetail.js 102 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158
  1. exports.ids = [62,12,14,59];
  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. /***/ 165:
  1271. /***/ (function(module, exports) {
  1272. // Exports
  1273. module.exports = {
  1274. };
  1275. /***/ }),
  1276. /***/ 166:
  1277. /***/ (function(module, exports) {
  1278. // Exports
  1279. module.exports = {
  1280. };
  1281. /***/ }),
  1282. /***/ 175:
  1283. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1284. "use strict";
  1285. /* unused harmony export formatPrice */
  1286. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return round; });
  1287. /* unused harmony export transformNumber */
  1288. /* unused harmony export getUnit */
  1289. /* unused harmony export getSetup */
  1290. /* unused harmony export getPrint */
  1291. /* unused harmony export getAddon */
  1292. /* unused harmony export getPackaging */
  1293. /* unused harmony export getFright */
  1294. /* harmony import */ var number_precision__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(122);
  1295. /* harmony import */ var number_precision__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(number_precision__WEBPACK_IMPORTED_MODULE_0__);
  1296. // 商品价格计算相关
  1297. // 价格格式化
  1298. function formatPrice(value, needSymbol = true) {
  1299. // 不能在最后一步显示之前格式化999 111, 否则可能出现单价1买999个得到999价格被格式化成poa的情况
  1300. if (value === 0) {
  1301. return needSymbol ? '£0.00' : '0.00';
  1302. } else {
  1303. return needSymbol ? `£${value}` : `${value}`;
  1304. }
  1305. }
  1306. // 简单的乘法换算
  1307. function multiply(value, ratio = 100) {
  1308. return parseFloat((value * ratio).toPrecision(12));
  1309. }
  1310. // 小数处理, 四舍五入, 为toFixed做准备
  1311. function round(number, ratio = 100) {
  1312. return Math.round(multiply(number, ratio)) / ratio;
  1313. }
  1314. /**
  1315. * 将字符串简单转换成数字, 并可数倍转换. 注意, 这个适用于整数倍(商品件数), 非整数的不能用这个处理小数.
  1316. * @param {*} value 目标值
  1317. * @param {*} ratio 倍数, 默认1
  1318. * @returns number | origin, 转换后的数字, 无法转成数字的返回原值
  1319. */
  1320. function transformNumber(value, ratio = 1) {
  1321. const v = Number(value);
  1322. if (Number.isNaN(v)) {
  1323. return value;
  1324. } else {
  1325. // 保留两位小数
  1326. return Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["divide"])(Math.trunc(Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["times"])(Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["times"])(v, ratio), 100)), 100);
  1327. }
  1328. }
  1329. // unit 单个商品的, 没有乘数量. 因为含有111 999 这些极端值, 没有格式化输出之前直接乘回出问题的.
  1330. const getUnit = function (buyNum, index, attributeList, basePriceList) {
  1331. // 算出购买数量位于 价格阶梯的 哪个区间
  1332. const candidate = Object.entries(attributeList).filter(item => buyNum >= item[1]);
  1333. let key = 'website_qty1';
  1334. if (candidate.length) {
  1335. key = candidate.pop()[0];
  1336. }
  1337. return transformNumber(basePriceList[index][key], buyNum);
  1338. };
  1339. // 打印和附加价格 的steup之和. 商品基础价格现在没有setup了.
  1340. const getSetup = function (buyNum, form, additionList) {
  1341. const sum = Object.entries(form).reduce((total, current) => {
  1342. let s = 0;
  1343. // 打印服务表单的数据跟附加服务表单的数据结构不一致, 以数字id字符串键名的是打印服务的数据
  1344. if (/\d+/.test(current[0]) && current[1].enable) {
  1345. const temp = current[1].colorForm.filter(i => i.id === current[1].printService);
  1346. let colorNumber = 1;
  1347. if (temp.length) {
  1348. colorNumber = temp[0].colorNumber;
  1349. }
  1350. const decoration = current[1].decorationList.filter(i => i.id === current[1].printService);
  1351. let setup = 0;
  1352. if (decoration.length) {
  1353. setup = Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["plus"])(Number(decoration[0].website_setup), Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["times"])(Number(decoration[0].supplier_setup), colorNumber - 1));
  1354. }
  1355. s = Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["plus"])(s, setup);
  1356. } else if (current[1].length) {
  1357. // 附加服务的表单数据, 有值说明该项有选中了附加服务
  1358. const addition = additionList[current[0]].filter(addition => current[1].includes(addition.id));
  1359. if (addition.length) {
  1360. const temp = addition.reduce((t, c) => {
  1361. let value = Number(c.website_setup);
  1362. if ([5, 6].includes(c.website_setup_id)) {
  1363. // 5是poa, 6是waived. 这种情况一般setup是留空的, 不留空大概是异常数据, 重置0保险一点.
  1364. value = 0;
  1365. }
  1366. return Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["plus"])(t, Number.isNaN(value) ? 0 : value);
  1367. }, 0);
  1368. s = Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["plus"])(s, temp);
  1369. }
  1370. }
  1371. total = Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["plus"])(total, s);
  1372. return total;
  1373. }, 0);
  1374. return transformNumber(sum);
  1375. };
  1376. // 打印价格的 阶梯基础价*购买数量.
  1377. const getPrint = function (buyNum, form, attributeList) {
  1378. // 算出购买数量位于 价格阶梯的 哪个区间
  1379. const candidate = Object.entries(attributeList).filter(item => buyNum >= item[1]);
  1380. const key = `website_qty${candidate.length}`;
  1381. const key2 = `supplier_qty${candidate.length}`;
  1382. // 如果其中一项为POA, 则‘和’都是POA
  1383. const result = Object.entries(form).reduce((total, current) => {
  1384. if (total === 'POA') {
  1385. return total;
  1386. }
  1387. let sum = 0;
  1388. if (/\d+/.test(current[0]) && current[1].enable) {
  1389. const temp = current[1].colorForm.filter(i => i.id === current[1].printService);
  1390. let colorNumber = 1;
  1391. if (temp.length) {
  1392. colorNumber = temp[0].colorNumber;
  1393. }
  1394. const decoration = current[1].decorationList.filter(i => i.id === current[1].printService);
  1395. // 打印价格的基础价. 其中数字111(代表'-') 和999(代表'POA')
  1396. const p1 = transformNumber(decoration[0][key]);
  1397. if (p1 === 999 || p1 === 111 || typeof p1 !== 'number') {
  1398. return 'POA';
  1399. }
  1400. // 打印价格的附加价
  1401. const p2 = transformNumber(decoration[0][key2]);
  1402. if (p2 === 999 || p2 === 111 || typeof p2 !== 'number') {
  1403. return 'POA';
  1404. }
  1405. let price = 0;
  1406. if (decoration.length) {
  1407. price = Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["plus"])(p1, Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["times"])(p2, colorNumber - 1));
  1408. }
  1409. sum = Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["plus"])(sum, price);
  1410. }
  1411. total = Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["plus"])(total, sum);
  1412. return total;
  1413. }, 0);
  1414. return transformNumber(result, buyNum);
  1415. };
  1416. // 附加服务除了packing之外的总价
  1417. const getAddon = function (buyNum, form, attributeList, additionList) {
  1418. // 算出购买数量位于 价格阶梯的 哪个区间
  1419. const candidate = Object.entries(attributeList).filter(item => buyNum >= item[1]);
  1420. const key = `website_qty${candidate.length}`;
  1421. const result = Object.entries(form).reduce((total, current) => {
  1422. if (total === 'POA') {
  1423. return total;
  1424. }
  1425. let sum = 0;
  1426. if (!/\d+/.test(current[0]) && current[0] !== 'packaging') {
  1427. sum = additionList[current[0]].filter(item => current[1].includes(item.id)).reduce((t, c) => {
  1428. if (t === 'POA') {
  1429. return t;
  1430. }
  1431. let temp = transformNumber(c[key]);
  1432. if (temp === 999 || temp === 111 || typeof temp !== 'number') {
  1433. temp = 0;
  1434. return 'POA';
  1435. }
  1436. t = Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["plus"])(t, temp);
  1437. return t;
  1438. }, 0);
  1439. }
  1440. return Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["plus"])(total, sum);
  1441. }, 0);
  1442. return transformNumber(result, buyNum);
  1443. };
  1444. // 附加服务中 packing 的价格
  1445. const getPackaging = function (buyNum, form, attributeList, additionList) {
  1446. // 算出购买数量位于 价格阶梯的 哪个区间
  1447. const candidate = Object.entries(attributeList).filter(item => buyNum >= item[1]);
  1448. const key = `website_qty${candidate.length}`;
  1449. const result = Object.entries(form).reduce((total, current) => {
  1450. if (total === 'POA') {
  1451. return total;
  1452. }
  1453. let sum = 0;
  1454. if (!/\d+/.test(current[0]) && current[0] === 'packaging') {
  1455. sum = additionList[current[0]].filter(item => current[1].includes(item.id)).reduce((t, c) => {
  1456. if (t === 'POA') {
  1457. return t;
  1458. }
  1459. let temp = transformNumber(c[key]);
  1460. if (temp === 999 || temp === 111 || typeof temp !== 'number') {
  1461. temp = 0;
  1462. return 'POA';
  1463. }
  1464. t = Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["plus"])(t, temp);
  1465. return t;
  1466. }, 0);
  1467. }
  1468. return Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["plus"])(total, sum);
  1469. }, 0);
  1470. return transformNumber(result, buyNum);
  1471. };
  1472. // 运费计算. 从product页面抄过来的逻辑. +号是隐式类型转换
  1473. const getFright = function (buyNum, config, freight, weight, ratio = 1) {
  1474. // 单独批次数量的总重
  1475. const totalWeight = Math.ceil(Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["times"])(+weight.unit_w_local, buyNum));
  1476. const expressFactor = Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["plus"])(1, Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["divide"])(Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["plus"])(+config.express_freight, +config.fuel), 100));
  1477. const AAEFactor = Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["plus"])(1, Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["divide"])(Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["plus"])(+config.bag_freight, +config.fuel), 100));
  1478. let frightCost = 0;
  1479. if (freight.type === 1) {
  1480. if (totalWeight > 20) {
  1481. const a1 = Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["minus"])(totalWeight, 20);
  1482. const a2 = Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["times"])(a1, +freight.basic);
  1483. const a3 = Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["plus"])(+freight.pickup, a2);
  1484. frightCost = Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["times"])(a3, expressFactor);
  1485. } else {
  1486. frightCost = Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["times"])(+freight.pickup, expressFactor);
  1487. }
  1488. } else if (freight.type === 2) {
  1489. const a1 = Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["times"])(totalWeight, +freight.basic);
  1490. const a2 = Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["plus"])(+freight.pickup, a1);
  1491. frightCost = Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["times"])(a2, AAEFactor);
  1492. } else {
  1493. frightCost = 0;
  1494. }
  1495. return transformNumber(frightCost, ratio);
  1496. };
  1497. /***/ }),
  1498. /***/ 176:
  1499. /***/ (function(module, exports) {
  1500. // Exports
  1501. module.exports = {
  1502. };
  1503. /***/ }),
  1504. /***/ 185:
  1505. /***/ (function(module, exports) {
  1506. /**
  1507. * lodash (Custom Build) <https://lodash.com/>
  1508. * Build: `lodash modularize exports="npm" -o ./`
  1509. * Copyright jQuery Foundation and other contributors <https://jquery.org/>
  1510. * Released under MIT license <https://lodash.com/license>
  1511. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  1512. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1513. */
  1514. /** Used as the `TypeError` message for "Functions" methods. */
  1515. var FUNC_ERROR_TEXT = 'Expected a function';
  1516. /** Used as references for various `Number` constants. */
  1517. var NAN = 0 / 0;
  1518. /** `Object#toString` result references. */
  1519. var symbolTag = '[object Symbol]';
  1520. /** Used to match leading and trailing whitespace. */
  1521. var reTrim = /^\s+|\s+$/g;
  1522. /** Used to detect bad signed hexadecimal string values. */
  1523. var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
  1524. /** Used to detect binary string values. */
  1525. var reIsBinary = /^0b[01]+$/i;
  1526. /** Used to detect octal string values. */
  1527. var reIsOctal = /^0o[0-7]+$/i;
  1528. /** Built-in method references without a dependency on `root`. */
  1529. var freeParseInt = parseInt;
  1530. /** Detect free variable `global` from Node.js. */
  1531. var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
  1532. /** Detect free variable `self`. */
  1533. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  1534. /** Used as a reference to the global object. */
  1535. var root = freeGlobal || freeSelf || Function('return this')();
  1536. /** Used for built-in method references. */
  1537. var objectProto = Object.prototype;
  1538. /**
  1539. * Used to resolve the
  1540. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  1541. * of values.
  1542. */
  1543. var objectToString = objectProto.toString;
  1544. /* Built-in method references for those with the same name as other `lodash` methods. */
  1545. var nativeMax = Math.max,
  1546. nativeMin = Math.min;
  1547. /**
  1548. * Gets the timestamp of the number of milliseconds that have elapsed since
  1549. * the Unix epoch (1 January 1970 00:00:00 UTC).
  1550. *
  1551. * @static
  1552. * @memberOf _
  1553. * @since 2.4.0
  1554. * @category Date
  1555. * @returns {number} Returns the timestamp.
  1556. * @example
  1557. *
  1558. * _.defer(function(stamp) {
  1559. * console.log(_.now() - stamp);
  1560. * }, _.now());
  1561. * // => Logs the number of milliseconds it took for the deferred invocation.
  1562. */
  1563. var now = function() {
  1564. return root.Date.now();
  1565. };
  1566. /**
  1567. * Creates a debounced function that delays invoking `func` until after `wait`
  1568. * milliseconds have elapsed since the last time the debounced function was
  1569. * invoked. The debounced function comes with a `cancel` method to cancel
  1570. * delayed `func` invocations and a `flush` method to immediately invoke them.
  1571. * Provide `options` to indicate whether `func` should be invoked on the
  1572. * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
  1573. * with the last arguments provided to the debounced function. Subsequent
  1574. * calls to the debounced function return the result of the last `func`
  1575. * invocation.
  1576. *
  1577. * **Note:** If `leading` and `trailing` options are `true`, `func` is
  1578. * invoked on the trailing edge of the timeout only if the debounced function
  1579. * is invoked more than once during the `wait` timeout.
  1580. *
  1581. * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
  1582. * until to the next tick, similar to `setTimeout` with a timeout of `0`.
  1583. *
  1584. * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
  1585. * for details over the differences between `_.debounce` and `_.throttle`.
  1586. *
  1587. * @static
  1588. * @memberOf _
  1589. * @since 0.1.0
  1590. * @category Function
  1591. * @param {Function} func The function to debounce.
  1592. * @param {number} [wait=0] The number of milliseconds to delay.
  1593. * @param {Object} [options={}] The options object.
  1594. * @param {boolean} [options.leading=false]
  1595. * Specify invoking on the leading edge of the timeout.
  1596. * @param {number} [options.maxWait]
  1597. * The maximum time `func` is allowed to be delayed before it's invoked.
  1598. * @param {boolean} [options.trailing=true]
  1599. * Specify invoking on the trailing edge of the timeout.
  1600. * @returns {Function} Returns the new debounced function.
  1601. * @example
  1602. *
  1603. * // Avoid costly calculations while the window size is in flux.
  1604. * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
  1605. *
  1606. * // Invoke `sendMail` when clicked, debouncing subsequent calls.
  1607. * jQuery(element).on('click', _.debounce(sendMail, 300, {
  1608. * 'leading': true,
  1609. * 'trailing': false
  1610. * }));
  1611. *
  1612. * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
  1613. * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
  1614. * var source = new EventSource('/stream');
  1615. * jQuery(source).on('message', debounced);
  1616. *
  1617. * // Cancel the trailing debounced invocation.
  1618. * jQuery(window).on('popstate', debounced.cancel);
  1619. */
  1620. function debounce(func, wait, options) {
  1621. var lastArgs,
  1622. lastThis,
  1623. maxWait,
  1624. result,
  1625. timerId,
  1626. lastCallTime,
  1627. lastInvokeTime = 0,
  1628. leading = false,
  1629. maxing = false,
  1630. trailing = true;
  1631. if (typeof func != 'function') {
  1632. throw new TypeError(FUNC_ERROR_TEXT);
  1633. }
  1634. wait = toNumber(wait) || 0;
  1635. if (isObject(options)) {
  1636. leading = !!options.leading;
  1637. maxing = 'maxWait' in options;
  1638. maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
  1639. trailing = 'trailing' in options ? !!options.trailing : trailing;
  1640. }
  1641. function invokeFunc(time) {
  1642. var args = lastArgs,
  1643. thisArg = lastThis;
  1644. lastArgs = lastThis = undefined;
  1645. lastInvokeTime = time;
  1646. result = func.apply(thisArg, args);
  1647. return result;
  1648. }
  1649. function leadingEdge(time) {
  1650. // Reset any `maxWait` timer.
  1651. lastInvokeTime = time;
  1652. // Start the timer for the trailing edge.
  1653. timerId = setTimeout(timerExpired, wait);
  1654. // Invoke the leading edge.
  1655. return leading ? invokeFunc(time) : result;
  1656. }
  1657. function remainingWait(time) {
  1658. var timeSinceLastCall = time - lastCallTime,
  1659. timeSinceLastInvoke = time - lastInvokeTime,
  1660. result = wait - timeSinceLastCall;
  1661. return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
  1662. }
  1663. function shouldInvoke(time) {
  1664. var timeSinceLastCall = time - lastCallTime,
  1665. timeSinceLastInvoke = time - lastInvokeTime;
  1666. // Either this is the first call, activity has stopped and we're at the
  1667. // trailing edge, the system time has gone backwards and we're treating
  1668. // it as the trailing edge, or we've hit the `maxWait` limit.
  1669. return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
  1670. (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
  1671. }
  1672. function timerExpired() {
  1673. var time = now();
  1674. if (shouldInvoke(time)) {
  1675. return trailingEdge(time);
  1676. }
  1677. // Restart the timer.
  1678. timerId = setTimeout(timerExpired, remainingWait(time));
  1679. }
  1680. function trailingEdge(time) {
  1681. timerId = undefined;
  1682. // Only invoke if we have `lastArgs` which means `func` has been
  1683. // debounced at least once.
  1684. if (trailing && lastArgs) {
  1685. return invokeFunc(time);
  1686. }
  1687. lastArgs = lastThis = undefined;
  1688. return result;
  1689. }
  1690. function cancel() {
  1691. if (timerId !== undefined) {
  1692. clearTimeout(timerId);
  1693. }
  1694. lastInvokeTime = 0;
  1695. lastArgs = lastCallTime = lastThis = timerId = undefined;
  1696. }
  1697. function flush() {
  1698. return timerId === undefined ? result : trailingEdge(now());
  1699. }
  1700. function debounced() {
  1701. var time = now(),
  1702. isInvoking = shouldInvoke(time);
  1703. lastArgs = arguments;
  1704. lastThis = this;
  1705. lastCallTime = time;
  1706. if (isInvoking) {
  1707. if (timerId === undefined) {
  1708. return leadingEdge(lastCallTime);
  1709. }
  1710. if (maxing) {
  1711. // Handle invocations in a tight loop.
  1712. timerId = setTimeout(timerExpired, wait);
  1713. return invokeFunc(lastCallTime);
  1714. }
  1715. }
  1716. if (timerId === undefined) {
  1717. timerId = setTimeout(timerExpired, wait);
  1718. }
  1719. return result;
  1720. }
  1721. debounced.cancel = cancel;
  1722. debounced.flush = flush;
  1723. return debounced;
  1724. }
  1725. /**
  1726. * Creates a throttled function that only invokes `func` at most once per
  1727. * every `wait` milliseconds. The throttled function comes with a `cancel`
  1728. * method to cancel delayed `func` invocations and a `flush` method to
  1729. * immediately invoke them. Provide `options` to indicate whether `func`
  1730. * should be invoked on the leading and/or trailing edge of the `wait`
  1731. * timeout. The `func` is invoked with the last arguments provided to the
  1732. * throttled function. Subsequent calls to the throttled function return the
  1733. * result of the last `func` invocation.
  1734. *
  1735. * **Note:** If `leading` and `trailing` options are `true`, `func` is
  1736. * invoked on the trailing edge of the timeout only if the throttled function
  1737. * is invoked more than once during the `wait` timeout.
  1738. *
  1739. * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
  1740. * until to the next tick, similar to `setTimeout` with a timeout of `0`.
  1741. *
  1742. * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
  1743. * for details over the differences between `_.throttle` and `_.debounce`.
  1744. *
  1745. * @static
  1746. * @memberOf _
  1747. * @since 0.1.0
  1748. * @category Function
  1749. * @param {Function} func The function to throttle.
  1750. * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
  1751. * @param {Object} [options={}] The options object.
  1752. * @param {boolean} [options.leading=true]
  1753. * Specify invoking on the leading edge of the timeout.
  1754. * @param {boolean} [options.trailing=true]
  1755. * Specify invoking on the trailing edge of the timeout.
  1756. * @returns {Function} Returns the new throttled function.
  1757. * @example
  1758. *
  1759. * // Avoid excessively updating the position while scrolling.
  1760. * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
  1761. *
  1762. * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
  1763. * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
  1764. * jQuery(element).on('click', throttled);
  1765. *
  1766. * // Cancel the trailing throttled invocation.
  1767. * jQuery(window).on('popstate', throttled.cancel);
  1768. */
  1769. function throttle(func, wait, options) {
  1770. var leading = true,
  1771. trailing = true;
  1772. if (typeof func != 'function') {
  1773. throw new TypeError(FUNC_ERROR_TEXT);
  1774. }
  1775. if (isObject(options)) {
  1776. leading = 'leading' in options ? !!options.leading : leading;
  1777. trailing = 'trailing' in options ? !!options.trailing : trailing;
  1778. }
  1779. return debounce(func, wait, {
  1780. 'leading': leading,
  1781. 'maxWait': wait,
  1782. 'trailing': trailing
  1783. });
  1784. }
  1785. /**
  1786. * Checks if `value` is the
  1787. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  1788. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  1789. *
  1790. * @static
  1791. * @memberOf _
  1792. * @since 0.1.0
  1793. * @category Lang
  1794. * @param {*} value The value to check.
  1795. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  1796. * @example
  1797. *
  1798. * _.isObject({});
  1799. * // => true
  1800. *
  1801. * _.isObject([1, 2, 3]);
  1802. * // => true
  1803. *
  1804. * _.isObject(_.noop);
  1805. * // => true
  1806. *
  1807. * _.isObject(null);
  1808. * // => false
  1809. */
  1810. function isObject(value) {
  1811. var type = typeof value;
  1812. return !!value && (type == 'object' || type == 'function');
  1813. }
  1814. /**
  1815. * Checks if `value` is object-like. A value is object-like if it's not `null`
  1816. * and has a `typeof` result of "object".
  1817. *
  1818. * @static
  1819. * @memberOf _
  1820. * @since 4.0.0
  1821. * @category Lang
  1822. * @param {*} value The value to check.
  1823. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  1824. * @example
  1825. *
  1826. * _.isObjectLike({});
  1827. * // => true
  1828. *
  1829. * _.isObjectLike([1, 2, 3]);
  1830. * // => true
  1831. *
  1832. * _.isObjectLike(_.noop);
  1833. * // => false
  1834. *
  1835. * _.isObjectLike(null);
  1836. * // => false
  1837. */
  1838. function isObjectLike(value) {
  1839. return !!value && typeof value == 'object';
  1840. }
  1841. /**
  1842. * Checks if `value` is classified as a `Symbol` primitive or object.
  1843. *
  1844. * @static
  1845. * @memberOf _
  1846. * @since 4.0.0
  1847. * @category Lang
  1848. * @param {*} value The value to check.
  1849. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
  1850. * @example
  1851. *
  1852. * _.isSymbol(Symbol.iterator);
  1853. * // => true
  1854. *
  1855. * _.isSymbol('abc');
  1856. * // => false
  1857. */
  1858. function isSymbol(value) {
  1859. return typeof value == 'symbol' ||
  1860. (isObjectLike(value) && objectToString.call(value) == symbolTag);
  1861. }
  1862. /**
  1863. * Converts `value` to a number.
  1864. *
  1865. * @static
  1866. * @memberOf _
  1867. * @since 4.0.0
  1868. * @category Lang
  1869. * @param {*} value The value to process.
  1870. * @returns {number} Returns the number.
  1871. * @example
  1872. *
  1873. * _.toNumber(3.2);
  1874. * // => 3.2
  1875. *
  1876. * _.toNumber(Number.MIN_VALUE);
  1877. * // => 5e-324
  1878. *
  1879. * _.toNumber(Infinity);
  1880. * // => Infinity
  1881. *
  1882. * _.toNumber('3.2');
  1883. * // => 3.2
  1884. */
  1885. function toNumber(value) {
  1886. if (typeof value == 'number') {
  1887. return value;
  1888. }
  1889. if (isSymbol(value)) {
  1890. return NAN;
  1891. }
  1892. if (isObject(value)) {
  1893. var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
  1894. value = isObject(other) ? (other + '') : other;
  1895. }
  1896. if (typeof value != 'string') {
  1897. return value === 0 ? value : +value;
  1898. }
  1899. value = value.replace(reTrim, '');
  1900. var isBinary = reIsBinary.test(value);
  1901. return (isBinary || reIsOctal.test(value))
  1902. ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
  1903. : (reIsBadHex.test(value) ? NAN : +value);
  1904. }
  1905. module.exports = throttle;
  1906. /***/ }),
  1907. /***/ 186:
  1908. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1909. "use strict";
  1910. __webpack_require__.r(__webpack_exports__);
  1911. /* 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_imageList_vue_vue_type_style_index_0_id_d262f43e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(165);
  1912. /* 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_imageList_vue_vue_type_style_index_0_id_d262f43e_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_imageList_vue_vue_type_style_index_0_id_d262f43e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
  1913. /* 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_imageList_vue_vue_type_style_index_0_id_d262f43e_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_imageList_vue_vue_type_style_index_0_id_d262f43e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  1914. /***/ }),
  1915. /***/ 187:
  1916. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1917. "use strict";
  1918. __webpack_require__.r(__webpack_exports__);
  1919. /* 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_ExportDialog_vue_vue_type_style_index_0_id_1381fc6c_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(166);
  1920. /* 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_ExportDialog_vue_vue_type_style_index_0_id_1381fc6c_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_ExportDialog_vue_vue_type_style_index_0_id_1381fc6c_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
  1921. /* 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_ExportDialog_vue_vue_type_style_index_0_id_1381fc6c_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_ExportDialog_vue_vue_type_style_index_0_id_1381fc6c_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  1922. /***/ }),
  1923. /***/ 196:
  1924. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1925. "use strict";
  1926. // ESM COMPAT FLAG
  1927. __webpack_require__.r(__webpack_exports__);
  1928. // 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/imageList.vue?vue&type=template&id=d262f43e&scoped=true
  1929. var render = function render() {
  1930. var _vm = this,
  1931. _c = _vm._self._c;
  1932. return _c('div', {
  1933. staticClass: "wrap flex row"
  1934. }, [_vm._ssrNode("<i class=\"el-icon-arrow-left\" data-v-d262f43e></i> "), _vm._ssrNode("<div class=\"list\" data-v-d262f43e>", "</div>", _vm._l(_vm.data, function (item, index) {
  1935. return _c('el-image', {
  1936. key: index,
  1937. staticClass: "image",
  1938. attrs: {
  1939. "src": item.cdn_url,
  1940. "fit": "cover"
  1941. },
  1942. on: {
  1943. "click": function ($event) {
  1944. return _vm.handleViwer(index);
  1945. }
  1946. }
  1947. });
  1948. }), 1), _vm._ssrNode(" <i class=\"el-icon-arrow-right\" data-v-d262f43e></i> "), _vm.showViewer ? _c('ElImageViewer', {
  1949. attrs: {
  1950. "initial-index": _vm.currentPre,
  1951. "on-close": _vm.closeViewer,
  1952. "url-list": _vm.comImg
  1953. }
  1954. }) : _vm._e()], 2);
  1955. };
  1956. var staticRenderFns = [];
  1957. // CONCATENATED MODULE: ./components/imageList.vue?vue&type=template&id=d262f43e&scoped=true
  1958. // EXTERNAL MODULE: ./node_modules/element-ui/packages/image/src/image-viewer.vue + 7 modules
  1959. var image_viewer = __webpack_require__(157);
  1960. // 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/imageList.vue?vue&type=script&lang=js
  1961. /* harmony default export */ var imageListvue_type_script_lang_js = ({
  1962. components: {
  1963. ElImageViewer: image_viewer["a" /* default */]
  1964. },
  1965. props: {
  1966. data: {
  1967. type: Array,
  1968. default: () => {
  1969. return [];
  1970. }
  1971. }
  1972. },
  1973. data() {
  1974. return {
  1975. currentPre: 0,
  1976. showViewer: false
  1977. };
  1978. },
  1979. computed: {
  1980. comImg() {
  1981. return this.data.map(i => i.cdn_url);
  1982. }
  1983. },
  1984. methods: {
  1985. scroll(amount) {
  1986. const list = this.$refs.list;
  1987. list.scrollLeft += amount * list.clientWidth;
  1988. },
  1989. closeViewer() {
  1990. this.showViewer = false;
  1991. },
  1992. handleViwer(i) {
  1993. this.currentPre = i;
  1994. this.showViewer = true;
  1995. }
  1996. }
  1997. });
  1998. // CONCATENATED MODULE: ./components/imageList.vue?vue&type=script&lang=js
  1999. /* harmony default export */ var components_imageListvue_type_script_lang_js = (imageListvue_type_script_lang_js);
  2000. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  2001. var componentNormalizer = __webpack_require__(2);
  2002. // CONCATENATED MODULE: ./components/imageList.vue
  2003. function injectStyles (context) {
  2004. var style0 = __webpack_require__(186)
  2005. if (style0.__inject__) style0.__inject__(context)
  2006. }
  2007. /* normalize component */
  2008. var component = Object(componentNormalizer["a" /* default */])(
  2009. components_imageListvue_type_script_lang_js,
  2010. render,
  2011. staticRenderFns,
  2012. false,
  2013. injectStyles,
  2014. "d262f43e",
  2015. "05c2c4fb"
  2016. )
  2017. /* harmony default export */ var imageList = __webpack_exports__["default"] = (component.exports);
  2018. /***/ }),
  2019. /***/ 197:
  2020. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2021. "use strict";
  2022. // ESM COMPAT FLAG
  2023. __webpack_require__.r(__webpack_exports__);
  2024. // 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/ExportDialog.vue?vue&type=template&id=1381fc6c&scoped=true
  2025. var render = function render() {
  2026. var _vm = this,
  2027. _c = _vm._self._c;
  2028. return _c('el-dialog', {
  2029. attrs: {
  2030. "lock-scroll": false,
  2031. "title": _vm.title,
  2032. "visible": _vm.visible,
  2033. "width": "700px",
  2034. "before-close": _vm.handleClose,
  2035. "close-on-click-modal": false,
  2036. "top": "0"
  2037. },
  2038. on: {
  2039. "update:visible": function ($event) {
  2040. _vm.visible = $event;
  2041. }
  2042. }
  2043. }, [_c('el-form', {
  2044. ref: "ruleForm",
  2045. attrs: {
  2046. "model": _vm.emailForm,
  2047. "rules": _vm.rules
  2048. }
  2049. }, _vm._l(_vm.emailForm, function (val, key) {
  2050. return _c('el-form-item', {
  2051. key: key,
  2052. attrs: {
  2053. "label": _vm.labelShow ? key : '',
  2054. "label-width": _vm.labelWidth + 'px',
  2055. "prop": key
  2056. }
  2057. }, [_c('el-input', {
  2058. attrs: {
  2059. "readonly": ""
  2060. },
  2061. model: {
  2062. value: _vm.emailForm[key],
  2063. callback: function ($$v) {
  2064. _vm.$set(_vm.emailForm, key, $$v);
  2065. },
  2066. expression: "emailForm[key]"
  2067. }
  2068. }), _c('el-button', {
  2069. class: key,
  2070. attrs: {
  2071. "data-clipboard-text": _vm.emailForm[key],
  2072. "type": "primary"
  2073. },
  2074. on: {
  2075. "click": function ($event) {
  2076. $event.preventDefault();
  2077. return _vm.copyUrl(key);
  2078. }
  2079. }
  2080. }, [_vm._v("copy link")])], 1);
  2081. }), 1)], 1);
  2082. };
  2083. var staticRenderFns = [];
  2084. // CONCATENATED MODULE: ./components/ExportDialog.vue?vue&type=template&id=1381fc6c&scoped=true
  2085. // EXTERNAL MODULE: external "clipboard"
  2086. var external_clipboard_ = __webpack_require__(140);
  2087. var external_clipboard_default = /*#__PURE__*/__webpack_require__.n(external_clipboard_);
  2088. // 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/ExportDialog.vue?vue&type=script&lang=js
  2089. /* harmony default export */ var ExportDialogvue_type_script_lang_js = ({
  2090. props: {
  2091. title: {
  2092. type: String,
  2093. default: 'Send Email'
  2094. },
  2095. sendbtnCext: {
  2096. type: String,
  2097. default: 'SUBMIT REQUEST'
  2098. },
  2099. isSendPdf: {
  2100. type: Boolean,
  2101. default: false
  2102. },
  2103. labelShow: {
  2104. type: Boolean,
  2105. default: true
  2106. },
  2107. emailForm: {},
  2108. rules: {},
  2109. labelWidth: Number,
  2110. visible: {
  2111. type: Boolean,
  2112. default: false
  2113. }
  2114. },
  2115. methods: {
  2116. copyUrl(key) {
  2117. let clipboard = new external_clipboard_default.a(`.${key}`);
  2118. clipboard.on('success', e => {
  2119. this.$message.success("link copied to clipboard"); // 利用Element组件给予成功提示
  2120. clipboard.destroy(); // 释放内存
  2121. });
  2122. clipboard.on('error', e => {
  2123. this.$message.error('The browser does not support automatic replication'); // 给予错误提示信息
  2124. clipboard.destroy(); // 释放内存
  2125. });
  2126. },
  2127. handleClose() {
  2128. this.$emit('update:visible', false);
  2129. }
  2130. }
  2131. });
  2132. // CONCATENATED MODULE: ./components/ExportDialog.vue?vue&type=script&lang=js
  2133. /* harmony default export */ var components_ExportDialogvue_type_script_lang_js = (ExportDialogvue_type_script_lang_js);
  2134. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  2135. var componentNormalizer = __webpack_require__(2);
  2136. // CONCATENATED MODULE: ./components/ExportDialog.vue
  2137. function injectStyles (context) {
  2138. var style0 = __webpack_require__(187)
  2139. if (style0.__inject__) style0.__inject__(context)
  2140. }
  2141. /* normalize component */
  2142. var component = Object(componentNormalizer["a" /* default */])(
  2143. components_ExportDialogvue_type_script_lang_js,
  2144. render,
  2145. staticRenderFns,
  2146. false,
  2147. injectStyles,
  2148. "1381fc6c",
  2149. "5781176c"
  2150. )
  2151. /* harmony default export */ var ExportDialog = __webpack_exports__["default"] = (component.exports);
  2152. /***/ }),
  2153. /***/ 209:
  2154. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2155. "use strict";
  2156. __webpack_require__.r(__webpack_exports__);
  2157. /* 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_orderDetailPart_vue_vue_type_style_index_0_id_0272884e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(176);
  2158. /* 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_orderDetailPart_vue_vue_type_style_index_0_id_0272884e_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_orderDetailPart_vue_vue_type_style_index_0_id_0272884e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
  2159. /* 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_orderDetailPart_vue_vue_type_style_index_0_id_0272884e_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_orderDetailPart_vue_vue_type_style_index_0_id_0272884e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  2160. /***/ }),
  2161. /***/ 222:
  2162. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2163. "use strict";
  2164. // ESM COMPAT FLAG
  2165. __webpack_require__.r(__webpack_exports__);
  2166. // 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!./pages/home/myDetail/components/orderDetailPart.vue?vue&type=template&id=0272884e&scoped=true
  2167. var render = function render() {
  2168. var _vm$orderDetail$crm_p;
  2169. var _vm = this,
  2170. _c = _vm._self._c;
  2171. return _c('div', {
  2172. staticClass: "order-detail-part"
  2173. }, [_vm.isLoading == 1 ? _c('div', {
  2174. directives: [{
  2175. name: "loading",
  2176. rawName: "v-loading",
  2177. value: true,
  2178. expression: "true"
  2179. }],
  2180. staticClass: "com-loading"
  2181. }) : _vm.isLoading == 2 ? [_vm._ssrNode("<section class=\"main-header\" data-v-0272884e>", "</section>", [_vm._ssrNode("<div class=\"main-header-mid flex between\" data-v-0272884e><h1 data-v-0272884e>" + _vm._ssrEscape("Job Name:" + _vm._s(_vm.orderDetail.Sales_Order_Title_Job_Name)) + "</h1> " + (_vm.orderDetail.user_logo ? "<img" + _vm._ssrAttr("src", _vm.orderDetail.user_logo) + " class=\"user_logo\" data-v-0272884e>" : "<!---->") + "</div> "), _vm._ssrNode("<div class=\"main-header-mid flex between\" data-v-0272884e>", "</div>", [_vm._ssrNode("<ul class=\"left\" data-v-0272884e>", "</ul>", [_vm._ssrNode((_vm.isShow ? "<li class=\"left-i\" data-v-0272884e><i class=\"el-icon-share\" data-v-0272884e></i> <span data-v-0272884e>Client Tracking Share</span></li>" : "<!---->") + " "), (_vm$orderDetail$crm_p = _vm.orderDetail.crm_pr_res) !== null && _vm$orderDetail$crm_p !== void 0 && _vm$orderDetail$crm_p.length ? _vm._ssrNode("<li class=\"left-i\" data-v-0272884e>", "</li>", [_c('image-list', {
  2182. attrs: {
  2183. "data": _vm.orderDetail.crm_pr_res
  2184. }
  2185. })], 1) : _vm._e()], 2), _vm._ssrNode(" <ul class=\"right\" data-v-0272884e>" + (_vm.orderDetail.Job_Group && _vm.isShow ? "<li data-v-0272884e>" + _vm._ssrEscape("\n Order Type: " + _vm._s(_vm.orderDetail.Job_Group) + "\n ") + "</li>" : "<!---->") + " <li data-v-0272884e>" + _vm._ssrEscape("Order No: " + _vm._s(_vm.orderDetail.Reference)) + "</li> <li data-v-0272884e>" + _vm._ssrEscape("\n Order Date: " + _vm._s(_vm.formatStepDesc(_vm.orderDetail.Sales_Order_Created)) + "\n ") + "</li> " + (_vm.orderDetail.Expected_Delivery_Date ? "<li data-v-0272884e>" + _vm._ssrEscape("\n ETA: " + _vm._s(_vm.formatStepDesc(_vm.orderDetail.Expected_Delivery_Date)) + "\n ") + "</li>" : "<!---->") + " " + (_vm.isShow ? "<li data-v-0272884e>" + _vm._ssrEscape("\n Payment Status: " + _vm._s(_vm.orderDetail.Payment_Status1) + "\n ") + "</li>" : "<!---->") + "</ul>")], 2), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"steps margin-b-30\" data-v-0272884e>", "</div>", [_vm._ssrNode("<p class=\"steps-title margin-b-50\" data-v-0272884e>Bulk Production</p> "), _c('el-steps', {
  2186. attrs: {
  2187. "active": _vm.comOrderState,
  2188. "align-center": "",
  2189. "direction": _vm.computedStepDirection,
  2190. "finish-status": "success",
  2191. "process-status": "wait"
  2192. }
  2193. }, [_c('el-step', {
  2194. attrs: {
  2195. "title": "Confirmed",
  2196. "description": _vm.formatStepDesc(_vm.orderDetail.Order_Confirm)
  2197. }
  2198. }), _vm._v(" "), _c('el-step', {
  2199. attrs: {
  2200. "title": "In Production",
  2201. "description": _vm.formatStepDesc(_vm.orderDetail.Sampling_Factory_Confirm)
  2202. }
  2203. }), _vm._v(" "), _c('el-step', {
  2204. attrs: {
  2205. "title": "QC Inspection",
  2206. "description": _vm.formatStepDesc(_vm.orderDetail.GZ_WH)
  2207. }
  2208. }), _vm._v(" "), _c('el-step', {
  2209. attrs: {
  2210. "title": "International Shipment",
  2211. "description": _vm.formatStepDesc(_vm.orderDetail.International_transshipment)
  2212. }
  2213. }), _vm._v(" "), _c('el-step', {
  2214. attrs: {
  2215. "title": "AU Warehouse",
  2216. "description": _vm.formatStepDesc(_vm.orderDetail.AU_WH)
  2217. }
  2218. }), _vm._v(" "), _c('el-step', {
  2219. attrs: {
  2220. "title": _vm.orderDetail.Order_Stage === 'Bulk Production Shipping' ? 'Domestic Delivery' : 'Shipped',
  2221. "description": _vm.formatStepDesc(_vm.orderDetail.AU_WH_Client)
  2222. }
  2223. }), _vm._v(" "), _c('el-step', {
  2224. attrs: {
  2225. "title": "Delivered",
  2226. "description": _vm.formatStepDesc(_vm.orderDetail.Delivered)
  2227. }
  2228. })], 1)], 2), _vm._ssrNode(" "), _vm.orderDetail.Sample_Stage ? _vm._ssrNode("<div" + _vm._ssrClass("steps", {
  2229. 'margin-b-30': _vm.stepShow
  2230. }) + " data-v-0272884e>", "</div>", [_vm._ssrNode("<p" + _vm._ssrClass("steps-title pointer", {
  2231. 'margin-b-50': _vm.stepShow
  2232. }) + " data-v-0272884e>\n Sample Dispatch\n <i" + _vm._ssrClass(null, _vm.stepShow ? 'el-icon-arrow-down' : 'el-icon-arrow-right') + " data-v-0272884e></i></p> "), _vm.stepShow ? _c('el-steps', {
  2233. attrs: {
  2234. "active": _vm.comSampleState,
  2235. "align-center": "",
  2236. "space": 180,
  2237. "direction": _vm.computedStepDirection,
  2238. "finish-status": "success",
  2239. "process-status": "wait"
  2240. }
  2241. }, [_c('el-step', {
  2242. attrs: {
  2243. "title": "Factory Process",
  2244. "description": _vm.formatStepDesc(_vm.orderDetail.Sample_Factory_Confirmed)
  2245. }
  2246. }), _vm._v(" "), _c('el-step', {
  2247. attrs: {
  2248. "title": "Sample Dispatching",
  2249. "description": _vm.formatStepDesc(_vm.orderDetail.Sample_Dispatching)
  2250. }
  2251. }), _vm._v(" "), _c('el-step', {
  2252. attrs: {
  2253. "title": "Sample Delivered",
  2254. "description": _vm.formatStepDesc(_vm.orderDetail.Sample_Delivered)
  2255. }
  2256. })], 1) : _vm._e()], 2) : _vm._e()], 2), _vm._ssrNode(" <section class=\"main-custom\" data-v-0272884e><p class=\"sharing-title\" data-v-0272884e>Customer information</p> <div data-v-0272884e><p class=\"sharing-subtitle\" data-v-0272884e>" + _vm._ssrEscape("\n " + _vm._s(_vm.isShow ? 'Billing' : 'Supplier') + " Address\n ") + "</p> <div class=\"sharing-address\" data-v-0272884e><p data-v-0272884e>" + _vm._ssrEscape(_vm._s(_vm.orderDetail.Account_Name_name)) + "</p> <p data-v-0272884e>" + _vm._ssrEscape(_vm._s(_vm.orderDetail.Billing_Unit_Building_Name)) + "</p> <p data-v-0272884e>" + _vm._ssrEscape(_vm._s(_vm.orderDetail.Billing_Street)) + "</p> <p data-v-0272884e>" + _vm._ssrEscape(_vm._s(_vm.orderDetail.Billing_City)) + "</p> <p data-v-0272884e>" + _vm._ssrEscape(_vm._s(_vm.orderDetail.Billing_State)) + "</p> <p data-v-0272884e>" + _vm._ssrEscape(_vm._s(_vm.orderDetail.Billing_Code)) + "</p> <p data-v-0272884e>" + _vm._ssrEscape(_vm._s(_vm.orderDetail.Billing_Country)) + "</p></div></div> <div data-v-0272884e><p class=\"sharing-subtitle\" data-v-0272884e>Shipping Address</p> <div class=\"sharing-address\" data-v-0272884e><p data-v-0272884e>" + _vm._ssrEscape(_vm._s(_vm.orderDetail.Shipping_Unit_Building_Name)) + "</p> <p data-v-0272884e>" + _vm._ssrEscape(_vm._s(_vm.orderDetail.Shipping_Street)) + "</p> <p data-v-0272884e>" + _vm._ssrEscape(_vm._s(_vm.orderDetail.Shipping_City)) + "</p> <p data-v-0272884e>" + _vm._ssrEscape(_vm._s(_vm.orderDetail.Shipping_State)) + "</p> <p data-v-0272884e>" + _vm._ssrEscape(_vm._s(_vm.orderDetail.Shipping_Code)) + "</p> <p data-v-0272884e>" + _vm._ssrEscape(_vm._s(_vm.orderDetail.Shipping_Country)) + "</p></div></div></section> "), _vm._ssrNode("<section data-v-0272884e>", "</section>", [_vm._ssrNode("<p class=\"sharing-title\" data-v-0272884e>Shipping information</p> "), _c('el-table', {
  2257. staticStyle: {
  2258. "width": "100%"
  2259. },
  2260. attrs: {
  2261. "data": _vm.orderDetail.shipping_tracking,
  2262. "header-cell-style": {
  2263. background: '#F7F8FC',
  2264. color: '#101010',
  2265. fontWeight: 'normal'
  2266. }
  2267. }
  2268. }, [_c('el-table-column', {
  2269. staticStyle: {
  2270. "padding": "0"
  2271. },
  2272. attrs: {
  2273. "type": "expand"
  2274. },
  2275. scopedSlots: _vm._u([{
  2276. key: "default",
  2277. fn: function (props) {
  2278. return [_c('el-table', {
  2279. staticStyle: {
  2280. "margin-left": "50px",
  2281. "width": "calc(100% - 50px)"
  2282. },
  2283. attrs: {
  2284. "data": props.row.test_pkg_details,
  2285. "header-cell-style": {
  2286. background: '#F7F8FC',
  2287. color: '#101010',
  2288. fontWeight: 'normal'
  2289. }
  2290. }
  2291. }, [_c('el-table-column', {
  2292. attrs: {
  2293. "prop": "Product_name",
  2294. "label": "Item & Description"
  2295. }
  2296. }), _vm._v(" "), _c('el-table-column', {
  2297. attrs: {
  2298. "prop": "Quantity_to_pack",
  2299. "label": "QTY",
  2300. "width": "450"
  2301. }
  2302. })], 1)];
  2303. }
  2304. }])
  2305. }), _vm._v(" "), _c('el-table-column', {
  2306. attrs: {
  2307. "prop": "Title",
  2308. "label": "Job Name",
  2309. "width": "190"
  2310. }
  2311. }), _vm._v(" "), _c('el-table-column', {
  2312. attrs: {
  2313. "prop": "Courier",
  2314. "label": "Carrier",
  2315. "width": "190"
  2316. }
  2317. }), _vm._v(" "), _c('el-table-column', {
  2318. attrs: {
  2319. "prop": "Tracking_No",
  2320. "label": "Tracking#",
  2321. "width": "190"
  2322. }
  2323. }), _vm._v(" "), _c('el-table-column', {
  2324. attrs: {
  2325. "prop": "Package_Status",
  2326. "label": "Shipment Status",
  2327. "width": "190"
  2328. }
  2329. }), _vm._v(" "), _c('el-table-column', {
  2330. attrs: {
  2331. "label": "Delivery Address",
  2332. "width": "250"
  2333. },
  2334. scopedSlots: _vm._u([{
  2335. key: "default",
  2336. fn: function (scope) {
  2337. return [_c('span', [_vm._v("\n " + _vm._s(scope.row.Shipping_Unit_Building_Name)), _c('br'), _vm._v("\n " + _vm._s(scope.row.Shipping_Street)), _c('br'), _vm._v("\n " + _vm._s(scope.row.Shipping_City)), _c('br'), _vm._v("\n " + _vm._s(scope.row.Shipping_State) + "\n ")])];
  2338. }
  2339. }])
  2340. }), _vm._v(" "), _c('el-table-column', {
  2341. attrs: {
  2342. "prop": "Tracking_URL",
  2343. "label": "",
  2344. "width": "200"
  2345. },
  2346. scopedSlots: _vm._u([{
  2347. key: "default",
  2348. fn: function (scope) {
  2349. return scope.row.Tracking_URL ? [_c('el-button', {
  2350. staticStyle: {
  2351. "background-color": "rgb(0, 33, 59)",
  2352. "color": "#fff"
  2353. },
  2354. attrs: {
  2355. "size": "mini",
  2356. "plain": ""
  2357. },
  2358. nativeOn: {
  2359. "click": function ($event) {
  2360. return _vm.openTracking_URL(scope.row.Tracking_URL);
  2361. }
  2362. }
  2363. }, [_vm._v("TRACK SHIPMENT")])] : undefined;
  2364. }
  2365. }], null, true)
  2366. })], 1)], 2), _vm._ssrNode(" "), _vm._ssrNode("<section class=\"orderTable\" data-v-0272884e>", "</section>", [_vm._ssrNode("<p class=\"sharing-title\" data-v-0272884e>Products Information</p> "), _c('el-table', {
  2367. staticStyle: {
  2368. "width": "100%"
  2369. },
  2370. attrs: {
  2371. "data": _vm.orderDetail.sales_orders_details,
  2372. "header-cell-style": {
  2373. background: '#fff',
  2374. color: '#101010',
  2375. fontWeight: 'normal'
  2376. }
  2377. }
  2378. }, [_c('el-table-column', {
  2379. attrs: {
  2380. "type": "index",
  2381. "label": "S.NO",
  2382. "width": "70",
  2383. "fixed": ""
  2384. }
  2385. }), _vm._v(" "), _c('el-table-column', {
  2386. attrs: {
  2387. "label": "Product Name",
  2388. "min-width": "300"
  2389. },
  2390. scopedSlots: _vm._u([{
  2391. key: "default",
  2392. fn: function (scope) {
  2393. return [_c('p', {
  2394. staticClass: "colorBlue"
  2395. }, [_vm._v(_vm._s(scope.row.product_name))]), _vm._v(" "), _c('p', {
  2396. domProps: {
  2397. "innerHTML": _vm._s(scope.row.product_description)
  2398. }
  2399. })];
  2400. }
  2401. }])
  2402. }), _vm._v(" "), _c('el-table-column', {
  2403. attrs: {
  2404. "prop": "quantity",
  2405. "label": "Quantity",
  2406. "align": "left",
  2407. "width": _vm.isShow ? 125 : 200
  2408. }
  2409. }), _vm._v(" "), _vm.isShow ? [_c('el-table-column', {
  2410. attrs: {
  2411. "prop": "list_price",
  2412. "label": `List Price(${_vm.comCurrency})`,
  2413. "width": "125"
  2414. },
  2415. scopedSlots: _vm._u([{
  2416. key: "default",
  2417. fn: function (scope) {
  2418. return [_vm._v("\n " + _vm._s(_vm.transformNumber(scope.row.list_price)) + "\n ")];
  2419. }
  2420. }], null, false, 2317124035)
  2421. }), _vm._v(" "), _c('el-table-column', {
  2422. attrs: {
  2423. "prop": "amount",
  2424. "label": `Amount(${_vm.comCurrency})`,
  2425. "width": "125"
  2426. },
  2427. scopedSlots: _vm._u([{
  2428. key: "default",
  2429. fn: function (scope) {
  2430. return [_vm._v("\n " + _vm._s(_vm.transformNumber(scope.row.amount)) + "\n ")];
  2431. }
  2432. }], null, false, 266223839)
  2433. }), _vm._v(" "), _c('el-table-column', {
  2434. attrs: {
  2435. "prop": "Tax",
  2436. "label": `Tax(${_vm.comCurrency})`,
  2437. "width": "125"
  2438. },
  2439. scopedSlots: _vm._u([{
  2440. key: "default",
  2441. fn: function (scope) {
  2442. return [_vm._v("\n " + _vm._s(_vm.transformNumber(scope.row.Tax)) + "\n ")];
  2443. }
  2444. }], null, false, 576653726)
  2445. }), _vm._v(" "), _c('el-table-column', {
  2446. attrs: {
  2447. "prop": "Discount",
  2448. "label": `Discount(${_vm.comCurrency})`,
  2449. "width": "125"
  2450. },
  2451. scopedSlots: _vm._u([{
  2452. key: "default",
  2453. fn: function (scope) {
  2454. return [_vm._v("\n " + _vm._s(_vm.transformNumber(scope.row.Discount)) + "\n ")];
  2455. }
  2456. }], null, false, 3596838958)
  2457. }), _vm._v(" "), _c('el-table-column', {
  2458. attrs: {
  2459. "prop": "net_total",
  2460. "label": `Total(${_vm.comCurrency})`,
  2461. "width": "125"
  2462. },
  2463. scopedSlots: _vm._u([{
  2464. key: "default",
  2465. fn: function (scope) {
  2466. return [_vm._v("\n " + _vm._s(_vm.transformNumber(scope.row.net_total)) + "\n ")];
  2467. }
  2468. }], null, false, 104449041)
  2469. })] : _vm._e()], 2), _vm._ssrNode(" " + (_vm.isShow ? "<div class=\"table-wrap\" data-v-0272884e><table class=\"total\" data-v-0272884e><tr data-v-0272884e><td data-v-0272884e>Sub Total</td> <td data-v-0272884e>" + _vm._ssrEscape("\n " + _vm._s(_vm.comCurrency) + " " + _vm._s(_vm.transformNumber(_vm.orderDetail.Sub_Total)) + "\n ") + "</td></tr> <tr data-v-0272884e><td data-v-0272884e>Total Taxes</td> <td data-v-0272884e>" + _vm._ssrEscape("\n " + _vm._s(_vm.comCurrency) + " " + _vm._s(_vm.transformNumber(_vm.orderDetail.Tax_Total)) + "\n ") + "</td></tr> <tr data-v-0272884e><td data-v-0272884e>Total Discount</td> <td data-v-0272884e>" + _vm._ssrEscape("\n " + _vm._s(_vm.comCurrency) + "\n " + _vm._s(_vm.transformNumber(_vm.orderDetail.Total_Including_Discount)) + "\n ") + "</td></tr> <tr data-v-0272884e><td data-v-0272884e>Adjustment</td> <td data-v-0272884e>" + _vm._ssrEscape("\n " + _vm._s(_vm.comCurrency) + "\n " + _vm._s(_vm.transformNumber(_vm.orderDetail.Total_Adjustment)) + "\n ") + "</td></tr> <tr data-v-0272884e><td data-v-0272884e>Grand Total</td> <td data-v-0272884e>" + _vm._ssrEscape("\n " + _vm._s(_vm.comCurrency) + " " + _vm._s(_vm.transformNumber(_vm.orderDetail.Grand_Total)) + "\n ") + "</td></tr></table></div>" : "<!---->") + " " + (_vm.isShow ? "<p class=\"notes-1\" data-v-0272884e>Notes</p> <p class=\"notes-2\" data-v-0272884e>Terms &amp; conditions</p> <p class=\"notes-2\" data-v-0272884e>Artwork Approval</p> <p class=\"notes-3\" data-v-0272884e>" + _vm._ssrEscape(_vm._s(_vm.orderDetail.Subject)) + "</p>" : "<!---->"))], 2)] : _vm._ssrNode("<div data-v-0272884e>", "</div>", [_c('el-empty', {
  2470. attrs: {
  2471. "description": "No Data"
  2472. }
  2473. })], 1), _vm._ssrNode(" "), _c('el-dialog', {
  2474. attrs: {
  2475. "lock-scroll": false,
  2476. "visible": _vm.urlDialogShow,
  2477. "center": "",
  2478. "width": "850px",
  2479. "top": "20vh"
  2480. },
  2481. on: {
  2482. "update:visible": function ($event) {
  2483. _vm.urlDialogShow = $event;
  2484. }
  2485. }
  2486. }, [_c('iframe', {
  2487. staticStyle: {
  2488. "width": "100%",
  2489. "height": "500px"
  2490. },
  2491. attrs: {
  2492. "src": _vm.Tracking_URL,
  2493. "frameborder": "0"
  2494. }
  2495. })]), _vm._ssrNode(" "), _c('export-dialog', {
  2496. attrs: {
  2497. "emailForm": _vm.shareForm,
  2498. "visible": _vm.shareDialogVisible,
  2499. "title": 'Client Tracking Share (no pricing displayed)',
  2500. "labelShow": false
  2501. },
  2502. on: {
  2503. "update:visible": function ($event) {
  2504. _vm.shareDialogVisible = $event;
  2505. }
  2506. }
  2507. })], 2);
  2508. };
  2509. var staticRenderFns = [];
  2510. // CONCATENATED MODULE: ./pages/home/myDetail/components/orderDetailPart.vue?vue&type=template&id=0272884e&scoped=true
  2511. // EXTERNAL MODULE: ./node_modules/lodash.throttle/index.js
  2512. var lodash_throttle = __webpack_require__(185);
  2513. var lodash_throttle_default = /*#__PURE__*/__webpack_require__.n(lodash_throttle);
  2514. // EXTERNAL MODULE: external "vuex"
  2515. var external_vuex_ = __webpack_require__(6);
  2516. // EXTERNAL MODULE: ./utils/price.js
  2517. var price = __webpack_require__(175);
  2518. // 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!./pages/home/myDetail/components/orderDetailPart.vue?vue&type=script&lang=js
  2519. /* harmony default export */ var orderDetailPartvue_type_script_lang_js = ({
  2520. name: 'OrderDetailPart',
  2521. props: {
  2522. isShow: {
  2523. // 订单分享页面隐藏元素
  2524. type: Boolean,
  2525. default: true
  2526. },
  2527. hasUid: {
  2528. type: Boolean,
  2529. default: true
  2530. }
  2531. },
  2532. data() {
  2533. return {
  2534. orderDetail: {},
  2535. isLoading: 1,
  2536. packageTable: [],
  2537. stepShow: false,
  2538. urlDialogShow: false,
  2539. shareDialogVisible: false,
  2540. loginCount: 0,
  2541. shareForm: {
  2542. Link: ''
  2543. },
  2544. Tracking_URL: '',
  2545. stepConfig: {
  2546. 'Order Confirmed': 1,
  2547. 'Factory Confirmed': 2,
  2548. 'GZ WH': 3,
  2549. Transshipment: 4,
  2550. 'AU WH': 5,
  2551. 'AUWH - Client': 6,
  2552. 'Bulk Production Shipping': 6,
  2553. 'Bulk Production Delivered': 7,
  2554. 'Completed Sales Order': 7,
  2555. 'Factory Process': 1,
  2556. 'Sample Dispatching': 2,
  2557. 'Sample Delivered': 3
  2558. },
  2559. computedStepDirection: 'horizontal'
  2560. };
  2561. },
  2562. computed: {
  2563. loginSuccess() {
  2564. return this.$store.state.loginSuccess;
  2565. },
  2566. comCurrency() {
  2567. return this.orderDetail.Currency;
  2568. },
  2569. comOrderState() {
  2570. if (this.orderDetail.Order_Stage === 'Cancelled') {
  2571. return 0;
  2572. }
  2573. return this.stepConfig[this.orderDetail.Order_Stage];
  2574. },
  2575. comSampleState() {
  2576. return this.stepConfig[this.orderDetail.Sample_Stage];
  2577. }
  2578. },
  2579. watch: {
  2580. loginSuccess(newVal) {
  2581. if (newVal) {
  2582. this.getOrderDetail(); // 当登录成功后调用获取订单详情
  2583. this.$store.commit('setLoginSuccess', false);
  2584. }
  2585. }
  2586. },
  2587. beforeMount() {
  2588. window.addEventListener('resize', this.judgeStepDirection, false);
  2589. this.judgeStepDirection();
  2590. },
  2591. created() {
  2592. this.getOrderDetail();
  2593. },
  2594. beforeDestroy() {
  2595. window.removeEventListener('resize', this.judgeStepDirection, false);
  2596. },
  2597. methods: {
  2598. ...Object(external_vuex_["mapMutations"])({
  2599. openDialog: 'openDialog'
  2600. }),
  2601. judgeStepDirection: lodash_throttle_default()(function () {
  2602. this.computedStepDirection = window.document.body.clientWidth >= 1000 ? 'horizontal' : 'vertical';
  2603. }, 300),
  2604. toggleStep() {
  2605. this.stepShow = !this.stepShow;
  2606. },
  2607. getOrderDetail() {
  2608. let path = '';
  2609. let data = {};
  2610. if (this.isShow) {
  2611. const {
  2612. id
  2613. } = this.$store.state.userInfo;
  2614. const {
  2615. crm,
  2616. id: queryId
  2617. } = this.$route.query;
  2618. path = '/uk-api/crmdata/orders_detail';
  2619. this.shareForm.Link = `https://www.trackship.com.au/orderShare/${id}/${crm}/${queryId}`;
  2620. data = {
  2621. accounts_id: crm,
  2622. id: queryId
  2623. };
  2624. } else {
  2625. path = '/uk-api/crmdata/showOrdersDetail';
  2626. if (this.hasUid) {
  2627. const {
  2628. uid,
  2629. aid,
  2630. id
  2631. } = this.$route.params;
  2632. data = {
  2633. user_id: uid,
  2634. accounts_id: aid,
  2635. id
  2636. };
  2637. } else {
  2638. const {
  2639. aid,
  2640. id
  2641. } = this.$route.params;
  2642. data = {
  2643. accounts_id: aid,
  2644. id
  2645. };
  2646. }
  2647. }
  2648. this.$axios.post(path, data).then(res => {
  2649. var _this$orderDetail$shi, _this$orderDetail$sal;
  2650. if (res.result === null) {
  2651. this.handleBranchLogic();
  2652. }
  2653. this.orderDetail = res.result;
  2654. if ((_this$orderDetail$shi = this.orderDetail.shipping_tracking) !== null && _this$orderDetail$shi !== void 0 && _this$orderDetail$shi.length) {
  2655. const isDelivered = true;
  2656. for (const items of this.orderDetail.shipping_tracking) {
  2657. var _items$test_pkg_detai;
  2658. if ((_items$test_pkg_detai = items.test_pkg_details) !== null && _items$test_pkg_detai !== void 0 && _items$test_pkg_detai.length) {
  2659. items.test_pkg_details.forEach(item => {
  2660. item.Courier = items.Courier;
  2661. item.Tracking_No = items.Tracking_No;
  2662. item.Package_Status = items.Package_Status;
  2663. item.Tracking_URL = items.Tracking_URL;
  2664. });
  2665. }
  2666. }
  2667. }
  2668. if ((_this$orderDetail$sal = this.orderDetail.sales_orders_details) !== null && _this$orderDetail$sal !== void 0 && _this$orderDetail$sal.length) {
  2669. if (this.isShow) {
  2670. this.orderDetail.sales_orders_details.forEach(items => {
  2671. this.$set(items, 'showMore', true);
  2672. });
  2673. } else {
  2674. this.orderDetail.sales_orders_details = this.orderDetail.sales_orders_details.filter(item => {
  2675. return item.product_Product_Code !== 'PC Setup Service' && item.product_Product_Code !== 'PC Freight';
  2676. }).map(item => {
  2677. this.$set(item, 'showMore', true);
  2678. return item;
  2679. });
  2680. }
  2681. }
  2682. this.isLoading = 2;
  2683. }).catch(() => {
  2684. this.handleBranchLogic();
  2685. });
  2686. },
  2687. handleBranchLogic() {
  2688. this.isLoading = 3;
  2689. if (this.loginCount) {
  2690. this.$router.push('/');
  2691. return;
  2692. }
  2693. this.isShow && setTimeout(() => {
  2694. this.openDialog();
  2695. this.loginCount = 1;
  2696. }, 1000);
  2697. },
  2698. transformNumber(value) {
  2699. return Object(price["a" /* round */])(Number(value)).toFixed(2);
  2700. },
  2701. formatStepDesc(date, isUnix = false) {
  2702. return this.$utils.formatTime(date, 'DD/MM/YYYY', isUnix);
  2703. },
  2704. toggleShow(row) {
  2705. row.showMore = !row.showMore;
  2706. },
  2707. openTracking_URL(url) {
  2708. this.Tracking_URL = url;
  2709. this.urlDialogShow = true;
  2710. }
  2711. }
  2712. });
  2713. // CONCATENATED MODULE: ./pages/home/myDetail/components/orderDetailPart.vue?vue&type=script&lang=js
  2714. /* harmony default export */ var components_orderDetailPartvue_type_script_lang_js = (orderDetailPartvue_type_script_lang_js);
  2715. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  2716. var componentNormalizer = __webpack_require__(2);
  2717. // CONCATENATED MODULE: ./pages/home/myDetail/components/orderDetailPart.vue
  2718. function injectStyles (context) {
  2719. var style0 = __webpack_require__(209)
  2720. if (style0.__inject__) style0.__inject__(context)
  2721. }
  2722. /* normalize component */
  2723. var component = Object(componentNormalizer["a" /* default */])(
  2724. components_orderDetailPartvue_type_script_lang_js,
  2725. render,
  2726. staticRenderFns,
  2727. false,
  2728. injectStyles,
  2729. "0272884e",
  2730. "4359a921"
  2731. )
  2732. /* harmony default export */ var orderDetailPart = __webpack_exports__["default"] = (component.exports);
  2733. /* nuxt-component-imports */
  2734. installComponents(component, {ImageList: __webpack_require__(196).default,ExportDialog: __webpack_require__(197).default})
  2735. /***/ }),
  2736. /***/ 363:
  2737. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2738. "use strict";
  2739. // ESM COMPAT FLAG
  2740. __webpack_require__.r(__webpack_exports__);
  2741. // 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!./pages/home/myDetail/orderDetail.vue?vue&type=template&id=01f46a4a
  2742. var render = function render() {
  2743. var _vm = this,
  2744. _c = _vm._self._c;
  2745. return _c('div', {
  2746. staticClass: "com-main com-margin-auto"
  2747. }, [_c('el-breadcrumb', {
  2748. attrs: {
  2749. "separator-class": "el-icon-arrow-right"
  2750. }
  2751. }, [_c('el-breadcrumb-item', {
  2752. attrs: {
  2753. "to": {
  2754. path: '/'
  2755. }
  2756. }
  2757. }, [_vm._v("Home")]), _vm._v(" "), _c('el-breadcrumb-item', {
  2758. attrs: {
  2759. "to": {
  2760. path: '/home/myDetail',
  2761. query: {
  2762. type: 'all-orders'
  2763. }
  2764. }
  2765. }
  2766. }, [_vm._v("My Orders")]), _vm._v(" "), _c('el-breadcrumb-item', [_vm._v("detail")])], 1), _vm._ssrNode(" "), _c('order-detail-part')], 2);
  2767. };
  2768. var staticRenderFns = [];
  2769. // CONCATENATED MODULE: ./pages/home/myDetail/orderDetail.vue?vue&type=template&id=01f46a4a
  2770. // EXTERNAL MODULE: ./pages/home/myDetail/components/orderDetailPart.vue + 4 modules
  2771. var orderDetailPart = __webpack_require__(222);
  2772. // 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!./pages/home/myDetail/orderDetail.vue?vue&type=script&lang=js
  2773. /* harmony default export */ var orderDetailvue_type_script_lang_js = ({
  2774. components: {
  2775. orderDetailPart: orderDetailPart["default"]
  2776. }
  2777. });
  2778. // CONCATENATED MODULE: ./pages/home/myDetail/orderDetail.vue?vue&type=script&lang=js
  2779. /* harmony default export */ var myDetail_orderDetailvue_type_script_lang_js = (orderDetailvue_type_script_lang_js);
  2780. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  2781. var componentNormalizer = __webpack_require__(2);
  2782. // CONCATENATED MODULE: ./pages/home/myDetail/orderDetail.vue
  2783. /* normalize component */
  2784. var component = Object(componentNormalizer["a" /* default */])(
  2785. myDetail_orderDetailvue_type_script_lang_js,
  2786. render,
  2787. staticRenderFns,
  2788. false,
  2789. null,
  2790. null,
  2791. "37977c27"
  2792. )
  2793. /* harmony default export */ var orderDetail = __webpack_exports__["default"] = (component.exports);
  2794. /***/ })
  2795. };;
  2796. //# sourceMappingURL=orderDetail.js.map