exports.ids = [27,24,26,33,34,35,36,38,39,40];
exports.modules = {
/***/ 147:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return on; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return off; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return once; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return hasClass; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addClass; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return removeClass; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getStyle; });
/* unused harmony export setStyle */
/* unused harmony export isScroll */
/* unused harmony export getScrollContainer */
/* unused harmony export isInContainer */
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
/* istanbul ignore next */
const isServer = vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer;
const SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
const MOZ_HACK_REGEXP = /^moz([A-Z])/;
const ieVersion = isServer ? 0 : Number(document.documentMode);
/* istanbul ignore next */
const trim = function(string) {
return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, '');
};
/* istanbul ignore next */
const camelCase = function(name) {
return name.replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) {
return offset ? letter.toUpperCase() : letter;
}).replace(MOZ_HACK_REGEXP, 'Moz$1');
};
/* istanbul ignore next */
const on = (function() {
if (!isServer && document.addEventListener) {
return function(element, event, handler) {
if (element && event && handler) {
element.addEventListener(event, handler, false);
}
};
} else {
return function(element, event, handler) {
if (element && event && handler) {
element.attachEvent('on' + event, handler);
}
};
}
})();
/* istanbul ignore next */
const off = (function() {
if (!isServer && document.removeEventListener) {
return function(element, event, handler) {
if (element && event) {
element.removeEventListener(event, handler, false);
}
};
} else {
return function(element, event, handler) {
if (element && event) {
element.detachEvent('on' + event, handler);
}
};
}
})();
/* istanbul ignore next */
const once = function(el, event, fn) {
var listener = function() {
if (fn) {
fn.apply(this, arguments);
}
off(el, event, listener);
};
on(el, event, listener);
};
/* istanbul ignore next */
function hasClass(el, cls) {
if (!el || !cls) return false;
if (cls.indexOf(' ') !== -1) throw new Error('className should not contain space.');
if (el.classList) {
return el.classList.contains(cls);
} else {
return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;
}
};
/* istanbul ignore next */
function addClass(el, cls) {
if (!el) return;
var curClass = el.className;
var classes = (cls || '').split(' ');
for (var i = 0, j = classes.length; i < j; i++) {
var clsName = classes[i];
if (!clsName) continue;
if (el.classList) {
el.classList.add(clsName);
} else if (!hasClass(el, clsName)) {
curClass += ' ' + clsName;
}
}
if (!el.classList) {
el.setAttribute('class', curClass);
}
};
/* istanbul ignore next */
function removeClass(el, cls) {
if (!el || !cls) return;
var classes = cls.split(' ');
var curClass = ' ' + el.className + ' ';
for (var i = 0, j = classes.length; i < j; i++) {
var clsName = classes[i];
if (!clsName) continue;
if (el.classList) {
el.classList.remove(clsName);
} else if (hasClass(el, clsName)) {
curClass = curClass.replace(' ' + clsName + ' ', ' ');
}
}
if (!el.classList) {
el.setAttribute('class', trim(curClass));
}
};
/* istanbul ignore next */
const getStyle = ieVersion < 9 ? function(element, styleName) {
if (isServer) return;
if (!element || !styleName) return null;
styleName = camelCase(styleName);
if (styleName === 'float') {
styleName = 'styleFloat';
}
try {
switch (styleName) {
case 'opacity':
try {
return element.filters.item('alpha').opacity / 100;
} catch (e) {
return 1.0;
}
default:
return (element.style[styleName] || element.currentStyle ? element.currentStyle[styleName] : null);
}
} catch (e) {
return element.style[styleName];
}
} : function(element, styleName) {
if (isServer) return;
if (!element || !styleName) return null;
styleName = camelCase(styleName);
if (styleName === 'float') {
styleName = 'cssFloat';
}
try {
var computed = document.defaultView.getComputedStyle(element, '');
return element.style[styleName] || computed ? computed[styleName] : null;
} catch (e) {
return element.style[styleName];
}
};
/* istanbul ignore next */
function setStyle(element, styleName, value) {
if (!element || !styleName) return;
if (typeof styleName === 'object') {
for (var prop in styleName) {
if (styleName.hasOwnProperty(prop)) {
setStyle(element, prop, styleName[prop]);
}
}
} else {
styleName = camelCase(styleName);
if (styleName === 'opacity' && ieVersion < 9) {
element.style.filter = isNaN(value) ? '' : 'alpha(opacity=' + value * 100 + ')';
} else {
element.style[styleName] = value;
}
}
};
const isScroll = (el, vertical) => {
if (isServer) return;
const determinedDirection = vertical !== null && vertical !== undefined;
const overflow = determinedDirection
? vertical
? getStyle(el, 'overflow-y')
: getStyle(el, 'overflow-x')
: getStyle(el, 'overflow');
return overflow.match(/(scroll|auto|overlay)/);
};
const getScrollContainer = (el, vertical) => {
if (isServer) return;
let parent = el;
while (parent) {
if ([window, document, document.documentElement].includes(parent)) {
return window;
}
if (isScroll(parent, vertical)) {
return parent;
}
parent = parent.parentNode;
}
return parent;
};
const isInContainer = (el, container) => {
if (isServer || !el || !container) return false;
const elRect = el.getBoundingClientRect();
let containerRect;
if ([window, document, document.documentElement, null, undefined].includes(container)) {
containerRect = {
top: 0,
right: window.innerWidth,
bottom: window.innerHeight,
left: 0
};
} else {
containerRect = container.getBoundingClientRect();
}
return elRect.top < containerRect.bottom &&
elRect.bottom > containerRect.top &&
elRect.right > containerRect.left &&
elRect.left < containerRect.right;
};
/***/ }),
/***/ 148:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ isFirefox; });
__webpack_require__.d(__webpack_exports__, "c", function() { return /* binding */ kebabCase; });
__webpack_require__.d(__webpack_exports__, "d", function() { return /* binding */ rafThrottle; });
__webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ isMac; });
// UNUSED EXPORTS: noop, hasOwn, toObject, getValueByPath, getPropByPath, generateId, valueEquals, escapeRegexpString, arrayFindIndex, arrayFind, coerceTruthyValueToArray, isIE, isEdge, autoprefixer, capitalize, looseEqual, arrayEquals, isEqual, isEmpty, objToArray
// EXTERNAL MODULE: external "vue"
var external_vue_ = __webpack_require__(0);
var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
// CONCATENATED MODULE: ./node_modules/element-ui/src/utils/types.js
function isString(obj) {
return Object.prototype.toString.call(obj) === '[object String]';
}
function isObject(obj) {
return Object.prototype.toString.call(obj) === '[object Object]';
}
function isHtmlElement(node) {
return node && node.nodeType === Node.ELEMENT_NODE;
}
/**
* - Inspired:
* https://github.com/jashkenas/underscore/blob/master/modules/isFunction.js
*/
let isFunction = (functionToCheck) => {
var getType = {};
return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
};
if ( true && typeof Int8Array !== 'object' && (external_vue_default.a.prototype.$isServer || typeof document.childNodes !== 'function')) {
isFunction = function(obj) {
return typeof obj === 'function' || false;
};
}
const isUndefined = (val)=> {
return val === void 0;
};
const isDefined = (val) => {
return val !== undefined && val !== null;
};
// CONCATENATED MODULE: ./node_modules/element-ui/src/utils/util.js
const util_hasOwnProperty = Object.prototype.hasOwnProperty;
function noop() {};
function hasOwn(obj, key) {
return util_hasOwnProperty.call(obj, key);
};
function extend(to, _from) {
for (let key in _from) {
to[key] = _from[key];
}
return to;
};
function toObject(arr) {
var res = {};
for (let i = 0; i < arr.length; i++) {
if (arr[i]) {
extend(res, arr[i]);
}
}
return res;
};
const getValueByPath = function(object, prop) {
prop = prop || '';
const paths = prop.split('.');
let current = object;
let result = null;
for (let i = 0, j = paths.length; i < j; i++) {
const path = paths[i];
if (!current) break;
if (i === j - 1) {
result = current[path];
break;
}
current = current[path];
}
return result;
};
function getPropByPath(obj, path, strict) {
let tempObj = obj;
path = path.replace(/\[(\w+)\]/g, '.$1');
path = path.replace(/^\./, '');
let keyArr = path.split('.');
let i = 0;
for (let len = keyArr.length; i < len - 1; ++i) {
if (!tempObj && !strict) break;
let key = keyArr[i];
if (key in tempObj) {
tempObj = tempObj[key];
} else {
if (strict) {
throw new Error('please transfer a valid prop path to form item!');
}
break;
}
}
return {
o: tempObj,
k: keyArr[i],
v: tempObj ? tempObj[keyArr[i]] : null
};
};
const generateId = function() {
return Math.floor(Math.random() * 10000);
};
const valueEquals = (a, b) => {
// see: https://stackoverflow.com/questions/3115982/how-to-check-if-two-arrays-are-equal-with-javascript
if (a === b) return true;
if (!(a instanceof Array)) return false;
if (!(b instanceof Array)) return false;
if (a.length !== b.length) return false;
for (let i = 0; i !== a.length; ++i) {
if (a[i] !== b[i]) return false;
}
return true;
};
const escapeRegexpString = (value = '') => String(value).replace(/[|\\{}()[\]^$+*?.]/g, '\\$&');
// TODO: use native Array.find, Array.findIndex when IE support is dropped
const arrayFindIndex = function(arr, pred) {
for (let i = 0; i !== arr.length; ++i) {
if (pred(arr[i])) {
return i;
}
}
return -1;
};
const arrayFind = function(arr, pred) {
const idx = arrayFindIndex(arr, pred);
return idx !== -1 ? arr[idx] : undefined;
};
// coerce truthy value to array
const coerceTruthyValueToArray = function(val) {
if (Array.isArray(val)) {
return val;
} else if (val) {
return [val];
} else {
return [];
}
};
const isIE = function() {
return !external_vue_default.a.prototype.$isServer && !isNaN(Number(document.documentMode));
};
const isEdge = function() {
return !external_vue_default.a.prototype.$isServer && navigator.userAgent.indexOf('Edge') > -1;
};
const isFirefox = function() {
return !external_vue_default.a.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
};
const autoprefixer = function(style) {
if (typeof style !== 'object') return style;
const rules = ['transform', 'transition', 'animation'];
const prefixes = ['ms-', 'webkit-'];
rules.forEach(rule => {
const value = style[rule];
if (rule && value) {
prefixes.forEach(prefix => {
style[prefix + rule] = value;
});
}
});
return style;
};
const kebabCase = function(str) {
const hyphenateRE = /([^-])([A-Z])/g;
return str
.replace(hyphenateRE, '$1-$2')
.replace(hyphenateRE, '$1-$2')
.toLowerCase();
};
const capitalize = function(str) {
if (!isString(str)) return str;
return str.charAt(0).toUpperCase() + str.slice(1);
};
const looseEqual = function(a, b) {
const isObjectA = isObject(a);
const isObjectB = isObject(b);
if (isObjectA && isObjectB) {
return JSON.stringify(a) === JSON.stringify(b);
} else if (!isObjectA && !isObjectB) {
return String(a) === String(b);
} else {
return false;
}
};
const arrayEquals = function(arrayA, arrayB) {
arrayA = arrayA || [];
arrayB = arrayB || [];
if (arrayA.length !== arrayB.length) {
return false;
}
for (let i = 0; i < arrayA.length; i++) {
if (!looseEqual(arrayA[i], arrayB[i])) {
return false;
}
}
return true;
};
const isEqual = function(value1, value2) {
if (Array.isArray(value1) && Array.isArray(value2)) {
return arrayEquals(value1, value2);
}
return looseEqual(value1, value2);
};
const isEmpty = function(val) {
// null or undefined
if (val == null) return true;
if (typeof val === 'boolean') return false;
if (typeof val === 'number') return !val;
if (val instanceof Error) return val.message === '';
switch (Object.prototype.toString.call(val)) {
// String or Array
case '[object String]':
case '[object Array]':
return !val.length;
// Map or Set or File
case '[object File]':
case '[object Map]':
case '[object Set]': {
return !val.size;
}
// Plain Object
case '[object Object]': {
return !Object.keys(val).length;
}
}
return false;
};
function rafThrottle(fn) {
let locked = false;
return function(...args) {
if (locked) return;
locked = true;
window.requestAnimationFrame(_ => {
fn.apply(this, args);
locked = false;
});
};
}
function objToArray(obj) {
if (Array.isArray(obj)) {
return obj;
}
return isEmpty(obj) ? [] : [obj];
}
const isMac = function() {
return !external_vue_default.a.prototype.$isServer && /macintosh|mac os x/i.test(navigator.userAgent);
};
/***/ }),
/***/ 149:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(target) {
for (let i = 1, j = arguments.length; i < j; i++) {
let source = arguments[i] || {};
for (let prop in source) {
if (source.hasOwnProperty(prop)) {
let value = source[prop];
if (value !== undefined) {
target[prop] = value;
}
}
}
}
return target;
});;
/***/ }),
/***/ 157:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// 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
var render = function render() {
var _vm = this,
_c = _vm._self._c;
return _c('transition', {
attrs: {
"name": "viewer-fade"
}
}, [_c('div', {
ref: "el-image-viewer__wrapper",
staticClass: "el-image-viewer__wrapper",
style: {
'z-index': _vm.viewerZIndex
},
attrs: {
"tabindex": "-1"
}
}, [_c('div', {
staticClass: "el-image-viewer__mask",
on: {
"click": function ($event) {
if ($event.target !== $event.currentTarget) return null;
return _vm.handleMaskClick.apply(null, arguments);
}
}
}), _vm._v(" "), _c('span', {
staticClass: "el-image-viewer__btn el-image-viewer__close",
on: {
"click": _vm.hide
}
}, [_c('i', {
staticClass: "el-icon-close"
})]), _vm._v(" "), !_vm.isSingle ? [_c('span', {
staticClass: "el-image-viewer__btn el-image-viewer__prev",
class: {
'is-disabled': !_vm.infinite && _vm.isFirst
},
on: {
"click": _vm.prev
}
}, [_c('i', {
staticClass: "el-icon-arrow-left"
})]), _vm._v(" "), _c('span', {
staticClass: "el-image-viewer__btn el-image-viewer__next",
class: {
'is-disabled': !_vm.infinite && _vm.isLast
},
on: {
"click": _vm.next
}
}, [_c('i', {
staticClass: "el-icon-arrow-right"
})])] : _vm._e(), _vm._v(" "), _c('div', {
staticClass: "el-image-viewer__btn el-image-viewer__actions"
}, [_c('div', {
staticClass: "el-image-viewer__actions__inner"
}, [_c('i', {
staticClass: "el-icon-zoom-out",
on: {
"click": function ($event) {
return _vm.handleActions('zoomOut');
}
}
}), _vm._v(" "), _c('i', {
staticClass: "el-icon-zoom-in",
on: {
"click": function ($event) {
return _vm.handleActions('zoomIn');
}
}
}), _vm._v(" "), _c('i', {
staticClass: "el-image-viewer__actions__divider"
}), _vm._v(" "), _c('i', {
class: _vm.mode.icon,
on: {
"click": _vm.toggleMode
}
}), _vm._v(" "), _c('i', {
staticClass: "el-image-viewer__actions__divider"
}), _vm._v(" "), _c('i', {
staticClass: "el-icon-refresh-left",
on: {
"click": function ($event) {
return _vm.handleActions('anticlocelise');
}
}
}), _vm._v(" "), _c('i', {
staticClass: "el-icon-refresh-right",
on: {
"click": function ($event) {
return _vm.handleActions('clocelise');
}
}
})])]), _vm._v(" "), _c('div', {
staticClass: "el-image-viewer__canvas"
}, _vm._l(_vm.urlList, function (url, i) {
return i === _vm.index ? _c('img', {
key: url,
ref: "img",
refInFor: true,
staticClass: "el-image-viewer__img",
style: _vm.imgStyle,
attrs: {
"src": _vm.currentImg
},
on: {
"load": _vm.handleImgLoad,
"error": _vm.handleImgError,
"mousedown": _vm.handleMouseDown
}
}) : _vm._e();
}), 0)], 2)]);
};
var staticRenderFns = [];
// CONCATENATED MODULE: ./node_modules/element-ui/packages/image/src/image-viewer.vue?vue&type=template&id=44a7b0fb
// EXTERNAL MODULE: ./node_modules/element-ui/src/utils/dom.js
var utils_dom = __webpack_require__(147);
// EXTERNAL MODULE: ./node_modules/element-ui/src/utils/util.js + 1 modules
var util = __webpack_require__(148);
// EXTERNAL MODULE: external "vue"
var external_vue_ = __webpack_require__(0);
var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
// EXTERNAL MODULE: ./node_modules/element-ui/src/utils/merge.js
var merge = __webpack_require__(149);
// CONCATENATED MODULE: ./node_modules/element-ui/src/utils/popup/popup-manager.js
let hasModal = false;
let hasInitZIndex = false;
let popup_manager_zIndex;
const getModal = function() {
if (external_vue_default.a.prototype.$isServer) return;
let modalDom = PopupManager.modalDom;
if (modalDom) {
hasModal = true;
} else {
hasModal = false;
modalDom = document.createElement('div');
PopupManager.modalDom = modalDom;
modalDom.addEventListener('touchmove', function(event) {
event.preventDefault();
event.stopPropagation();
});
modalDom.addEventListener('click', function() {
PopupManager.doOnModalClick && PopupManager.doOnModalClick();
});
}
return modalDom;
};
const instances = {};
const PopupManager = {
modalFade: true,
getInstance: function(id) {
return instances[id];
},
register: function(id, instance) {
if (id && instance) {
instances[id] = instance;
}
},
deregister: function(id) {
if (id) {
instances[id] = null;
delete instances[id];
}
},
nextZIndex: function() {
return PopupManager.zIndex++;
},
modalStack: [],
doOnModalClick: function() {
const topItem = PopupManager.modalStack[PopupManager.modalStack.length - 1];
if (!topItem) return;
const instance = PopupManager.getInstance(topItem.id);
if (instance && instance.closeOnClickModal) {
instance.close();
}
},
openModal: function(id, zIndex, dom, modalClass, modalFade) {
if (external_vue_default.a.prototype.$isServer) return;
if (!id || zIndex === undefined) return;
this.modalFade = modalFade;
const modalStack = this.modalStack;
for (let i = 0, j = modalStack.length; i < j; i++) {
const item = modalStack[i];
if (item.id === id) {
return;
}
}
const modalDom = getModal();
Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal');
if (this.modalFade && !hasModal) {
Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal-enter');
}
if (modalClass) {
let classArr = modalClass.trim().split(/\s+/);
classArr.forEach(item => Object(utils_dom["a" /* addClass */])(modalDom, item));
}
setTimeout(() => {
Object(utils_dom["g" /* removeClass */])(modalDom, 'v-modal-enter');
}, 200);
if (dom && dom.parentNode && dom.parentNode.nodeType !== 11) {
dom.parentNode.appendChild(modalDom);
} else {
document.body.appendChild(modalDom);
}
if (zIndex) {
modalDom.style.zIndex = zIndex;
}
modalDom.tabIndex = 0;
modalDom.style.display = '';
this.modalStack.push({ id: id, zIndex: zIndex, modalClass: modalClass });
},
closeModal: function(id) {
const modalStack = this.modalStack;
const modalDom = getModal();
if (modalStack.length > 0) {
const topItem = modalStack[modalStack.length - 1];
if (topItem.id === id) {
if (topItem.modalClass) {
let classArr = topItem.modalClass.trim().split(/\s+/);
classArr.forEach(item => Object(utils_dom["g" /* removeClass */])(modalDom, item));
}
modalStack.pop();
if (modalStack.length > 0) {
modalDom.style.zIndex = modalStack[modalStack.length - 1].zIndex;
}
} else {
for (let i = modalStack.length - 1; i >= 0; i--) {
if (modalStack[i].id === id) {
modalStack.splice(i, 1);
break;
}
}
}
}
if (modalStack.length === 0) {
if (this.modalFade) {
Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal-leave');
}
setTimeout(() => {
if (modalStack.length === 0) {
if (modalDom.parentNode) modalDom.parentNode.removeChild(modalDom);
modalDom.style.display = 'none';
PopupManager.modalDom = undefined;
}
Object(utils_dom["g" /* removeClass */])(modalDom, 'v-modal-leave');
}, 200);
}
}
};
Object.defineProperty(PopupManager, 'zIndex', {
configurable: true,
get() {
if (!hasInitZIndex) {
popup_manager_zIndex = popup_manager_zIndex || (external_vue_default.a.prototype.$ELEMENT || {}).zIndex || 2000;
hasInitZIndex = true;
}
return popup_manager_zIndex;
},
set(value) {
popup_manager_zIndex = value;
}
});
const getTopPopup = function() {
if (external_vue_default.a.prototype.$isServer) return;
if (PopupManager.modalStack.length > 0) {
const topPopup = PopupManager.modalStack[PopupManager.modalStack.length - 1];
if (!topPopup) return;
const instance = PopupManager.getInstance(topPopup.id);
return instance;
}
};
if (!external_vue_default.a.prototype.$isServer) {
// handle `esc` key when the popup is shown
window.addEventListener('keydown', function(event) {
if (event.keyCode === 27) {
const topPopup = getTopPopup();
if (topPopup && topPopup.closeOnPressEscape) {
topPopup.handleClose
? topPopup.handleClose()
: (topPopup.handleAction ? topPopup.handleAction('cancel') : topPopup.close());
}
}
});
}
/* harmony default export */ var popup_manager = (PopupManager);
// CONCATENATED MODULE: ./node_modules/element-ui/src/utils/scrollbar-width.js
let scrollBarWidth;
/* harmony default export */ var scrollbar_width = (function() {
if (external_vue_default.a.prototype.$isServer) return 0;
if (scrollBarWidth !== undefined) return scrollBarWidth;
const outer = document.createElement('div');
outer.className = 'el-scrollbar__wrap';
outer.style.visibility = 'hidden';
outer.style.width = '100px';
outer.style.position = 'absolute';
outer.style.top = '-9999px';
document.body.appendChild(outer);
const widthNoScroll = outer.offsetWidth;
outer.style.overflow = 'scroll';
const inner = document.createElement('div');
inner.style.width = '100%';
outer.appendChild(inner);
const widthWithScroll = inner.offsetWidth;
outer.parentNode.removeChild(outer);
scrollBarWidth = widthNoScroll - widthWithScroll;
return scrollBarWidth;
});;
// CONCATENATED MODULE: ./node_modules/element-ui/src/utils/popup/index.js
let idSeed = 1;
let popup_scrollBarWidth;
/* harmony default export */ var popup = ({
props: {
visible: {
type: Boolean,
default: false
},
openDelay: {},
closeDelay: {},
zIndex: {},
modal: {
type: Boolean,
default: false
},
modalFade: {
type: Boolean,
default: true
},
modalClass: {},
modalAppendToBody: {
type: Boolean,
default: false
},
lockScroll: {
type: Boolean,
default: true
},
closeOnPressEscape: {
type: Boolean,
default: false
},
closeOnClickModal: {
type: Boolean,
default: false
}
},
beforeMount() {
this._popupId = 'popup-' + idSeed++;
popup_manager.register(this._popupId, this);
},
beforeDestroy() {
popup_manager.deregister(this._popupId);
popup_manager.closeModal(this._popupId);
this.restoreBodyStyle();
},
data() {
return {
opened: false,
bodyPaddingRight: null,
computedBodyPaddingRight: 0,
withoutHiddenClass: true,
rendered: false
};
},
watch: {
visible(val) {
if (val) {
if (this._opening) return;
if (!this.rendered) {
this.rendered = true;
external_vue_default.a.nextTick(() => {
this.open();
});
} else {
this.open();
}
} else {
this.close();
}
}
},
methods: {
open(options) {
if (!this.rendered) {
this.rendered = true;
}
const props = Object(merge["a" /* default */])({}, this.$props || this, options);
if (this._closeTimer) {
clearTimeout(this._closeTimer);
this._closeTimer = null;
}
clearTimeout(this._openTimer);
const openDelay = Number(props.openDelay);
if (openDelay > 0) {
this._openTimer = setTimeout(() => {
this._openTimer = null;
this.doOpen(props);
}, openDelay);
} else {
this.doOpen(props);
}
},
doOpen(props) {
if (this.$isServer) return;
if (this.willOpen && !this.willOpen()) return;
if (this.opened) return;
this._opening = true;
const dom = this.$el;
const modal = props.modal;
const zIndex = props.zIndex;
if (zIndex) {
popup_manager.zIndex = zIndex;
}
if (modal) {
if (this._closing) {
popup_manager.closeModal(this._popupId);
this._closing = false;
}
popup_manager.openModal(this._popupId, popup_manager.nextZIndex(), this.modalAppendToBody ? undefined : dom, props.modalClass, props.modalFade);
if (props.lockScroll) {
this.withoutHiddenClass = !Object(utils_dom["c" /* hasClass */])(document.body, 'el-popup-parent--hidden');
if (this.withoutHiddenClass) {
this.bodyPaddingRight = document.body.style.paddingRight;
this.computedBodyPaddingRight = parseInt(Object(utils_dom["b" /* getStyle */])(document.body, 'paddingRight'), 10);
}
popup_scrollBarWidth = scrollbar_width();
let bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;
let bodyOverflowY = Object(utils_dom["b" /* getStyle */])(document.body, 'overflowY');
if (popup_scrollBarWidth > 0 && (bodyHasOverflow || bodyOverflowY === 'scroll') && this.withoutHiddenClass) {
document.body.style.paddingRight = this.computedBodyPaddingRight + popup_scrollBarWidth + 'px';
}
Object(utils_dom["a" /* addClass */])(document.body, 'el-popup-parent--hidden');
}
}
if (getComputedStyle(dom).position === 'static') {
dom.style.position = 'absolute';
}
dom.style.zIndex = popup_manager.nextZIndex();
this.opened = true;
this.onOpen && this.onOpen();
this.doAfterOpen();
},
doAfterOpen() {
this._opening = false;
},
close() {
if (this.willClose && !this.willClose()) return;
if (this._openTimer !== null) {
clearTimeout(this._openTimer);
this._openTimer = null;
}
clearTimeout(this._closeTimer);
const closeDelay = Number(this.closeDelay);
if (closeDelay > 0) {
this._closeTimer = setTimeout(() => {
this._closeTimer = null;
this.doClose();
}, closeDelay);
} else {
this.doClose();
}
},
doClose() {
this._closing = true;
this.onClose && this.onClose();
if (this.lockScroll) {
setTimeout(this.restoreBodyStyle, 200);
}
this.opened = false;
this.doAfterClose();
},
doAfterClose() {
popup_manager.closeModal(this._popupId);
this._closing = false;
},
restoreBodyStyle() {
if (this.modal && this.withoutHiddenClass) {
document.body.style.paddingRight = this.bodyPaddingRight;
Object(utils_dom["g" /* removeClass */])(document.body, 'el-popup-parent--hidden');
}
this.withoutHiddenClass = true;
}
}
});
// 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
const Mode = {
CONTAIN: {
name: 'contain',
icon: 'el-icon-full-screen'
},
ORIGINAL: {
name: 'original',
icon: 'el-icon-c-scale-to-original'
}
};
const mousewheelEventName = Object(util["a" /* isFirefox */])() ? 'DOMMouseScroll' : 'mousewheel';
/* harmony default export */ var image_viewervue_type_script_lang_js = ({
name: 'elImageViewer',
props: {
urlList: {
type: Array,
default: () => []
},
zIndex: {
type: Number,
default: 2000
},
onSwitch: {
type: Function,
default: () => {}
},
onClose: {
type: Function,
default: () => {}
},
initialIndex: {
type: Number,
default: 0
},
appendToBody: {
type: Boolean,
default: true
},
maskClosable: {
type: Boolean,
default: true
}
},
data() {
return {
index: this.initialIndex,
isShow: false,
infinite: true,
loading: false,
mode: Mode.CONTAIN,
transform: {
scale: 1,
deg: 0,
offsetX: 0,
offsetY: 0,
enableTransition: false
}
};
},
computed: {
isSingle() {
return this.urlList.length <= 1;
},
isFirst() {
return this.index === 0;
},
isLast() {
return this.index === this.urlList.length - 1;
},
currentImg() {
return this.urlList[this.index];
},
imgStyle() {
const {
scale,
deg,
offsetX,
offsetY,
enableTransition
} = this.transform;
const style = {
transform: `scale(${scale}) rotate(${deg}deg)`,
transition: enableTransition ? 'transform .3s' : '',
'margin-left': `${offsetX}px`,
'margin-top': `${offsetY}px`
};
if (this.mode === Mode.CONTAIN) {
style.maxWidth = style.maxHeight = '100%';
}
return style;
},
viewerZIndex() {
const nextZIndex = popup_manager.nextZIndex();
return this.zIndex > nextZIndex ? this.zIndex : nextZIndex;
}
},
watch: {
index: {
handler: function (val) {
this.reset();
this.onSwitch(val);
}
},
currentImg(val) {
this.$nextTick(_ => {
const $img = this.$refs.img[0];
if (!$img.complete) {
this.loading = true;
}
});
}
},
methods: {
hide() {
this.deviceSupportUninstall();
this.onClose();
},
deviceSupportInstall() {
this._keyDownHandler = e => {
e.stopPropagation();
const keyCode = e.keyCode;
switch (keyCode) {
// ESC
case 27:
this.hide();
break;
// SPACE
case 32:
this.toggleMode();
break;
// LEFT_ARROW
case 37:
this.prev();
break;
// UP_ARROW
case 38:
this.handleActions('zoomIn');
break;
// RIGHT_ARROW
case 39:
this.next();
break;
// DOWN_ARROW
case 40:
this.handleActions('zoomOut');
break;
}
};
this._mouseWheelHandler = Object(util["d" /* rafThrottle */])(e => {
const delta = e.wheelDelta ? e.wheelDelta : -e.detail;
if (delta > 0) {
this.handleActions('zoomIn', {
zoomRate: 0.015,
enableTransition: false
});
} else {
this.handleActions('zoomOut', {
zoomRate: 0.015,
enableTransition: false
});
}
});
Object(utils_dom["e" /* on */])(document, 'keydown', this._keyDownHandler);
Object(utils_dom["e" /* on */])(document, mousewheelEventName, this._mouseWheelHandler);
},
deviceSupportUninstall() {
Object(utils_dom["d" /* off */])(document, 'keydown', this._keyDownHandler);
Object(utils_dom["d" /* off */])(document, mousewheelEventName, this._mouseWheelHandler);
this._keyDownHandler = null;
this._mouseWheelHandler = null;
},
handleImgLoad(e) {
this.loading = false;
},
handleImgError(e) {
this.loading = false;
e.target.alt = '加载失败';
},
handleMouseDown(e) {
if (this.loading || e.button !== 0) return;
const {
offsetX,
offsetY
} = this.transform;
const startX = e.pageX;
const startY = e.pageY;
this._dragHandler = Object(util["d" /* rafThrottle */])(ev => {
this.transform.offsetX = offsetX + ev.pageX - startX;
this.transform.offsetY = offsetY + ev.pageY - startY;
});
Object(utils_dom["e" /* on */])(document, 'mousemove', this._dragHandler);
Object(utils_dom["e" /* on */])(document, 'mouseup', ev => {
Object(utils_dom["d" /* off */])(document, 'mousemove', this._dragHandler);
});
e.preventDefault();
},
handleMaskClick() {
if (this.maskClosable) {
this.hide();
}
},
reset() {
this.transform = {
scale: 1,
deg: 0,
offsetX: 0,
offsetY: 0,
enableTransition: false
};
},
toggleMode() {
if (this.loading) return;
const modeNames = Object.keys(Mode);
const modeValues = Object.values(Mode);
const index = modeValues.indexOf(this.mode);
const nextIndex = (index + 1) % modeNames.length;
this.mode = Mode[modeNames[nextIndex]];
this.reset();
},
prev() {
if (this.isFirst && !this.infinite) return;
const len = this.urlList.length;
this.index = (this.index - 1 + len) % len;
},
next() {
if (this.isLast && !this.infinite) return;
const len = this.urlList.length;
this.index = (this.index + 1) % len;
},
handleActions(action, options = {}) {
if (this.loading) return;
const {
zoomRate,
rotateDeg,
enableTransition
} = {
zoomRate: 0.2,
rotateDeg: 90,
enableTransition: true,
...options
};
const {
transform
} = this;
switch (action) {
case 'zoomOut':
if (transform.scale > 0.2) {
transform.scale = parseFloat((transform.scale - zoomRate).toFixed(3));
}
break;
case 'zoomIn':
transform.scale = parseFloat((transform.scale + zoomRate).toFixed(3));
break;
case 'clocelise':
transform.deg += rotateDeg;
break;
case 'anticlocelise':
transform.deg -= rotateDeg;
break;
}
transform.enableTransition = enableTransition;
}
},
mounted() {
this.deviceSupportInstall();
if (this.appendToBody) {
document.body.appendChild(this.$el);
}
// add tabindex then wrapper can be focusable via Javascript
// focus wrapper so arrow key can't cause inner scroll behavior underneath
this.$refs['el-image-viewer__wrapper'].focus();
},
destroyed() {
// if appendToBody is true, remove DOM node after destroy
if (this.appendToBody && this.$el && this.$el.parentNode) {
this.$el.parentNode.removeChild(this.$el);
}
}
});
// CONCATENATED MODULE: ./node_modules/element-ui/packages/image/src/image-viewer.vue?vue&type=script&lang=js
/* harmony default export */ var src_image_viewervue_type_script_lang_js = (image_viewervue_type_script_lang_js);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(2);
// CONCATENATED MODULE: ./node_modules/element-ui/packages/image/src/image-viewer.vue
/* normalize component */
var component = Object(componentNormalizer["a" /* default */])(
src_image_viewervue_type_script_lang_js,
render,
staticRenderFns,
false,
null,
null,
"17d24eb5"
)
/* harmony default export */ var image_viewer = __webpack_exports__["a"] = (component.exports);
/***/ }),
/***/ 167:
/***/ (function(module, exports) {
// Exports
module.exports = {
};
/***/ }),
/***/ 168:
/***/ (function(module, exports) {
// Exports
module.exports = {
};
/***/ }),
/***/ 169:
/***/ (function(module, exports) {
// Exports
module.exports = {
};
/***/ }),
/***/ 170:
/***/ (function(module, exports) {
// Exports
module.exports = {
};
/***/ }),
/***/ 178:
/***/ (function(module, exports) {
// Exports
module.exports = {
};
/***/ }),
/***/ 179:
/***/ (function(module, exports) {
// Exports
module.exports = {
};
/***/ }),
/***/ 180:
/***/ (function(module, exports) {
// Exports
module.exports = {
};
/***/ }),
/***/ 183:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/TabNav.vue?vue&type=template&id=8a32da06&scoped=true
var render = function render() {
var _vm = this,
_c = _vm._self._c;
return _c('div', {
staticClass: "tabs",
style: {
marginTop: _vm.marginTop + 'px',
marginBottom: _vm.marginBottom + 'px',
fontSize: _vm.fontSize + 'px'
}
}, [_vm._ssrNode(Array.isArray(_vm.tabList) ? "
" : "")]);
};
var staticRenderFns = [];
// CONCATENATED MODULE: ./components/TabNav.vue?vue&type=template&id=8a32da06&scoped=true
// CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/TabNav.vue?vue&type=script&lang=js
/* harmony default export */ var TabNavvue_type_script_lang_js = ({
props: {
// color: {
// type: String,
// },
borderType: {
type: String,
default: 'noBorder'
},
fontSize: {
type: Number,
default: 14
},
marginTop: {
type: Number,
default: 0
},
marginBottom: {
type: Number,
default: 10
},
liWidth: {
type: Number,
default: 0
},
liHeight: {
type: Number,
default: 28
},
marginRight: {
type: Number,
default: 0
},
currTab: {
type: [Number, String],
default: 0
},
tabList: {
type: [Array, Object],
default: () => {
return [];
}
},
allPrintTab: {
type: [Array, Object],
default: () => {
return [];
}
}
},
data() {
return {
textColor: 'red'
};
},
computed: {
comRemaining() {
const mapTabList = this.tabList.map(i => i.name);
return this.allPrintTab.filter(element => !mapTabList.includes(element));
}
},
methods: {
selTab(i) {
this.$emit('update:currTab', i);
this.$emit('handle');
}
}
});
// CONCATENATED MODULE: ./components/TabNav.vue?vue&type=script&lang=js
/* harmony default export */ var components_TabNavvue_type_script_lang_js = (TabNavvue_type_script_lang_js);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(2);
// CONCATENATED MODULE: ./components/TabNav.vue
function injectStyles (context) {
var style0 = __webpack_require__(190)
if (style0.__inject__) style0.__inject__(context)
}
/* normalize component */
var component = Object(componentNormalizer["a" /* default */])(
components_TabNavvue_type_script_lang_js,
render,
staticRenderFns,
false,
injectStyles,
"8a32da06",
"1ce05afc"
)
/* harmony default export */ var TabNav = __webpack_exports__["default"] = (component.exports);
/***/ }),
/***/ 187:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_NewPriceTable_vue_vue_type_style_index_0_id_8da20436_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_NewPriceTable_vue_vue_type_style_index_0_id_8da20436_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_NewPriceTable_vue_vue_type_style_index_0_id_8da20436_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_NewPriceTable_vue_vue_type_style_index_0_id_8da20436_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_NewPriceTable_vue_vue_type_style_index_0_id_8da20436_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/***/ }),
/***/ 188:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TotalTable_vue_vue_type_style_index_0_id_8afd0988_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(168);
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TotalTable_vue_vue_type_style_index_0_id_8afd0988_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TotalTable_vue_vue_type_style_index_0_id_8afd0988_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TotalTable_vue_vue_type_style_index_0_id_8afd0988_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TotalTable_vue_vue_type_style_index_0_id_8afd0988_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/***/ }),
/***/ 189:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_UnitTable_vue_vue_type_style_index_0_id_931e8840_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_UnitTable_vue_vue_type_style_index_0_id_931e8840_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_UnitTable_vue_vue_type_style_index_0_id_931e8840_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_UnitTable_vue_vue_type_style_index_0_id_931e8840_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_UnitTable_vue_vue_type_style_index_0_id_931e8840_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/***/ }),
/***/ 190:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TabNav_vue_vue_type_style_index_0_id_8a32da06_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TabNav_vue_vue_type_style_index_0_id_8a32da06_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TabNav_vue_vue_type_style_index_0_id_8a32da06_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TabNav_vue_vue_type_style_index_0_id_8a32da06_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TabNav_vue_vue_type_style_index_0_id_8a32da06_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/***/ }),
/***/ 198:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/table/NewPriceTable.vue?vue&type=template&id=8da20436&scoped=true
var render = function render() {
var _vm = this,
_c = _vm._self._c;
return _c('div', {
staticClass: "wrap",
style: {
marginBottom: _vm.marginBottom + 'px'
}
}, [_vm._ssrNode((_vm.tableType != 'Addon' ? "" + _vm._s(_vm.comTitle) + "
" : "") + " "), _vm._ssrNode("", "
", [_c('el-table', {
ref: "elTable",
staticStyle: {
"width": "100%"
},
attrs: {
"show-header": _vm.tableType != 'Addon',
"data": _vm.comTableData,
"header-cell-style": {
backgroundColor: '#fff',
fontWeight: 'normal',
fontSize: '14px',
fontFamily: 'Proxima Nova',
color: '#000',
'--comDisplayCss': _vm.comDisplayCss
},
"row-key": "id",
"span-method": _vm.arraySpanMethod,
"row-class-name": _vm.tableRowClassName
},
on: {
"selection-change": _vm.handleSelectionChange,
"select": _vm.dialogCheck
}
}, [_vm.tableType != 'Comparison' ? _c('el-table-column', {
attrs: {
"type": "selection",
"width": "50",
"align": "center",
"reserve-selection": true,
"selectable": _vm.handleSelectable
}
}) : _vm._e(), _vm._v(" "), _vm._l(_vm.tableColumns, function (item) {
return [item.type ? _c('el-table-column', {
key: item.prop,
attrs: {
"align": item.align ? item.align : 'left',
"prop": item.prop,
"label": item.label,
"formatter": item.formatter,
"width": item.width,
"sortable": item.sortable
},
scopedSlots: _vm._u([{
key: "default",
fn: function ({
row
}) {
return [item.type == 'radioInput' ? [_c('div', {
staticClass: "flex between"
}, [_c('span', [_vm._v(_vm._s(row.decName))]), _vm._v(" "), _c('el-input', {
staticClass: "edit-input",
attrs: {
"min": "0",
"max": row.max_num,
"type": "number",
"size": "small"
},
on: {
"input": function ($event) {
return _vm.getNumber($event, row, row.max_num);
}
},
model: {
value: row.num,
callback: function ($$v) {
_vm.$set(row, "num", $$v);
},
expression: "row.num"
}
})], 1)] : _c('div', [row.filter_boolean ? [_c('div', {
staticClass: "triangle"
}), _vm._v(" "), _c('div', {
staticClass: "text"
}, [_vm._v("Eco")])] : _vm._e(), _vm._v("\n " + _vm._s(row[item.prop]) + "\n "), _vm.tableType == 'Undecorated' ? _c('el-popover', {
attrs: {
"placement": "top-start",
"trigger": "hover"
}
}, [_c('i', {
staticClass: "el-icon-warning",
attrs: {
"slot": "reference"
},
slot: "reference"
}), _vm._v(" "), _c('p', {
staticClass: "popover-text"
}, [_vm._v(_vm._s(_vm.comTitle))])]) : _vm._e()], 2)];
}
}], null, true)
}) : _vm._e(), _vm._v(" "), !item.type ? _c('el-table-column', {
key: item.prop,
attrs: {
"align": item.align ? item.align : 'center',
"prop": item.prop,
"label": item.label,
"formatter": item.formatter,
"sortable": item.sortable,
"show-overflow-tooltip": "",
"width": (798 - _vm.tableColumns[0].width - _vm.tableColumns[0].extraWidth) / (_vm.tableColumns.length - 1)
},
scopedSlots: _vm._u([{
key: "default",
fn: function ({
row,
$index
}) {
return [item.prop === 'website_setup' ? _c('div', [$index === 0 && _vm.tableType == 'Decoration' ? _c('div', [row['supplier_setup_id'] < 5 || row['supplier_setup_id'] == 7 ? _c('span', [_vm._v("£ " + _vm._s(row['supplier_setup'] ? parseFloat(row['supplier_setup']).toFixed(2) : "0.00"))]) : _vm._e(), _vm._v(" "), _c('span', [_vm._v(_vm._s(_vm.$_setupPriceFilter(row['supplier_setup_id'])))])]) : _c('div', [row['website_setup_id'] < 5 || row['website_setup_id'] == 7 ? _c('span', [_vm._v("£ " + _vm._s(row['website_setup'] ? parseFloat(row['website_setup']).toFixed(2) : "0.00"))]) : _vm._e(), _vm._v(" "), _c('span', [_vm._v(_vm._s(_vm.$_setupPriceFilter(row['website_setup_id'])))])])]) : _vm.judgeProp(row, item.prop, $index) == '111' || _vm.judgeProp(row, item.prop, $index) == '111.00' ? _c('div', [_vm._v("\n -\n ")]) : _vm.judgeProp(row, item.prop, $index) == '999' || _vm.judgeProp(row, item.prop, $index) === '999.00' ? _c('div', [_vm._v("\n POA\n ")]) : _vm.judgeProp(row, item.prop, $index) === '' ? _c('div', [_vm._v("0")]) : _c('div', [_vm.isNumber(_vm.judgeProp(row, item.prop, $index)) && !item.isFirstColumn ? _c('span', [_vm._v("£")]) : _vm._e(), _vm._v(" "), _c('span', [_vm._v(_vm._s(_vm.judgeProp(row, item.prop, $index)))])])];
}
}], null, true)
}) : _vm._e()];
})], 2)], 1)], 2);
};
var staticRenderFns = [];
// CONCATENATED MODULE: ./components/table/NewPriceTable.vue?vue&type=template&id=8da20436&scoped=true
// EXTERNAL MODULE: external "number-precision"
var external_number_precision_ = __webpack_require__(122);
// CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/table/NewPriceTable.vue?vue&type=script&lang=js
/* harmony default export */ var NewPriceTablevue_type_script_lang_js = ({
filters: {
// Decoration Table:打印价格+附加价格
multiplyPrice(a1, row, prop) {
const rep = /^[0-9]+.?[0-9]*$/;
if (!rep.test(a1)) {
return a1;
} else {
return Object(external_number_precision_["times"])(a1, row.num);
}
},
// Undecorated Table:基础价格+Decoration所选价格(包含附加价格)
plusPrice(a1, a2) {
return a2 ? Object(external_number_precision_["plus"])(a1, a2) : a1;
},
// Decoration Table:计算差价
differencePrice(a1, row, prop, selectRow) {
const rep = /^[0-9]+.?[0-9]*$/;
if (rep.test(a1)) {
const temp = prop.split('_');
const supplier = +row[`supplier_${temp[1]}`];
const suppliers = Object(external_number_precision_["times"])(row.num - 1, supplier);
const noIncludePrice = Object(external_number_precision_["plus"])(a1, suppliers);
const selSupplier = +selectRow[`supplier_${temp[1]}`];
const selSuppliers = Object(external_number_precision_["times"])(selectRow.num - 1, selSupplier);
const isIncludePrice = Object(external_number_precision_["plus"])(+selectRow[prop], selSuppliers);
return noIncludePrice > isIncludePrice ? `+${Object(external_number_precision_["minus"])(noIncludePrice, isIncludePrice)}` : Object(external_number_precision_["minus"])(noIncludePrice, isIncludePrice);
} else {
return a1;
}
}
},
props: {
hasDecAdd: {
type: Number,
default: 0
},
tableData: {
type: Array,
default: () => {
return [];
}
},
tableColumns: {
type: Array,
default: () => {
return [];
}
},
operateWith: {
type: String,
default: '100%'
},
isCheckBox: {
type: Boolean,
default: false
},
tableType: {
type: String,
default: 'Undecorated'
},
decorationObj: {
type: Object,
default: () => {
return {};
}
},
selectId: {
type: Number,
default: null
},
selectRow: {
type: Object,
default: () => {
return {};
}
},
multipleSelection: {
type: Array,
default: () => {
return [];
}
},
selectDecoration: {
type: Object,
default: () => {
return {};
}
},
curPrint: {
type: String,
default: ''
},
curModel: {
type: String,
default: ''
},
marginBottom: {
type: Number,
default: 20
},
decorationMultiple: {
type: Number,
default: 1
},
headerShow: {
type: Boolean,
default: true
}
},
data() {
return {
setupConfigList: [{
id: 1,
name: '/col'
}, {
id: 2,
name: '/desgin'
}, {
id: 3,
name: '/pos'
}, {
id: 4,
name: '/pos desgin'
}, {
id: 5,
name: 'POA'
}, {
id: 6,
name: 'Waived'
}],
setupTitleList: ['1st', '2nd', '3rd']
};
},
computed: {
getTableContainerClass() {
// 根据tableType的值返回不同的class
return {
'table-container': true,
'border-Decoration': this.tableType === 'Decoration' && this.hasDecAdd
};
},
comTitle() {
if (this.tableType === 'Undecorated') {
return `Includes ${this.curModel}`;
} else if (this.tableType === 'Decoration') {
return `Add-Ons`;
} else {
return this.curPrint;
}
},
comDisplayCss() {
return this.tableType === 'Comparison' ? '1px solid #efefef' : 'none';
},
comMultipleSelID() {
return this.multipleSelection.map(i => i.id);
},
comTableData() {
if (this.tableType === 'Decoration') {
return this.tableData;
} else {
return this.tableData;
}
}
},
mounted() {
// 初始勾上默认选择打印项
if (JSON.stringify(this.selectRow) !== '{}') {
this.$refs.elTable.toggleRowSelection(this.selectRow);
}
},
methods: {
judgeProp(row, prop, $index) {
if ($index === 0 && this.tableType === 'Decoration') {
const temp = prop.split('_');
return row[`supplier_${temp[1]}`];
} else {
return row[prop];
}
},
$_setupPriceFilter(setupPriceID) {
const result = this.setupConfigList.filter(item => item.id === setupPriceID);
return result.length > 0 ? result[0].name : '';
},
isNumber(val) {
const rep = /^[0-9]+.?[0-9]*$/;
return rep.test(val);
},
/* 暂不实现此功能
//点击table栏时选中按钮
handleCurrentChange(currentRow, oldCurrentRow) {
this.$refs.elTable.clearSelection()
this.$emit('update:selectId', currentRow.id)
this.addCar(currentRow)
},
*/
// table全选
handleSelectionChange(val) {
this.$emit('update:multipleSelection', val);
},
dialogCheck(selection, row) {
if (this.isCheckBox) return; // 是多选框返回
this.$refs.elTable.clearSelection();
// 初始化
if (selection.length === 0) {
this.$emit('update:selectId', null);
this.$emit('update:selectRow', {});
return;
}
if (row) {
this.$emit('update:selectId', row.id);
this.$emit('update:selectRow', row);
this.$refs.elTable.toggleRowSelection(row, true);
}
},
addCar(currentRow) {
// 加入购物车需要parentId
const selrow = Object.assign({}, currentRow);
selrow.parentId = this.decorationObj.parentId;
this.$emit('update:selectRow', selrow);
this.$refs.elTable.toggleRowSelection(currentRow);
},
getRowKey(row) {
return row.id;
},
arraySpanMethod({
row,
column,
rowIndex,
columnIndex
}) {
// 隐藏'Decoration'选项框
if (this.tableType === 'Decoration' && columnIndex === 0) {
return [0, 1];
}
if (this.tableType === 'Decoration' && columnIndex === 1) {
return [1, 2];
}
},
tableRowClassName({
row
}) {
if (this.tableType === 'Decoration') {
return this.decorationMultiple ? 'borderNone' : 'hiddenRow';
}
return 'fontBold';
},
handleSelectable(row, index) {
// website_setup_id 5为POA,不可选
return row.website_setup_id !== 5;
},
getNumber(e, row, max) {
if (parseInt(e) > max) {
row.num = max;
}
}
}
});
// CONCATENATED MODULE: ./components/table/NewPriceTable.vue?vue&type=script&lang=js
/* harmony default export */ var table_NewPriceTablevue_type_script_lang_js = (NewPriceTablevue_type_script_lang_js);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(2);
// CONCATENATED MODULE: ./components/table/NewPriceTable.vue
function injectStyles (context) {
var style0 = __webpack_require__(187)
if (style0.__inject__) style0.__inject__(context)
}
/* normalize component */
var component = Object(componentNormalizer["a" /* default */])(
table_NewPriceTablevue_type_script_lang_js,
render,
staticRenderFns,
false,
injectStyles,
"8da20436",
"518290f4"
)
/* harmony default export */ var NewPriceTable = __webpack_exports__["default"] = (component.exports);
/***/ }),
/***/ 199:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/table/TotalTable.vue?vue&type=template&id=8afd0988&scoped=true
var render = function render() {
var _vm = this,
_c = _vm._self._c;
return _c('div', {
staticClass: "wrap"
}, [_vm._ssrNode("" + _vm._ssrEscape(_vm._s(_vm.title)) + " " + (_vm.title == 'Sell Price' && _vm.comLocationNum !== 1 ? "Total" : "") + "
"), _c('el-table', {
ref: "elTable",
attrs: {
"border": "",
"data": _vm.tableData,
"header-cell-style": {
backgroundColor: '#fff',
color: '#606266',
fontWeight: 500,
fontSize: '16px'
},
"stripe": ""
}
}, _vm._l(_vm.tableColumns, function (item, index) {
return _c('el-table-column', {
key: `${_vm.curOrder}-${item.prop}`,
attrs: {
"align": item.align ? item.align : 'center',
"prop": item.prop,
"label": item.label,
"formatter": item.formatter,
"sortable": item.sortable
},
scopedSlots: _vm._u([{
key: "header",
fn: function (scope) {
return [_vm.title == 'Buy Price' && _vm.comLocationNum === 1 ? _c('div', [_c('el-input', {
directives: [{
name: "show",
rawName: "v-show",
value: !item.isFirstColumn,
expression: "!item.isFirstColumn"
}],
attrs: {
"size": "small",
"type": "number",
"min": _vm.min
},
on: {
"blur": function ($event) {
return _vm.getNumber($event, index);
}
},
model: {
value: item.label,
callback: function ($$v) {
_vm.$set(item, "label", $$v);
},
expression: "item.label"
}
}), _vm._v(" "), _c('span', {
directives: [{
name: "show",
rawName: "v-show",
value: item.isFirstColumn,
expression: "item.isFirstColumn"
}]
}, [_vm._v(_vm._s(item.label))])], 1) : _c('div', [_c('span', [_vm._v(_vm._s(item.label))])])];
}
}, {
key: "default",
fn: function (scope) {
return [_vm.tableType && !item.isFirstColumn ? [_c('span', [_vm._v(_vm._s(_vm._f("differencePrice")(scope.row[item.prop], _vm.curDecoration[item.prop], _vm.indexDecoration[item.prop], _vm.poaConfig)))])] : [(typeof scope.row[item.prop] == 'string' && scope.row[item.prop].includes('.') || typeof scope.row[item.prop] == 'number') && !item.isFirstColumn ? _c('span', [_vm._v("£")]) : _vm._e(), _vm._v(" "), _c('span', [_vm._v(_vm._s(scope.row[item.prop] ? scope.row[item.prop] : '0.00'))])]];
}
}], null, true)
});
}), 1)], 2);
};
var staticRenderFns = [];
// CONCATENATED MODULE: ./components/table/TotalTable.vue?vue&type=template&id=8afd0988&scoped=true
// EXTERNAL MODULE: external "number-precision"
var external_number_precision_ = __webpack_require__(122);
// CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/table/TotalTable.vue?vue&type=script&lang=js
/* harmony default export */ var TotalTablevue_type_script_lang_js = ({
filters: {
differencePrice(a, curDecoVal, indexDecoVal, poaConfig) {
const rep = /^[0-9]+(\.[0-9]*)?$/;
if (!rep.test(a)) {
return a || 'Waived';
}
if (poaConfig.includes(curDecoVal) || poaConfig.includes(indexDecoVal)) {
if (curDecoVal === '111' || curDecoVal === '111.00' || indexDecoVal === '111' || indexDecoVal === '111.00') {
return '-';
} else if (curDecoVal === '999' || curDecoVal === '999.00' || indexDecoVal === '999' || indexDecoVal === '999.00') {
return 'POA';
}
} else if (curDecoVal === indexDecoVal) {
return 0;
} else if (+curDecoVal > +indexDecoVal) {
return `-£ ${Object(external_number_precision_["minus"])(curDecoVal, indexDecoVal)}`;
} else if (+curDecoVal < +indexDecoVal) {
return `+£ ${Object(external_number_precision_["minus"])(indexDecoVal, curDecoVal)}`;
} else {
return 'Waived';
}
}
},
props: {
tableData: {
type: Array,
default: () => []
},
tableColumns: {
type: Array,
default: () => []
},
tableType: {
type: String,
default: ''
},
curDecoration: {
type: Object,
default: () => {}
},
indexDecoration: {
type: Object,
default: () => {}
},
comLocationNum: {
type: Number,
default: 1
},
curOrder: {
type: String,
default: ''
},
min: {
type: String,
default: ''
},
title: {
type: String,
default: ''
}
},
data() {
return {
poaConfig: ['111', '111.00', '999', '999.00']
};
},
methods: {
getNumber(e, index) {
if (parseInt(e.target.value) < this.min) {
this.$emit('send-idx', index);
}
}
},
computed: {
comWidth() {
return 800 / this.tableColumns.length - 1;
}
}
});
// CONCATENATED MODULE: ./components/table/TotalTable.vue?vue&type=script&lang=js
/* harmony default export */ var table_TotalTablevue_type_script_lang_js = (TotalTablevue_type_script_lang_js);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(2);
// CONCATENATED MODULE: ./components/table/TotalTable.vue
function injectStyles (context) {
var style0 = __webpack_require__(188)
if (style0.__inject__) style0.__inject__(context)
}
/* normalize component */
var component = Object(componentNormalizer["a" /* default */])(
table_TotalTablevue_type_script_lang_js,
render,
staticRenderFns,
false,
injectStyles,
"8afd0988",
"35501f79"
)
/* harmony default export */ var TotalTable = __webpack_exports__["default"] = (component.exports);
/***/ }),
/***/ 200:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/table/UnitTable.vue?vue&type=template&id=931e8840&scoped=true
var render = function render() {
var _vm = this,
_c = _vm._self._c;
return _c('div', [_vm._ssrNode("Markup %
"), _c('el-table', {
ref: "elTable",
style: {
width: _vm.operateWith
},
attrs: {
"border": "",
"data": _vm.tableData,
"highlight-current-row": false,
"header-cell-style": {
backgroundColor: '#fff',
color: '#606266',
fontWeight: 500,
fontSize: '16px'
}
}
}, [_vm._l(_vm.tableColumns, function (item) {
return [item.isText ? _c('el-table-column', {
key: item.prop,
attrs: {
"align": "center",
"prop": item.prop,
"label": item.label,
"formatter": item.formatter,
"width": item.width,
"sortable": item.sortable
}
}) : _vm._e(), _vm._v(" "), !item.isText ? _c('el-table-column', {
key: item.prop,
attrs: {
"prop": item.prop,
"label": item.label,
"formatter": item.formatter,
"width": item.width,
"align": item.align ? item.align : 'center',
"sortable": item.sortable
},
scopedSlots: _vm._u([{
key: "default",
fn: function ({
row,
$index
}) {
return [_c('el-input', {
staticClass: "edit-input",
attrs: {
"size": "small",
"type": "number",
"min": "0"
},
on: {
"input": function ($event) {
return _vm.saveUnitData(row, $index);
}
},
model: {
value: row[item.prop],
callback: function ($$v) {
_vm.$set(row, item.prop, $$v);
},
expression: "row[item.prop]"
}
})];
}
}], null, true)
}) : _vm._e()];
})], 2)], 2);
};
var staticRenderFns = [];
// CONCATENATED MODULE: ./components/table/UnitTable.vue?vue&type=template&id=931e8840&scoped=true
// CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/table/UnitTable.vue?vue&type=script&lang=js
/* harmony default export */ var UnitTablevue_type_script_lang_js = ({
props: {
tableData: {
type: Array,
default: []
},
tableColumns: {
type: Array,
default: []
},
operateWith: {
type: String,
default: "100%"
},
selectionShow: {
type: Boolean,
default: false
},
handleShow: {
type: Boolean,
default: false
}
},
methods: {
saveUnitData(row, idx) {
this.tableData[idx] = row;
localStorage.setItem('unit', JSON.stringify(this.tableData));
}
}
});
// CONCATENATED MODULE: ./components/table/UnitTable.vue?vue&type=script&lang=js
/* harmony default export */ var table_UnitTablevue_type_script_lang_js = (UnitTablevue_type_script_lang_js);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(2);
// CONCATENATED MODULE: ./components/table/UnitTable.vue
function injectStyles (context) {
var style0 = __webpack_require__(189)
if (style0.__inject__) style0.__inject__(context)
}
/* normalize component */
var component = Object(componentNormalizer["a" /* default */])(
table_UnitTablevue_type_script_lang_js,
render,
staticRenderFns,
false,
injectStyles,
"931e8840",
"01507f2a"
)
/* harmony default export */ var UnitTable = __webpack_exports__["default"] = (component.exports);
/***/ }),
/***/ 201:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/table/MailTable.vue?vue&type=template&id=13e7bb30&scoped=true
var render = function render() {
var _vm = this,
_c = _vm._self._c;
return _c('div', [_vm._ssrNode("", [_vm._ssrNode("", "", [_vm._ssrNode(_vm._ssrList(_vm.mailData, function (items, key, i) {
return "" + _vm._ssrEscape("\n " + _vm._s(key) + "\n ") + " | " + (typeof items == 'string' ? "" : _vm.$utils.checkType(items) == 'Object' ? "" + _vm._ssrList(items, function (item, i) {
return " " + (key == 'QTY' ? "" + _vm._ssrEscape(_vm._s(item)) + "" : "" + _vm._ssrEscape("$" + _vm._s(item)) + "") + " ";
}) + " " : _vm._ssrList(items, function (item, i) {
return "" + _vm._ssrEscape(_vm._s(item)) + " ";
})) + " |
";
}) + " "), _vm._ssrNode("", "
", [_vm._ssrNode("", " | ", [_vm._t("default")], 2)])], 2)])]);
};
var staticRenderFns = [];
// CONCATENATED MODULE: ./components/table/MailTable.vue?vue&type=template&id=13e7bb30&scoped=true
// CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/table/MailTable.vue?vue&type=script&lang=js
/* harmony default export */ var MailTablevue_type_script_lang_js = ({
props: {
mailData: {},
buyData: {}
},
data() {
return {
objStyle: {
fontWeight: 'bold',
backgroundColor: '#efefef'
}
};
}
});
// CONCATENATED MODULE: ./components/table/MailTable.vue?vue&type=script&lang=js
/* harmony default export */ var table_MailTablevue_type_script_lang_js = (MailTablevue_type_script_lang_js);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(2);
// CONCATENATED MODULE: ./components/table/MailTable.vue
function injectStyles (context) {
}
/* normalize component */
var component = Object(componentNormalizer["a" /* default */])(
table_MailTablevue_type_script_lang_js,
render,
staticRenderFns,
false,
injectStyles,
"13e7bb30",
"f622c4d0"
)
/* harmony default export */ var MailTable = __webpack_exports__["default"] = (component.exports);
/***/ }),
/***/ 202:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/PriceToImg.vue?vue&type=template&id=2e991f10
var render = function render() {
var _vm = this,
_c = _vm._self._c;
return _c('div', {
ref: "printArea",
staticStyle: {
"font-family": "ProximaNova-Regular",
"background-color": "#fff",
"padding": "20px",
"word-break": "break-word",
"box-sizing": "border-box"
}
}, [_vm._ssrNode("" + (_vm.isImgSrc ? " " : " ") + " | " + _vm._ssrEscape(_vm._s(_vm.pageData.product_code)) + " " + _vm._ssrEscape(_vm._s(_vm.pageData.product_name)) + " " + _vm._s(_vm.comInfo.description) + " |
Specifications
" + _vm._ssrList(_vm.headerColumns, function (item, key) {
return "" + _vm._ssrEscape(_vm._s(item.label)) + " | ";
}) + "
" + _vm._ssrList(_vm.headerColumns, function (item, key) {
return "" + (_vm.specificationsObj[item.prop] ? "" + (item.prop != 'addonArr' ? " " + _vm._ssrEscape(_vm._s(_vm.specificationsObj[item.prop])) + "" : _vm._ssrList(_vm.specificationsObj.addonArr, function (opt, idx) {
return " " + _vm._ssrEscape(_vm._s(opt)) + " ";
})) + " " : "-") + " | ";
}) + "
Quote
" + (_vm.comLocationNum !== 1 ? "Quote | Total |
" : "") + " " + _vm._ssrList(_vm.tableColumns, function (item, key) {
return "" + _vm._ssrEscape(_vm._s(item.label)) + " | ";
}) + "
" + _vm._ssrList(_vm.tableData, function (row) {
return "" + _vm._ssrList(_vm.tableColumns, function (column) {
return "" + _vm._ssrEscape("\n " + _vm._s(row[column.prop].includes('.') ? '£' : '') + " " + _vm._s(row[column.prop] ? row[column.prop] : '0.00') + "\n ") + " | ";
}) + "
";
}) + "
" + (_vm.emailForm.Comments ? "" + _vm._ssrEscape(_vm._s(_vm.emailForm.Comments)) + "
" : ""))]);
};
var staticRenderFns = [];
// CONCATENATED MODULE: ./components/PriceToImg.vue?vue&type=template&id=2e991f10
// EXTERNAL MODULE: external "html2canvas"
var external_html2canvas_ = __webpack_require__(142);
var external_html2canvas_default = /*#__PURE__*/__webpack_require__.n(external_html2canvas_);
// CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/PriceToImg.vue?vue&type=script&lang=js
/* harmony default export */ var PriceToImgvue_type_script_lang_js = ({
props: {
pageData: {
type: Object,
default: {}
},
specificationsObj: {
type: Object,
default: {}
},
tableData: {
type: Array,
default: []
},
tableColumns: {
type: Array,
default: []
},
comLocationNum: {
type: Number,
default: 1
},
emailForm: {
type: Object,
default: {}
},
loading: {
type: Boolean,
default: false
},
isImgSrc: {
type: Boolean,
default: true
},
width: {
type: String,
default: '100%'
}
},
data() {
return {
headerColumns: [{
label: "LeadTime",
prop: "time",
type: "pre" //去掉$符号
}, {
label: "Model",
prop: "model",
type: "pre" //去掉$符号
}, {
label: "Decoration",
prop: "decoration",
type: "pre" //去掉$符号
}, {
label: "Add On",
prop: "addonArr",
type: "pre" //去掉$符号
}]
};
},
computed: {
comInfo() {
var _this$pageData;
return (_this$pageData = this.pageData) === null || _this$pageData === void 0 ? void 0 : _this$pageData.main;
},
comWidth() {
return 100 / this.tableColumns.length + '%';
}
},
created() {
if (!this.isImgSrc) {
this.getBase64Image(this.comInfo.image, 'productImg');
}
},
methods: {
getColumnHeaderStyle(column) {
if (column.prop === 'project') {
return {
'font-weight': 'bold'
};
}
return {};
},
//Base64生成产品图片,因为跨域
getBase64Image(url, ref) {
var that = this;
var image = new Image();
image.src = url + '?v=' + Math.random(); // 处理缓存
image.crossOrigin = '*'; // 支持跨域图片
image.onload = function () {
var base64 = that.drawBase64Image(image);
that.$refs[ref].src = base64;
};
},
drawBase64Image(img) {
var canvas = document.createElement('canvas');
canvas.width = img.width;
canvas.height = img.height;
var ctx = canvas.getContext('2d');
ctx.drawImage(img, 0, 0, img.width, img.height);
var dataURL = canvas.toDataURL('image/png');
return dataURL;
},
htmlToPdf(title) {
const element = this.$refs.printArea;
const clientWidth = element.offsetWidth;
const clientHeight = element.offsetHeight;
const kh = [clientWidth, clientHeight];
const opts = {
scale: 1.5,
// 缩放比例,提高生成图片清晰度
useCORS: true,
// 允许加载跨域的图片
// allowTaint: true, // 允许图片跨域,和 useCORS 二者不可共同使用
tainttest: true,
// 检测每张图片已经加载完成
logging: true // 日志开关,发布的时候记得改成 false
};
external_html2canvas_default()(element, opts).then(canvas => {
const dataURL = canvas.toDataURL('image/png');
this.downloadImage(dataURL, kh, title);
this.$emit('update:loading', false);
}).catch(() => {
this.$emit('update:loading', false);
// Bus.$emit("finishDownload");
});
},
getUrlBase64(url, kh) {
return new Promise(resolve => {
let canvas = document.createElement('canvas');
const ctx = canvas.getContext('2d');
const img = new Image();
img.crossOrigin = 'Anonymous'; // 允许跨域
img.src = url;
img.onload = () => {
// eslint-disable-next-line prefer-destructuring
canvas.height = kh[1];
// eslint-disable-next-line prefer-destructuring
canvas.width = kh[0];
ctx.drawImage(img, 0, 0, kh[0], kh[1]);
const dataURL = canvas.toDataURL('image/png');
canvas = null;
resolve(dataURL);
};
});
},
downloadImage(imgUrl, kh, title) {
this.getUrlBase64(imgUrl, kh).then(base64 => {
const link = document.createElement('a');
link.href = base64;
link.download = `${title}.png`;
link.click();
});
}
}
});
// CONCATENATED MODULE: ./components/PriceToImg.vue?vue&type=script&lang=js
/* harmony default export */ var components_PriceToImgvue_type_script_lang_js = (PriceToImgvue_type_script_lang_js);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(2);
// CONCATENATED MODULE: ./components/PriceToImg.vue
/* normalize component */
var component = Object(componentNormalizer["a" /* default */])(
components_PriceToImgvue_type_script_lang_js,
render,
staticRenderFns,
false,
null,
null,
"dda7dca6"
)
/* harmony default export */ var PriceToImg = __webpack_exports__["default"] = (component.exports);
/***/ }),
/***/ 216:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Quote_vue_vue_type_style_index_0_id_21f896fd_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(178);
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Quote_vue_vue_type_style_index_0_id_21f896fd_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Quote_vue_vue_type_style_index_0_id_21f896fd_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Quote_vue_vue_type_style_index_0_id_21f896fd_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Quote_vue_vue_type_style_index_0_id_21f896fd_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/***/ }),
/***/ 217:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_StockTable_vue_vue_type_style_index_0_id_13093327_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(179);
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_StockTable_vue_vue_type_style_index_0_id_13093327_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_StockTable_vue_vue_type_style_index_0_id_13093327_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_StockTable_vue_vue_type_style_index_0_id_13093327_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_StockTable_vue_vue_type_style_index_0_id_13093327_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/***/ }),
/***/ 218:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ChangeTable_vue_vue_type_style_index_0_id_4c957f55_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(180);
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ChangeTable_vue_vue_type_style_index_0_id_4c957f55_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ChangeTable_vue_vue_type_style_index_0_id_4c957f55_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ChangeTable_vue_vue_type_style_index_0_id_4c957f55_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ChangeTable_vue_vue_type_style_index_0_id_4c957f55_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/***/ }),
/***/ 219:
/***/ (function(module, exports) {
// Exports
module.exports = {
};
/***/ }),
/***/ 223:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/product/Quote.vue?vue&type=template&id=21f896fd&scoped=true
var render = function render() {
var _vm = this,
_c = _vm._self._c;
return _c('div', [_vm.quoteLoadState == 0 ? _c('div', {
directives: [{
name: "loading",
rawName: "v-loading",
value: true,
expression: "true"
}],
staticClass: "com-loading"
}) : _vm.quoteLoadState == 1 ? _vm._ssrNode("", "
", [_c('tab-nav', {
attrs: {
"borderType": 'allBorder',
"liWidth": 100,
"liHeight": 40,
"marginRight": 5,
"currTab": _vm.curWeek,
"tabList": _vm.priceList
},
on: {
"update:currTab": function ($event) {
_vm.curWeek = $event;
},
"update:curr-tab": function ($event) {
_vm.curWeek = $event;
}
}
}), _vm._ssrNode(" "), _vm._l(_vm.priceList, function (items, indexs) {
var _items$basePrice, _items$decoration, _items$basePrice2, _items$basePrice2$ite, _items$basePrice2$ite2, _items$basePrice3, _items$basePrice3$ite, _items$basePrice3$ite2;
return _vm._ssrNode("", "
", [_vm._ssrNode("", "
", [_c('tab-nav', {
attrs: {
"borderType": 'incompleteBorder',
"currTab": items.curPrint,
"tabList": items.basePrice,
"allPrintTab": _vm.allPrintTab,
"marginTop": 0,
"marginRight": 5,
"marginBottom": ((_items$basePrice = items.basePrice) === null || _items$basePrice === void 0 ? void 0 : _items$basePrice.length) > 1 ? 7 : 0
},
on: {
"update:currTab": function ($event) {
return _vm.$set(items, "curPrint", $event);
},
"update:curr-tab": function ($event) {
return _vm.$set(items, "curPrint", $event);
},
"handle": function ($event) {
return _vm.sortBy(items);
}
}
})], 1), _vm._ssrNode(" "), _vm._l(items.basePrice, function (item, index) {
var _items$decorationOrig;
return _vm._ssrNode("", "
", [_c('new-price-table', {
attrs: {
"tableColumns": [..._vm.undecorated_columns, ...item.part_columns],
"tableData": item.data,
"tableType": 'Undecorated',
"curPrint": item.name,
"curModel": (_items$decorationOrig = items.decorationOrign[index]) === null || _items$decorationOrig === void 0 ? void 0 : _items$decorationOrig.model,
"data": items,
"selectRow": item.selectBaseRow
},
on: {
"update:selectRow": function ($event) {
return _vm.$set(item, "selectBaseRow", $event);
},
"update:select-row": function ($event) {
return _vm.$set(item, "selectBaseRow", $event);
}
}
})], 1);
}), _vm._ssrNode(" "), (_items$decoration = items.decoration) !== null && _items$decoration !== void 0 && _items$decoration.length || (_items$basePrice2 = items.basePrice) !== null && _items$basePrice2 !== void 0 && (_items$basePrice2$ite = _items$basePrice2[items.curPrint]) !== null && _items$basePrice2$ite !== void 0 && (_items$basePrice2$ite2 = _items$basePrice2$ite.decoration_addition) !== null && _items$basePrice2$ite2 !== void 0 && _items$basePrice2$ite2.length ? _c('new-price-table', {
attrs: {
"tableData": items.decoration,
"tableColumns": [..._vm.decoration_columns, ..._vm.comCurBaseColumns],
"tableType": 'Decoration',
"marginBottom": 0,
"hasDecAdd": (_items$basePrice3 = items.basePrice) === null || _items$basePrice3 === void 0 ? void 0 : (_items$basePrice3$ite = _items$basePrice3[items.curPrint]) === null || _items$basePrice3$ite === void 0 ? void 0 : (_items$basePrice3$ite2 = _items$basePrice3$ite.decoration_addition) === null || _items$basePrice3$ite2 === void 0 ? void 0 : _items$basePrice3$ite2.length
}
}) : _vm._e(), _vm._ssrNode(" "), _vm._l(items.basePrice, function (item, index) {
return _vm._ssrNode("", "
", [_c('new-price-table', {
attrs: {
"tableData": item.decoration_addition,
"tableColumns": [..._vm.addon_columns, ...item.part_columns],
"isCheckBox": true,
"tableType": 'Addon',
"multipleSelection": items.selectAdditionRow
},
on: {
"update:multipleSelection": function ($event) {
return _vm.$set(items, "selectAdditionRow", $event);
},
"update:multiple-selection": function ($event) {
return _vm.$set(items, "selectAdditionRow", $event);
}
}
})], 1);
})], 2);
})], 2) : _vm._ssrNode(""), _vm._ssrNode(" "), _c('no-ssr', [_vm.quoteLoadState == 1 ? _c('div', [_c('mail-table', {
directives: [{
name: "show",
rawName: "v-show",
value: false,
expression: "false"
}],
ref: "mailtable",
attrs: {
"mailData": _vm.mailData
}
}, [_c('price-to-img', {
attrs: {
"pageData": _vm.pageData,
"specificationsObj": _vm.specificationsObj,
"tableData": _vm.comFilterSwitchSellData,
"tableColumns": _vm.comMergeColumns,
"comLocationNum": _vm.comLocationNum,
"emailForm": _vm.commentObj
}
})], 1), _vm._v(" "), _c('el-dialog', {
ref: "dialogRef",
attrs: {
"lock-scroll": false,
"title": "Customer Quote",
"visible": _vm.priceToImgVisible,
"custom-class": "price-to-img-dialog"
},
on: {
"update:visible": function ($event) {
_vm.priceToImgVisible = $event;
}
}
}, [_c('price-to-img', {
ref: "priceToImgRef",
attrs: {
"isImgSrc": false,
"loading": _vm.pdfLoading,
"pageData": _vm.pageData,
"specificationsObj": _vm.specificationsObj,
"tableData": _vm.comFilterSwitchSellData,
"tableColumns": _vm.comMergeColumns,
"comLocationNum": _vm.comLocationNum,
"emailForm": _vm.commentObj
},
on: {
"update:loading": function ($event) {
_vm.pdfLoading = $event;
}
}
}), _vm._v(" "), _c('p', {
staticClass: "tips"
}, [_vm._v("Change default standard comment:")]), _vm._v(" "), _c('el-input', {
model: {
value: _vm.commentObj.Comments,
callback: function ($$v) {
_vm.$set(_vm.commentObj, "Comments", $$v);
},
expression: "commentObj.Comments"
}
}), _vm._v(" "), _c('div', {
staticClass: "btn-wrap"
}, [_c('el-button', {
staticClass: "button-black button-margin",
attrs: {
"size": "medium",
"loading": _vm.pdfLoading
},
on: {
"click": _vm.handleDownloadPdf
}
}, [_vm._v("Download")])], 1)], 1), _vm._v(" "), _c('price-to-img', {
directives: [{
name: "show",
rawName: "v-show",
value: false,
expression: "false"
}],
ref: "pdf",
attrs: {
"loading": _vm.pdfLoading,
"pageData": _vm.pageData,
"specificationsObj": _vm.specificationsObj,
"tableData": _vm.comFilterSwitchSellData,
"tableColumns": _vm.comMergeColumns,
"comLocationNum": _vm.comLocationNum,
"emailForm": _vm.commentObj
},
on: {
"update:loading": function ($event) {
_vm.pdfLoading = $event;
}
}
}), _vm._v(" "), _c('dialog-XX-success', {
attrs: {
"visible": _vm.xxContentVisible,
"imgType": false,
"content": 'This quantity is below the MOQ for this product'
},
on: {
"update:visible": function ($event) {
_vm.xxContentVisible = $event;
}
}
})], 1) : _vm._e()])], 2);
};
var staticRenderFns = [];
// CONCATENATED MODULE: ./components/product/Quote.vue?vue&type=template&id=21f896fd&scoped=true
// EXTERNAL MODULE: external "vuex"
var external_vuex_ = __webpack_require__(6);
// EXTERNAL MODULE: external "lodash"
var external_lodash_ = __webpack_require__(141);
var external_lodash_default = /*#__PURE__*/__webpack_require__.n(external_lodash_);
// EXTERNAL MODULE: external "number-precision"
var external_number_precision_ = __webpack_require__(122);
// EXTERNAL MODULE: ./components/table/NewPriceTable.vue + 4 modules
var NewPriceTable = __webpack_require__(198);
// EXTERNAL MODULE: ./components/table/TotalTable.vue + 4 modules
var TotalTable = __webpack_require__(199);
// EXTERNAL MODULE: ./components/table/UnitTable.vue + 4 modules
var UnitTable = __webpack_require__(200);
// EXTERNAL MODULE: ./components/table/MailTable.vue + 4 modules
var MailTable = __webpack_require__(201);
// EXTERNAL MODULE: ./components/DIalogXXSuccess.vue + 4 modules
var DIalogXXSuccess = __webpack_require__(30);
// CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/product/Quote.vue?vue&type=script&lang=js
/* harmony default export */ var Quotevue_type_script_lang_js = ({
components: {
NewPriceTable: NewPriceTable["default"],
TotalTable: TotalTable["default"],
UnitTable: UnitTable["default"],
MailTable: MailTable["default"],
'dialog-XX-success': DIalogXXSuccess["default"]
},
props: {
pageData: {
type: Object,
default: () => {
return {};
}
},
id: {
type: Number,
default: null
}
},
data() {
return {
quoteLoadState: 0,
curWeek: 0,
allPrintTab: [],
priceList: [],
initZeroObj: {},
initSetupObj: {},
initUnitObj: {},
initChangeUnitObj: {},
initFrightObj: {},
initTotalObj: {},
xxContentVisible: false,
setup_switch: false,
freight_switch: false,
weight: {},
undecorated_columns: [{
label: 'MODEL',
prop: 'model',
type: 'text',
align: 'left',
width: 150,
extraWidth: 50,
// 配合组件 (820-tableColumns[0].width-tableColumns[0].extraWidth)/(tableColumns.length-1)
isFirstColumn: true // 去掉$符号
}, {
label: 'SETUP',
prop: 'website_setup'
}],
decoration_columns: [{
label: 'PRINT OPTION',
prop: 'dec_code',
type: 'radioInput',
align: 'left',
width: 150,
extraWidth: 50
}, {
label: 'SETUP',
prop: 'website_setup'
}],
addon_columns: [{
label: 'Addon',
prop: 'name',
type: 'text',
width: 150,
extraWidth: 50,
isFirstColumn: true // 去掉$符号
}, {
label: 'Setup',
prop: 'website_setup'
}],
buy_columns: [{
label: 'QTY',
prop: 'project',
isFirstColumn: true // 去掉$符号
}],
unit_columns: [{
label: 'QTY',
prop: 'total',
align: 'left',
isText: true
}],
buyData: [{
project: 'Setup'
}, {
project: 'Unit'
}, {
project: 'Freight'
}, {
project: 'Total'
}],
unitData: [{
total: 'Unit Rate %'
}, {
total: 'Setup %'
}, {
total: 'Freight %'
}],
sellData: [{
project: 'Postcode',
summary: '-'
}, {
project: 'Setup',
summary: 0.00
}, {
project: 'Unit',
summary: 0.00
}, {
project: 'Freight',
summary: 0.00
}, {
project: 'Total',
summary: 0.00
}],
POA_Config: ['111', '111.00', '999', '999.00'],
enquiryFormVisible: false,
enquiryForm: {
Name: '',
Email: '',
Phone: '',
'Customer manager': null,
Comments: ''
},
enquiryConfig: [{
prop: 'Name',
type: 'input'
}, {
prop: 'Email',
type: 'input'
}, {
prop: 'Phone',
type: 'input'
}, {
prop: 'Customer manager',
type: 'select',
selectlist: [],
isShow: true
}, {
prop: 'Comments',
type: 'textarea'
}],
rules: {
Name: [{
required: true,
message: 'Please enter',
trigger: 'blur'
}],
Email: [{
required: true,
message: 'Please enter the correct format',
pattern: /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((.[a-zA-Z0-9_-]{2,3}){1,2})$/,
trigger: 'blur'
}],
Phone: [{
required: true,
message: 'Please enter the correct format',
// pattern: /^1[0-9]{10}$/,
trigger: 'blur'
}],
'Customer manager': [{
required: true,
message: 'Please select',
trigger: 'change'
}]
},
mailData: {
Url: ''
},
priceToImgVisible: false,
downloadDialogVisible: false,
commentObj: {
'Email Address': '',
Comments: ''
},
enquiryConfig1: [{
prop: 'Email Address',
type: 'input'
}, {
prop: 'Comments',
type: 'input'
}],
rules1: {
'Email Address': [{
required: true,
message: 'Please enter the correct format',
pattern: /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((.[a-zA-Z0-9_-]{2,3}){1,2})$/,
trigger: 'blur'
}]
},
specificationsObj: {
time: null,
model: null,
decoration: null,
addonArr: null
},
pdfLoading: false
};
},
computed: {
...Object(external_vuex_["mapState"])('config', {
configInfo: state => state.configInfo
}),
userInfo() {
return this.$store.state.userInfo;
},
comCurWeekPrice() {
return this.priceList[this.curWeek] || {};
},
comCurPrint() {
return this.comCurWeekPrice.curPrint;
},
comCurBasePrice() {
return this.comCurWeekPrice.basePrice[this.comCurPrint];
},
comLocationNum() {
return +this.comCurWeekPrice.basePrice[this.comCurPrint].locationNum;
},
comCurBaseColumns() {
return this.comCurBasePrice.part_columns;
},
comCurBaseTotalColumns() {
const d = this.comCurWeekPrice.basePrice[this.comCurPrint].total_part_columns;
const n = this.comLocationNum;
if (n === 1) {
return d;
} else {
const concatAdd = [...d, ...this.comCurWeekPrice.basePrice[this.comCurPrint].remainingAttr].slice(0, n);
return concatAdd;
}
},
comTotalLabel() {
// 计算所有元素label的和
return this.comCurBaseTotalColumns.reduce((sum, item) => sum + Number(item.label), 0);
},
comSummaryColumns() {
return [{
label: this.comTotalLabel.toString(),
prop: 'summary'
}];
},
comAttributeList() {
var _this$comCurBaseTotal;
const obj = {};
(_this$comCurBaseTotal = this.comCurBaseTotalColumns) === null || _this$comCurBaseTotal === void 0 ? void 0 : _this$comCurBaseTotal.forEach(item => {
obj[item.prop] = item.label;
});
obj.summary = this.comTotalLabel;
return obj;
},
// 当前已选基础价
comBasePrice() {
return this.comCurBasePrice.selectBaseRow;
},
// 当前累加打印价
comDecoPrice() {
var _this$comCurWeekPrice;
if (!((_this$comCurWeekPrice = this.comCurWeekPrice.decoration) !== null && _this$comCurWeekPrice !== void 0 && _this$comCurWeekPrice.length)) {
return [];
}
const arr = this.comCurWeekPrice.decoration.map((item, idx) => {
const obj = {};
if (+item.num > 0) {
for (const i in this.initUnitObj) {
if (idx === 0) {
// 首个打印价要取附加价计算
const keyArr = i.split('_');
const supplier_val = item[`supplier_${keyArr[1]}`];
if (this.POA_Config.includes(supplier_val)) {
obj[`${i}`] = supplier_val;
} else {
obj[`${i}`] = Object(external_number_precision_["times"])(+supplier_val, item.num);
}
} else {
obj[`${i}`] = this.POA_Config.includes(item[i]) ? item[i] : Object(external_number_precision_["times"])(+item[i], item.num);
}
}
}
return obj;
}).filter(obj => Object.keys(obj).length !== 0);
return arr;
},
comBuyData() {
this.calculateBuyData();
return this.buyData;
},
comNoSumCol() {
return [...this.buy_columns, ...this.comCurBaseTotalColumns];
},
comHasSumCol() {
return [...this.buy_columns, ...this.comCurBaseTotalColumns, ...this.comSummaryColumns];
},
comMergeColumns() {
return this.comLocationNum == 1 ? this.comNoSumCol : this.comHasSumCol;
},
comSellData() {
if (Object.keys(this.comAttributeList).length !== 0) {
this.calculateSellData();
}
return this.sellData;
},
comFilterSwitchSellData() {
var _this$comSellData;
return (_this$comSellData = this.comSellData) === null || _this$comSellData === void 0 ? void 0 : _this$comSellData.filter((item, i) => {
if (i === 1 && this.setup_switch) {
return false;
} else if (i === 3 && this.freight_switch) {
return false;
} else {
return item;
}
});
}
},
methods: {
...Object(external_vuex_["mapActions"])(['getUserInfo']),
getQuote() {
this.$axios.post('/uk-api/quote/pricequote', {
id: this.id
}).then(res => {
if (localStorage.getItem('unit')) {
this.unitData = JSON.parse(localStorage.getItem('unit'));
}
const {
attributeList,
priceList,
default: defaultID
} = res.result;
if (!Object.keys(attributeList).length || !Object.keys(priceList).length) {
this.quoteLoadState = 2;
return;
}
for (const a in attributeList) {
// 过滤掉website_qty标签无数量
if (attributeList[a]) {
this.initZeroObj[a] = 0;
} else {
delete attributeList[a];
}
for (const unit of this.unitData) {
// 如果对象中缺少 attributeList 的 key,则设置为 40
if (!(a in unit) || unit[a] === '') {
this.$set(unit, a, 40);
}
}
}
// 格式化数据,对象改成数组
for (const keys in priceList) {
const vals = {};
const {
decoration,
additionlist,
...remaining
} = priceList[keys];
vals.basePrice = [];
vals.selectAdditionRow = [];
vals.curPrint = 0;
vals.name = this.formatDurationString(keys);
vals.nameOrigin = keys;
vals.decorationOrign = [...decoration];
vals.decorationID = decoration.map(i => i.id);
vals.decoration = [...decoration].flatMap(item => {
const result = [];
if (item.max_color > 0) {
result.push({
...item,
max_num: item.max_color,
id: `${item.id}-1`,
decName: item.max_color_name
});
}
if (item.max_point > 0) {
result.push({
...item,
max_num: item.max_point,
id: `${item.id}-2`,
decName: item.max_point_name
});
}
return result;
});
vals.additionlist = additionlist;
for (const k in remaining) {
var _remaining$k, _remaining$k2;
const o = {};
o.attributeList = this.copyData(attributeList);
if (((_remaining$k = remaining[k]) === null || _remaining$k === void 0 ? void 0 : _remaining$k.length) > 1) {
// 检查数组中各元素的 website_qtyN 是否都等于 "-" or "POA",则删除key
for (const a in attributeList) {
const is111Poa = remaining[k].every(item => this.POA_Config.includes(item[a]));
if (is111Poa) {
delete o.attributeList[a];
}
}
} else if (((_remaining$k2 = remaining[k]) === null || _remaining$k2 === void 0 ? void 0 : _remaining$k2.length) === 1) {
// 判断 remaining[k][0] 中是否包含 vals.attributeList 的键,并且对应的值都等于 "-" or "POA",则不删除key
const obj = remaining[k][0];
const attributeKeys = Object.keys(o.attributeList);
const areAllKeysInPOAConfig = attributeKeys.every(key => {
return Object.prototype.hasOwnProperty.call(obj, key) && this.POA_Config.includes(obj[key]);
});
if (!areAllKeysInPOAConfig) {
attributeKeys.forEach(key => {
if (Object.prototype.hasOwnProperty.call(obj, key) && this.POA_Config.includes(obj[key])) {
delete o.attributeList[key];
}
});
}
}
o.name = k;
o.data = remaining[k];
o.locationNum = 1;
o.part_columns = Object.keys(o.attributeList).map(e => {
return {
label: o.attributeList[e].toString(),
prop: e
};
});
const freightParam = {
postcode: '',
freight_type: 1,
freight: {}
};
o.total_part_columns = this.copyData(o.part_columns).map(obj => ({
...obj,
...freightParam
}));
o.remainingAttr = [];
const firstColumns = {
...o.part_columns[0],
...freightParam
};
for (let i = 1; i < 9; i++) {
if (!Object.keys(o.attributeList).includes(`website_qty${i}`)) {
const newColumn = {
...firstColumns
};
this.$set(newColumn, 'prop', `website_qty${i}`);
o.remainingAttr.push(newColumn);
}
}
;
vals.basePrice.push(o);
if (!this.allPrintTab.includes(k)) {
this.allPrintTab.push(k);
}
}
this.priceList.push(vals);
}
this.priceList.forEach((options, index) => {
// 原始数据name没空格,需要映射到
if (options.nameOrigin === (defaultID === null || defaultID === void 0 ? void 0 : defaultID.name)) {
this.curWeek = index;
options.decorationOrign.forEach((opt, idx) => {
var _defaultID$decoration;
if (opt.id === (defaultID === null || defaultID === void 0 ? void 0 : (_defaultID$decoration = defaultID.decoration) === null || _defaultID$decoration === void 0 ? void 0 : _defaultID$decoration.id)) {
this.$set(options, 'curPrint', idx);
}
});
}
// 所有周期的所有打印,进来页面时默认勾选第一条价格
options.basePrice.forEach((opt, idx) => {
var _options$decorationOr, _options$decorationOr2;
this.$set(opt, 'selectBaseRow', opt.data[0] || {});
opt.decoration_addition = [...(((_options$decorationOr = options.decorationOrign) === null || _options$decorationOr === void 0 ? void 0 : (_options$decorationOr2 = _options$decorationOr[idx]) === null || _options$decorationOr2 === void 0 ? void 0 : _options$decorationOr2.decoration_addition) || []), ...(options.additionlist || [])];
});
options.decoration.forEach(opt => {
this.$set(opt, 'num', 0);
});
});
this.initSetupObj = Object.assign({}, this.initZeroObj);
this.initUnitObj = Object.assign({}, this.initZeroObj, {
website_setup: 0
});
this.initFrightObj = Object.assign({}, this.initZeroObj);
this.buyData = this.buyData.map(item => {
return {
...item,
...this.initSetupObj
};
});
this.sellData = this.sellData.map(item => {
return {
...item,
...this.initSetupObj
};
});
this.quoteLoadState = 1;
}).catch(e => {
console.log('this.quoteLoadState1: ', e);
this.quoteLoadState = 2;
});
},
formatDurationString(input) {
// 匹配数字和字符串的正则表达式
const regex = /(\d+)([a-zA-Z]+)/g;
const result = input.replace(regex, '$1 $2');
return result;
},
// getWeight() {
// this.$axios
// .post('/api/quote/weight', { id: this.id })
// .then(res => {
// this.weight = res.result
// })
// .catch(() => {})
// },
// getFreight(k) {
// const postcode = this.comCurBaseTotalColumns[k].postcode
// const type = this.comCurBaseTotalColumns[k].freight_type
// const init = { basic:0,pickup:0,minimum:0 }
// if (postcode.length < 3) {
// this.comCurBaseTotalColumns[k].freight = init
// return
// }
// this.$axios
// .post('/api/quote/freight', {
// postcode,
// type
// })
// .then(res => {
// this.comCurBaseTotalColumns[k].freight = Array.isArray(res.result)?init:res.result
// })
// },
getDebFreight: external_lodash_default.a.debounce(function (k) {
this.getFreight(k);
}, 200),
getNumber(e, row, min) {
if (parseInt(e.target.value) < min) {
this.xxContentVisible = true;
row.label = min;
} else {
this.xxContentVisible = false;
}
},
sortBy(items) {
// items.decoration.sort(this.customSort(items.decorationID))
// const targetElement = items.decoration.splice(items.curPrint, 1)[0]
// items.decoration.unshift(targetElement)
},
// 按原打印数组的id字段排序
customSort(decorationID) {
return (a, b) => {
return decorationID.indexOf(a.id) - decorationID.indexOf(b.id);
};
},
dividePrice(a) {
return Object(external_number_precision_["divide"])(+a, 100);
},
// openMailDialog() {
// if (this.$utils.checkLogin()) {
// this.getUserInfo()
// const { contacts, email, phone, crm_users_id:crmUsersId } = this.userInfo
// this.enquiryForm.Name = contacts
// this.enquiryForm.Email = email
// this.enquiryForm.Phone = phone
// if (crmUsersId?.length) {
// this.enquiryConfig[3].selectlist = crmUsersId
// if (crmUsersId?.length === 1) {
// this.enquiryForm['Customer manager'] = crmUsersId[0].name
// }
// } else {
// this.enquiryConfig[3].isShow = false
// this.$delete(this.enquiryForm, 'Customer manager')
// }
// this.enquiryFormVisible = true
// } else {
// this.openDialog()
// }
// },
getMailData() {
this.mailData.Url = window.location.href;
const {
Name,
Email,
Phone,
Comments
} = this.enquiryForm;
this.mailData['Customer Name'] = Name;
this.mailData['Customer Email'] = Email;
this.mailData['Customer Phone'] = Phone;
this.mailData.Comments = Comments;
const {
email,
level,
createTime
} = this.userInfo;
this.mailData['Member Account'] = email;
this.mailData['Member Grade'] = level.name;
this.mailData['Member Registration time'] = createTime;
this.mailData['Quote time'] = this.$utils.formatTime(new Date());
},
// 发送价格邮件 Enquiry按钮
// async sendPriceMail() {
// await this.getMailData()
// await this.getCustomerQuoteData()
// const {
// Name,
// Email,
// Phone,
// Comments,
// 'Customer manager': customerManager,
// } = this.enquiryForm
// this.$axios
// .post('/uk-api/quote/sendenquiry', {
// content: this.$refs.mailtable.$el.innerHTML,
// name: Name,
// email: Email,
// phone: Phone,
// customer_manager: customerManager || '',
// url: this.mailData.Url,
// product_code: this.pageData.product_code,
// comments: Comments,
// member_id: this.userInfo.id,
// })
// .then(res => {
// this.setLoading(false)
// this.enquiryFormVisible = false
// this.$confirm('Enquiry Sent', {
// confirmButtonText: 'OK',
// showCancelButton: false,
// type: 'success',
// center: true,
// showClose: false,
// confirmButtonClass: 'com-btnblack',
// }).then(() => {})
// })
// .catch(() => {
// this.setLoading(false)
// })
// },
// getCustomerQuoteData() {
// const { name, selectAdditionRow } = this.comCurWeekPrice
// this.specificationsObj.time = name
// this.specificationsObj.model = this.comBasePrice.model
// this.specificationsObj.decoration = this.comCurBasePrice.name
// if (selectAdditionRow.length) {
// this.specificationsObj.addonArr = selectAdditionRow.map(
// item => item.name
// )
// } else {
// this.specificationsObj.addonArr = null
// }
// },
// openDownloadDialog(type) {
// this.getCustomerQuoteData()
// type
// ? (this.downloadDialogVisible = true)
// : (this.priceToImgVisible = true)
// },
handleDownloadPdf() {
this.pdfLoading = true;
this.$nextTick(() => {
this.$refs.priceToImgRef.htmlToPdf(this.pageData.product_code);
});
},
// 发送PDF邮件
// sendPdfMail() {
// this.$axios
// .post('/api/quote/sendpdf', {
// content: this.$refs.pdf.$el.innerHTML,
// product_code: this.pageData.product_code,
// email: this.commentObj['Email Address'],
// })
// .then(res => {
// this.setLoading(false)
// this.downloadDialogVisible = false
// this.$confirm('Enquiry Sent', {
// confirmButtonText: 'OK',
// showCancelButton: false,
// type: 'success',
// center: true,
// showClose: false,
// confirmButtonClass: 'com-btnblack',
// })
// })
// .catch(() => {
// this.setLoading(false)
// })
// },
copyData(data) {
return JSON.parse(JSON.stringify(data));
},
calculateBuyData() {
const selPriceArr = [];
if (JSON.stringify(this.comBasePrice) !== '{}') {
selPriceArr.push(this.comBasePrice);
}
selPriceArr.push(...this.comDecoPrice, ...this.comCurWeekPrice.selectAdditionRow);
if (selPriceArr.length === 0) {
this.buyData = this.buyData.map(item => ({
...item,
...this.initZeroObj
}));
return;
}
// 累加所选,初始数量对应的单价。赋值给this.initUnitObj
for (const i in this.initUnitObj) {
const columnSum = this.copyData(selPriceArr).reduce(function (prev, cur) {
if (cur[i] === '111' || cur[i] === '111.00') {
return cur[i] = '-';
} else if (cur[i] === '999' || cur[i] === '999.00') {
return cur[i] = 'POA';
} else {
// 当基础价格是-POA,后续累加价格是正常数字价,依然返回-POA
if (prev === '-' || prev === 'POA') {
return prev;
}
return Object(external_number_precision_["plus"])(+cur[i], prev).toFixed(2);
}
}, 0);
this.$set(this.initUnitObj, i, columnSum);
}
for (const a in this.comAttributeList) {
// 每次更改选择价格,必须遍历整个comAttributeList
const tempIdx = this.comCurBaseColumns.findIndex(items => +this.comAttributeList[a] < +items.label);
if (tempIdx > 0) {
const key = this.comCurBaseColumns[tempIdx - 1].prop;
this.$set(this.initChangeUnitObj, a, this.initUnitObj[key]);
} else {
const length = this.comCurBaseColumns.length;
const key = this.comCurBaseColumns[length - 1].prop;
this.$set(this.initChangeUnitObj, a, this.initUnitObj[key]);
}
if (this.initChangeUnitObj[a] === 'POA' || this.initChangeUnitObj[a] === '-') {
this.$set(this.initSetupObj, a, this.initChangeUnitObj[a]);
this.$set(this.initFrightObj, a, this.initChangeUnitObj[a]);
} else {
this.$set(this.initSetupObj, a, this.initUnitObj.website_setup);
// 计算运费
// 单独批次数量的总重
// weight定义是{},后端没数据传回[]
const unitWLocal = this.weight.unit_w_local ? +this.weight.unit_w_local : 0;
const totalWeight = Math.ceil(Object(external_number_precision_["times"])(unitWLocal, this.comAttributeList[a]));
// Road express 1 AAE:AAEFactor 2
const setupFuel = this.dividePrice(this.configInfo.fuel);
const setupBagFreight = this.dividePrice(this.configInfo.bag_freight);
const setupExpressFreight = this.dividePrice(this.configInfo.express_freight);
const AAEFactor = Object(external_number_precision_["plus"])(1, setupBagFreight, setupFuel);
const expressFactor = Object(external_number_precision_["plus"])(1, setupExpressFreight, setupFuel);
let frightCost = 0;
let freightType;
let postcode;
let freight = {};
const matchIndex = this.comCurBaseTotalColumns.findIndex(item => item.prop === a);
// 1,所有按第一个运费统计;不为1,则只计算 comCurBaseTotalColumns的[地址数]长度
if (+this.comLocationNum === 1 || this.comLocationNum >= matchIndex + 1) {
({
freight,
freight_type: freightType,
postcode
} = this.comCurBaseTotalColumns[+this.comLocationNum === 1 ? 0 : matchIndex] || {});
}
if (freightType === 1 && postcode >= 3) {
if (totalWeight > 20) {
const a1 = Object(external_number_precision_["minus"])(totalWeight, 20);
const a2 = Object(external_number_precision_["times"])(a1, +freight.basic);
const a3 = Object(external_number_precision_["plus"])(+freight.pickup, a2);
frightCost = Object(external_number_precision_["times"])(a3, expressFactor);
} else {
frightCost = Object(external_number_precision_["times"])(+freight.pickup, expressFactor);
}
} else if (freightType === 2 && postcode >= 3) {
const a1 = Object(external_number_precision_["divide"])(totalWeight, 5);
const a2 = Object(external_number_precision_["times"])(+freight.minimum, Math.ceil(a1));
frightCost = Object(external_number_precision_["times"])(a2, AAEFactor);
} else {
frightCost = 0;
}
this.$set(this.initFrightObj, a, Math.ceil(frightCost).toFixed(2));
}
if (this.initChangeUnitObj[a] === '-' || this.initChangeUnitObj[a] === 'POA') {
this.$set(this.initTotalObj, a, this.initChangeUnitObj[a]);
} else {
const unitQTY = Object(external_number_precision_["times"])(this.initChangeUnitObj[a], this.comAttributeList[a]);
this.$set(this.initTotalObj, a, Object(external_number_precision_["plus"])(this.initUnitObj.website_setup, unitQTY, this.initFrightObj[a]).toFixed(2));
}
if (this.setup_switch) {
// 业务:Setup价格/对应数量后向上取整
if (this.initChangeUnitObj[a] === '-' || this.initChangeUnitObj[a] === 'POA') {
this.$set(this.initChangeUnitObj, a, this.initChangeUnitObj[a]);
} else {
const num = Math.ceil(this.initSetupObj[a] / this.comAttributeList[a] * 100) / 100;
this.$set(this.initChangeUnitObj, a, Object(external_number_precision_["plus"])(this.initChangeUnitObj[a], num).toFixed(2));
}
}
if (this.freight_switch) {
if (this.initChangeUnitObj[a] === '-' || this.initChangeUnitObj[a] === 'POA') {
this.$set(this.initChangeUnitObj, a, this.initChangeUnitObj[a]);
} else {
const num = Math.ceil(this.initFrightObj[a] / this.comAttributeList[a] * 100) / 100;
this.$set(this.initChangeUnitObj, a, Object(external_number_precision_["plus"])(this.initChangeUnitObj[a], num).toFixed(2));
}
}
}
if (this.setup_switch) {
this.$set(this.buyData, 0, {
...this.buyData[0],
...this.initZeroObj,
...{
'summary': 0.00
}
});
} else {
this.$set(this.buyData, 0, {
...this.buyData[0],
...this.initSetupObj
});
}
this.$set(this.buyData, 1, {
...this.buyData[1],
...this.initChangeUnitObj
});
if (this.freight_switch) {
this.$set(this.buyData, 2, {
...this.buyData[2],
...this.initZeroObj
});
} else {
this.$set(this.buyData, 2, {
...this.buyData[2],
...this.initFrightObj
});
}
this.$set(this.buyData, 3, {
...this.buyData[3],
...this.initTotalObj
});
},
calculateSellData() {
// 放置comSellData计算和副作用的代码
const buySetup = this.comBuyData[0];
const buyUnit = this.comBuyData[1];
const buyFright = this.comBuyData[2];
let frightSummary = 0;
for (const i in this.comAttributeList) {
if (buyUnit[i] === '-' || buyUnit[i] === 'POA') {
this.sellData[0][i] = '-';
this.sellData[1][i] = buyUnit[i];
this.sellData[2][i] = buyUnit[i];
this.sellData[3][i] = buyUnit[i];
this.sellData[4][i] = buyUnit[i];
} else {
var _this$comCurBaseTotal2;
const item = this.comLocationNum === 1 ? this.comCurBaseTotalColumns[0] : this.comCurBaseTotalColumns.find(element => element.prop === i);
this.sellData[0][i] = item && item.postcode !== '' ? item.postcode : '-';
// 分别乘以Markup %表格
const key = (_this$comCurBaseTotal2 = this.comCurBaseTotalColumns[0]) === null || _this$comCurBaseTotal2 === void 0 ? void 0 : _this$comCurBaseTotal2.prop;
if (this.unitData[1] && this.unitData[1][key]) {
const a = Object(external_number_precision_["plus"])(this.unitData[1][key] / 100, 1);
this.sellData[1][i] = Object(external_number_precision_["times"])(buySetup[i], a).toFixed(2);
} else {
this.sellData[1][i] = buySetup[i];
}
if (this.unitData[0][i]) {
const a = Object(external_number_precision_["plus"])(this.unitData[0][i] / 100, 1);
this.sellData[2][i] = Object(external_number_precision_["times"])(buyUnit[i], a).toFixed(2);
} else {
this.sellData[2][i] = buyUnit[i];
}
if (this.unitData[2] && this.unitData[2][key]) {
const a = Object(external_number_precision_["plus"])(this.unitData[2][key] / 100, 1);
this.sellData[3][i] = Object(external_number_precision_["times"])(buyFright[i], a).toFixed(2);
// freight_switch会使qty的运费=0无法计算,故用了initFrightObj
const fa = Object(external_number_precision_["times"])(this.initFrightObj[i], a);
frightSummary = Object(external_number_precision_["plus"])(frightSummary, fa).toFixed(2);
} else {
this.sellData[3][i] = buyFright[i];
frightSummary = Object(external_number_precision_["plus"])(frightSummary, this.initFrightObj[i]).toFixed(2);
}
const unitQTY = Object(external_number_precision_["times"])(this.sellData[2][i], this.comAttributeList[i]);
this.$set(this.sellData[4], i, Object(external_number_precision_["plus"])(this.sellData[1][i], unitQTY, this.sellData[3][i]).toFixed(2));
}
}
// 迭代加了Total列,需要统计qty的运费后才能合计运费
if (this.sellData[2].summary !== '-' && this.sellData[2].summary !== 'POA') {
if (this.freight_switch) {
const num = Math.ceil(frightSummary / this.comAttributeList.summary * 100) / 100;
this.sellData[2].summary = Object(external_number_precision_["plus"])(this.sellData[2].summary, num).toFixed(2);
this.sellData[3].summary = 0.00;
const a = Object(external_number_precision_["times"])(this.sellData[2].summary, this.comAttributeList.summary);
this.sellData[4].summary = Object(external_number_precision_["plus"])(this.sellData[1].summary, a).toFixed(2);
} else {
this.sellData[3].summary = frightSummary;
this.sellData[4].summary = Object(external_number_precision_["plus"])(frightSummary, this.sellData[4].summary).toFixed(2);
}
}
},
// 低于最小起订量 把该栏的数值重置到最小起订量
getChildIdx(idx) {
var _this$comCurBaseColum;
this.xxContentVisible = true;
this.$set(this.comCurBaseTotalColumns[idx - 1], 'label', (_this$comCurBaseColum = this.comCurBaseColumns[0]) === null || _this$comCurBaseColum === void 0 ? void 0 : _this$comCurBaseColum.label);
},
setMaxNum(val) {
if (val > 7) {
this.comCurBasePrice.locationNum = 7;
} else if (val < 1) {
this.comCurBasePrice.locationNum = 1;
}
},
...Object(external_vuex_["mapMutations"])({
openDialog: 'openDialog',
setLoading: 'product/setLoading'
})
}
});
// CONCATENATED MODULE: ./components/product/Quote.vue?vue&type=script&lang=js
/* harmony default export */ var product_Quotevue_type_script_lang_js = (Quotevue_type_script_lang_js);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(2);
// CONCATENATED MODULE: ./components/product/Quote.vue
function injectStyles (context) {
var style0 = __webpack_require__(216)
if (style0.__inject__) style0.__inject__(context)
}
/* normalize component */
var component = Object(componentNormalizer["a" /* default */])(
product_Quotevue_type_script_lang_js,
render,
staticRenderFns,
false,
injectStyles,
"21f896fd",
"3f1d0f1e"
)
/* harmony default export */ var Quote = __webpack_exports__["default"] = (component.exports);
/* nuxt-component-imports */
installComponents(component, {TabNav: __webpack_require__(183).default,PriceToImg: __webpack_require__(202).default})
/***/ }),
/***/ 224:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/table/StockTable.vue?vue&type=template&id=13093327&scoped=true
var render = function render() {
var _vm = this,
_c = _vm._self._c;
return _c('table', [_vm._ssrNode("Model | Available stock | Next shipment |
Date | QTY |
" + (_vm.comData.length ? _vm._ssrList(_vm.comData, function (items, key) {
return "" + _vm._ssrEscape(_vm._s(items.sku_model || items.point)) + " | " + _vm._ssrEscape(_vm._s(items.available_stock)) + " | " + _vm._ssrEscape(_vm._s(_vm.$utils.formatTime(items.next_times, 'DD-MM-YYYY', true))) + " | " + _vm._ssrEscape(_vm._s(items.arrival_stock)) + " |
";
}) : "No Data |
") + "")]);
};
var staticRenderFns = [];
// CONCATENATED MODULE: ./components/table/StockTable.vue?vue&type=template&id=13093327&scoped=true
// CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/table/StockTable.vue?vue&type=script&lang=js
/* harmony default export */ var StockTablevue_type_script_lang_js = ({
props: {
data: []
},
computed: {
comData() {
return this.data.filter(item => item.is_show);
}
}
});
// CONCATENATED MODULE: ./components/table/StockTable.vue?vue&type=script&lang=js
/* harmony default export */ var table_StockTablevue_type_script_lang_js = (StockTablevue_type_script_lang_js);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(2);
// CONCATENATED MODULE: ./components/table/StockTable.vue
function injectStyles (context) {
var style0 = __webpack_require__(217)
if (style0.__inject__) style0.__inject__(context)
}
/* normalize component */
var component = Object(componentNormalizer["a" /* default */])(
table_StockTablevue_type_script_lang_js,
render,
staticRenderFns,
false,
injectStyles,
"13093327",
"0b092fe7"
)
/* harmony default export */ var StockTable = __webpack_exports__["default"] = (component.exports);
/***/ }),
/***/ 225:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/table/ChangeTable.vue?vue&type=template&id=4c957f55&scoped=true
var render = function render() {
var _vm = this,
_c = _vm._self._c;
return _c('div', [_vm.data.length ? _vm._ssrNode("", [_vm._ssrNode("Date | Change Type | Details |
" + _vm._ssrList(_vm.data, function (items, key) {
return "" + _vm._ssrEscape(_vm._s(_vm.$utils.formatTime(items.update_time))) + " | " + _vm._ssrEscape(_vm._s(items.type_name)) + " | " + _vm._ssrEscape(_vm._s(items.detail)) + " |
";
}) + "")], 2) : _vm._ssrNode("", "
", [_c('el-empty', {
attrs: {
"description": "No Data"
}
})], 1)]);
};
var staticRenderFns = [];
// CONCATENATED MODULE: ./components/table/ChangeTable.vue?vue&type=template&id=4c957f55&scoped=true
// CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/table/ChangeTable.vue?vue&type=script&lang=js
/* harmony default export */ var ChangeTablevue_type_script_lang_js = ({
props: {
data: {
type: Array,
default: () => []
}
}
});
// CONCATENATED MODULE: ./components/table/ChangeTable.vue?vue&type=script&lang=js
/* harmony default export */ var table_ChangeTablevue_type_script_lang_js = (ChangeTablevue_type_script_lang_js);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(2);
// CONCATENATED MODULE: ./components/table/ChangeTable.vue
function injectStyles (context) {
var style0 = __webpack_require__(218)
if (style0.__inject__) style0.__inject__(context)
}
/* normalize component */
var component = Object(componentNormalizer["a" /* default */])(
table_ChangeTablevue_type_script_lang_js,
render,
staticRenderFns,
false,
injectStyles,
"4c957f55",
"5f45517f"
)
/* harmony default export */ var ChangeTable = __webpack_exports__["default"] = (component.exports);
/***/ }),
/***/ 236:
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "img/lineart.e4e693b.png";
/***/ }),
/***/ 237:
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "img/email.0ff3d63.png";
/***/ }),
/***/ 238:
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "img/product.718b8f1.png";
/***/ }),
/***/ 239:
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "img/cataloque.c0a544f.png";
/***/ }),
/***/ 240:
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "img/instruction.bbe58af.png";
/***/ }),
/***/ 241:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductRight_vue_vue_type_style_index_0_id_3bc79372_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(219);
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductRight_vue_vue_type_style_index_0_id_3bc79372_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductRight_vue_vue_type_style_index_0_id_3bc79372_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductRight_vue_vue_type_style_index_0_id_3bc79372_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductRight_vue_vue_type_style_index_0_id_3bc79372_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/***/ }),
/***/ 293:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/product/ProductRight.vue?vue&type=template&id=3bc79372&scoped=true
var render = function render() {
var _vm$pageData$main$ima, _vm$pageData$main, _vm$pageData$main2, _vm$productImgArr, _vm$pageData$goodsCom;
var _vm = this,
_c = _vm._self._c;
return _c('div', {
staticClass: "product-right"
}, [_vm._ssrNode("", "
", [_vm._ssrNode("" + _vm._ssrEscape(_vm._s(_vm.pageData.product_name)) + " " + _vm._ssrEscape(_vm._s(_vm.pageData.product_code)) + " " + _vm._ssrList(_vm.pageData.cycle, function (item) {
return "
![]()
";
}) + " " + _vm._ssrList(_vm.pageData.icon, function (item) {
return "
![]()
";
}) + "
"), (_vm$pageData$main$ima = _vm.pageData.main.image_color) !== null && _vm$pageData$main$ima !== void 0 && _vm$pageData$main$ima.length ? _vm._ssrNode("", _vm._l(_vm.pageData.main.image_color, function (item, i) {
var _item$color, _item$color2, _item$color3, _item$color4, _item$color5, _item$color6;
return _vm._ssrNode("", "", [(_item$color = item.color) !== null && _item$color !== void 0 && _item$color.img ? _vm._ssrNode("", "
", [_vm._ssrNode("", "
", [_c('el-tooltip', {
attrs: {
"content": (_item$color2 = item.color) === null || _item$color2 === void 0 ? void 0 : _item$color2.name,
"placement": "top",
"effect": "dark"
}
}, [_c('img', {
attrs: {
"src": (_item$color3 = item.color) !== null && _item$color3 !== void 0 && _item$color3.img && !_vm.$mediaRegExp.test((_item$color4 = item.color) === null || _item$color4 === void 0 ? void 0 : _item$color4.img) ? _vm.$OSS_PREFIX + ((_item$color5 = item.color) === null || _item$color5 === void 0 ? void 0 : _item$color5.img) : (_item$color6 = item.color) === null || _item$color6 === void 0 ? void 0 : _item$color6.img
}
})])], 1)]) : _vm._e()]);
}), 0) : _vm._e(), _vm._ssrNode(" "), _c('tab-nav', {
attrs: {
"tabList": _vm.tabList,
"currTab": _vm.typeTab,
"marginTop": 15,
"fontSize": 16,
"liWidth": 130,
"liHeight": 40,
"marginRight": 5,
"marginBottom": 25
},
on: {
"update:currTab": function ($event) {
_vm.typeTab = $event;
},
"update:curr-tab": function ($event) {
_vm.typeTab = $event;
},
"handle": _vm.clickNav
}
})], 2), _vm._ssrNode(" "), _vm._ssrNode("", "
", [_vm._ssrNode("", "
", [_vm._ssrNode((_vm.pageData.feature_data ? "Features
" + _vm._ssrList(_vm.pageData.feature_data, function (i, key) {
return "- " + _vm._ssrEscape(_vm._s(i)) + "
";
}) + "
" : "") + " " + (_vm.comInfo.description ? "Description
" + _vm._s(_vm.comInfo.description) + "
" : "") + " " + (_vm.pageData.pbo ? "Product Branding Information
" + _vm._s(_vm.pageData.pbo) + "
" : "") + " "), _vm._ssrNode("", "
", [_vm.comInfo.product_size || _vm.comInfo.product_material || _vm.comInfo.moq || _vm.comInfo.included_packaging || _vm.comInfo.optional_packaging || _vm.comInfo.print_size_area || _vm.comInfo.product_dimensions || _vm.comInfo.additional_info ? _vm._ssrNode("", [_vm._ssrNode("Product Info
" + (_vm.comInfo.product_size ? "Product Size
" + _vm._s(_vm.comInfo.product_size) + "
" : "") + " " + ((_vm$pageData$main = _vm.pageData.main) !== null && _vm$pageData$main !== void 0 && _vm$pageData$main.colors_text ? "Colour
" + _vm._s((_vm$pageData$main2 = _vm.pageData.main) === null || _vm$pageData$main2 === void 0 ? void 0 : _vm$pageData$main2.colors_text) + "
" : "") + " " + (_vm.comInfo.product_material ? "Material
" + _vm._s(_vm.comInfo.product_material) + "
" : "") + " " + (_vm.pageData.moq ? "MOQ
" + _vm._s(_vm.pageData.moq) + "
" : "") + " "), _vm.comInfo.included_packaging ? _vm._ssrNode("", "", [_vm._ssrNode("Included Packaging
"), _vm._l(_vm.comIncluded_packaging, function (item, i) {
return _vm._ssrNode("", "
", [_vm.isProduct(item.trim()) ? _c('nuxt-link', {
attrs: {
"to": {
name: 'product-code',
params: {
code: item.trim()
}
}
}
}, [_c('span', [_vm._v(_vm._s(item)), i < _vm.comIncluded_packaging.length - 1 ? _c('em', [_vm._v(",")]) : _vm._e()])]) : _c('span', [_vm._v(_vm._s(item)), i < _vm.comIncluded_packaging.length - 1 ? _c('em', [_vm._v(",")]) : _vm._e()])], 1);
})], 2) : _vm._e(), _vm._ssrNode(" "), _vm.comInfo.optional_packaging ? _vm._ssrNode("", "", [_vm._ssrNode("Optional Packaging
"), _vm._l(_vm.comOptional_packaging, function (item, i) {
return _vm._ssrNode("", "
", [_vm.isProduct(item.trim()) ? _c('nuxt-link', {
attrs: {
"to": {
name: 'product-code',
params: {
code: item.trim()
}
}
}
}, [_c('span', [_vm._v(_vm._s(item)), i < _vm.comOptional_packaging.length - 1 ? _c('em', [_vm._v(",")]) : _vm._e()])]) : _c('span', [_vm._v(_vm._s(item)), i < _vm.comOptional_packaging.length - 1 ? _c('em', [_vm._v(",")]) : _vm._e()])], 1);
})], 2) : _vm._e(), _vm._ssrNode(" "), _vm.comInfo.optional_attachments ? _vm._ssrNode("", "", [_vm._ssrNode("Optional Attachments
"), _vm._ssrNode("", "
", _vm._l(_vm.comOptional_attachments, function (item, i) {
return _c('nuxt-link', {
key: item,
attrs: {
"to": {
name: 'product-code',
params: {
code: item
}
}
}
}, [_c('span', [_vm._v(_vm._s(item)), i < _vm.comOptional_attachments.length - 1 ? _c('em', [_vm._v(",")]) : _vm._e()])]);
}), 1)], 2) : _vm._e(), _vm._ssrNode(" " + (_vm.comInfo.product_dimensions ? "Product dimensions
" + _vm._s(_vm.comInfo.product_dimensions) + "
" : "") + " " + (_vm.comInfo.additional_info ? "Additional Info
" + _vm._s(_vm.comInfo.additional_info) + "
" : ""))], 2) : _vm._e(), _vm._ssrNode(" " + (_vm.comInfo.print_position || _vm.comInfo.print_size_area || _vm.comInfo.print_marketing ? "Print Info
" + (_vm.comInfo.print_position ? "Print Position
" + _vm._s(_vm.comInfo.print_position) + "
" : "") + " " + (_vm.comInfo.print_size_area ? "Print Size Area
" + _vm._s(_vm.comInfo.print_size_area) + "
" : "") + " " + (_vm.comInfo.print_marketing ? "Print Marketing
" + _vm._s(_vm.comInfo.print_marketing) + "
" : "") + "
" : "") + " " + (_vm.comInfo.data_services || _vm.comInfo.chip_grade || _vm.comInfo.certifications || _vm.comInfo.capacity || _vm.comInfo.warranty || _vm.comInfo.battery_type || _vm.comInfo.additional_description ? "Functional Info
" + (_vm.comInfo.data_services ? "Data Services
" + _vm._s(_vm.comInfo.data_services) + "
" : "") + " " + (_vm.comInfo.chip_grade ? "Chip Grade
" + _vm._s(_vm.comInfo.chip_grade) + "
" : "") + " " + (_vm.comInfo.certifications ? "Certifications
" + _vm._s(_vm.comInfo.certifications) + "
" : "") + " " + (_vm.comInfo.capacity ? "Capacity
" + _vm._s(_vm.comInfo.capacity) + "
" : "") + " " + (_vm.comInfo.warranty ? "Warranty
" + _vm._s(_vm.comInfo.warranty) + "
" : "") + " " + (_vm.comInfo.battery_type ? "Battery Type
" + _vm._s(_vm.comInfo.battery_type) + "
" : "") + " " + (_vm.comInfo.additional_description ? "Additional Info
" + _vm._s(_vm.comInfo.additional_description) + "
" : "") + "
" : ""))], 2), _vm._ssrNode(" \n Due to differences between production batches, product sizes may vary\n slightly. The above Colours and measurements are approximate, and for\n guidance only.\n
")], 2), _vm._ssrNode(" "), _vm._ssrNode("", "
", [_c('quote', {
ref: "quote",
attrs: {
"pageData": _vm.pageData,
"id": _vm.id
}
})], 1), _vm._ssrNode(" "), _vm._ssrNode("", "
", [_vm.stockData.length > 0 ? _vm._ssrNode("", "
", [_c('stock-table', {
attrs: {
"data": _vm.stockData
}
}), _vm._ssrNode(" For quantities over available stock levels, please contact us for pricing and timing
")], 2) : _vm._ssrNode("\n This product is made offshore, and is available for any quantity equal to, or above the listed MOQ\n
")]), _vm._ssrNode(" Maketing Resource
" + (_vm.comInfo.line_artwork ? "
Lineart Download\n
" : "") + " " + (_vm.pageData.edm_url ? "
Email Digital Marketing\n
" : "") + " " + ((_vm$productImgArr = _vm.productImgArr) !== null && _vm$productImgArr !== void 0 && _vm$productImgArr.length ? "
Product Image\n
" : "") + " " + (_vm.pageData.cataloque_url ? "
Catalogue\n
" : "") + " " + (_vm.comInfo.product_instruction ? "
Product Instruction\n
" : "") + "
" + ((_vm$pageData$goodsCom = _vm.pageData.goodsCompliance) !== null && _vm$pageData$goodsCom !== void 0 && _vm$pageData$goodsCom.length ? "
Compliance Resource
" : "") + "
" + _vm._ssrList(_vm.pageData.goodsCompliance, function (item, i) {
var _item$filter;
return "
![]()
";
}) + "
")], 2), _vm._ssrNode(" "), _c('no-ssr', [_vm.showViewer ? _c('ElImageViewer', {
attrs: {
"on-close": _vm.closeViewer,
"url-list": _vm.productImgArr
}
}) : _vm._e()], 1)], 2);
};
var staticRenderFns = [];
// CONCATENATED MODULE: ./components/product/ProductRight.vue?vue&type=template&id=3bc79372&scoped=true
// EXTERNAL MODULE: ./components/product/Quote.vue + 4 modules
var Quote = __webpack_require__(223);
// EXTERNAL MODULE: ./components/table/StockTable.vue + 4 modules
var StockTable = __webpack_require__(224);
// EXTERNAL MODULE: ./components/table/ChangeTable.vue + 4 modules
var ChangeTable = __webpack_require__(225);
// EXTERNAL MODULE: ./node_modules/element-ui/packages/image/src/image-viewer.vue + 7 modules
var image_viewer = __webpack_require__(157);
// EXTERNAL MODULE: external "vuex"
var external_vuex_ = __webpack_require__(6);
// CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/product/ProductRight.vue?vue&type=script&lang=js
/*eslint-disable*/
/* harmony default export */ var ProductRightvue_type_script_lang_js = ({
components: {
StockTable: StockTable["default"],
ChangeTable: ChangeTable["default"],
Quote: Quote["default"],
ElImageViewer: image_viewer["a" /* default */]
},
props: {
pageData: {},
id: Number
},
// head(){
// return {
// meta: [{ 'http-equiv': "Content-Security-Policy", content: "upgrade-insecure-requests" }]
// }
// },
data() {
return {
tabList: [{
name: 'Details',
isClick: false,
isShow: true
}, {
name: 'Quick Quote',
isClick: false,
isShow: false
}, {
name: 'Stock',
isClick: false,
isShow: false
}, {
name: 'Resources',
isClick: false,
isShow: true
}, {
name: 'Changes',
isClick: false,
isShow: false
}],
typeTab: 0,
stockData: [],
showViewer: false,
projectdDialogVisible: false,
projectObj: {
decoration_id: ''
},
// ticketFormVisible:false,
ticketForm: {
英文品名: this.pageData.product_name,
SKU: this.pageData.product_code,
问题类型: [],
反馈详情: ''
},
ticketConfig: [{
prop: '英文品名',
type: 'text'
}, {
prop: 'SKU',
type: 'text'
}, {
prop: '问题类型',
type: 'checkbox',
selectlist: ['网页信息', '供应商质量', '样品管理', '产品部管理']
}, {
prop: '反馈详情',
type: 'textarea'
}],
rules: {
'问题类型': [{
required: true,
message: 'Please select',
trigger: 'change'
}],
'反馈详情': [{
required: true,
message: 'Please enter',
trigger: 'blur'
}]
}
};
},
computed: {
currentPre() {
return this.$store.state.product.smImgUlIdx;
},
isLogin() {
var _this$$store$state$us;
return !!((_this$$store$state$us = this.$store.state.userInfo) !== null && _this$$store$state$us !== void 0 && _this$$store$state$us.email);
},
comInfo() {
var _this$pageData;
return (_this$pageData = this.pageData) === null || _this$pageData === void 0 ? void 0 : _this$pageData.main;
},
productImgArr() {
return this.comInfo.mergeImages;
},
userInfo() {
return this.$store.state.userInfo;
},
comIncluded_packaging() {
return this.comInfo.included_packaging.split(',');
},
comOptional_packaging() {
return this.comInfo.optional_packaging.split(',');
},
comOptional_attachments() {
return this.comInfo.optional_attachments.split(',');
}
},
watch: {
//登陆立即显示Quick Quote和Changes选项
isLogin: {
handler(val) {
if (val) {
this.tabList[1].isShow = true;
// this.tabList[4].isShow = true
}
},
immediate: true
}
},
mounted() {},
methods: {
...Object(external_vuex_["mapActions"])(['getUserInfo']),
...Object(external_vuex_["mapMutations"])({
openDialog: 'openDialog',
setSmImgUlIdx: 'product/setSmImgUlIdx',
setLoading: 'product/setLoading'
}),
// 判断字符串是否符合商品code规律
isProduct(str) {
return /^[A-z]{1,4}\d{1,4}[A-z]?$/.test(str);
},
computedIndex(i) {
var _this$pageData$main;
return (_this$pageData$main = this.pageData.main) !== null && _this$pageData$main !== void 0 && _this$pageData$main.image ? 1 + i : i;
},
// 保存一下用户选择的周期、型号、打印服务、addon、packaging, product builder页面要用到
saveUserSelected() {
let result = {
addon: [],
packaging: [],
printService: {}
};
for (let key in this.allSelData) {
if (key === 'addon') {
result.addon = this.allSelData[key].map(item => item.id);
}
if (key === 'packaging') {
result.packaging = this.allSelData[key].map(item => item.id);
}
}
// 周期
if (this.priceList[this.currTab].cycle_id) {
result.cycle = this.priceList[this.currTab].cycle_id;
}
// 型号
if (this.priceList[this.currTab].undecoratedSelectId) {
result.model = this.priceList[this.currTab].undecoratedSelectId;
}
// 打印服务
const printService = this.priceList[this.currTab][2];
console.log(printService, 'printService');
if (Array.isArray(printService) && printService.length) {
printService.forEach(item => {
if (item.decorationSelectId) {
const temp = item.decorationList.filter(i => i.id === item.decorationSelectId);
result.printService[`${item.id}`] = {
id: item.decorationSelectId,
num: temp[0].num
};
}
});
}
localStorage.setItem(`product-user-select-${this.$route.params.code}`, JSON.stringify(result));
},
// getStock() {
// this.$axios.get('/api/quote/stock_new', { params: {id: this.id} }).then(res => {
// this.stockData = res.result
// })
// },
openProjectdDialog() {
if (!isLogin) {
this.openDialog();
return;
}
this.projectdDialogVisible = true;
this.projectObj.cycle_id = this.comCurrPriceList.cycle_id;
this.projectObj.price_unit_id = this.comCurrPriceList.undecoratedSelectId;
//获取Decoration Method
this.projectObj.decoration_methods = this.comDecoration.map(item => {
let temp = {};
temp.decoration_id = item.id;
temp.price_unit_id = item.parentId;
temp.colours_number = item.num;
return temp;
});
this.projectObj.addition_ids = this.allSelData.addon.map(item => {
return item.id;
}).join();
this.projectObj.packaging_addition_ids = this.allSelData.packaging.map(item => {
return item.id;
}).join();
},
download(url) {
var urlStr = url.match('[^/]+(?!.*/)')[0];
const repaceDomainUrl = this.$utils.repaceDomain(url);
if (url.endsWith(".pdf")) {
this.$utils.handleFileDownload(repaceDomainUrl, urlStr, false);
} else {
this.$utils.downloadBlob(url, urlStr);
}
},
onPreview() {
this.showViewer = true;
},
closeViewer() {
this.showViewer = false;
},
clickNav(i) {
if (this.typeTab == 1 && !this.tabList[1].isClick) {
this.checkNav(1);
} else if (this.typeTab == 2 && !this.tabList[2].isClick) {
this.checkNav(2);
}
},
checkNav(i) {
if (this.isLogin) {
this.getUserInfo();
if (this.userInfo.audit_status == 1) {
if (i == 1) {
this.$refs.quote.getQuote();
// this.$refs.quote.getWeight()
this.tabList[1].isClick = true;
} else if (i == 2) {
// uk 没有这个
// this.getStock()
// this.tabList[2].isClick = true
}
} else {
this.typeTab = 0;
this.$message({
message: 'Your account has not been audited',
type: 'warning'
});
}
} else {
this.openDialog();
this.typeTab = 0;
}
},
openLink(url) {
let a = url.indexOf('http') > -1 ? url : 'http://' + url;
window.open(a, '_blank');
}
// sendTicket() {
// this.$axios.post('/api/ticket/add', { product_code: this.pageData.product_code,ticket_type: this.ticketForm['问题类型'].join(),content: this.ticketForm['反馈详情'] }).then(res => {
// this.setLoading(false)
// this.$notify({
// title: "success",
// message: "提交成功",
// type: "success",
// duration: 3000,
// });
// }).catch(() => {
// this.setLoading(false)
// })
// }
}
});
// CONCATENATED MODULE: ./components/product/ProductRight.vue?vue&type=script&lang=js
/* harmony default export */ var product_ProductRightvue_type_script_lang_js = (ProductRightvue_type_script_lang_js);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(2);
// CONCATENATED MODULE: ./components/product/ProductRight.vue
function injectStyles (context) {
var style0 = __webpack_require__(241)
if (style0.__inject__) style0.__inject__(context)
}
/* normalize component */
var component = Object(componentNormalizer["a" /* default */])(
product_ProductRightvue_type_script_lang_js,
render,
staticRenderFns,
false,
injectStyles,
"3bc79372",
"3d8ffb3b"
)
/* harmony default export */ var ProductRight = __webpack_exports__["default"] = (component.exports);
/* nuxt-component-imports */
installComponents(component, {TabNav: __webpack_require__(183).default})
/***/ })
};;
//# sourceMappingURL=product-right.js.map