exports.ids = [36]; exports.modules = { /***/ 167: /***/ (function(module, exports) { // Exports module.exports = { }; /***/ }), /***/ 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_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__)); /***/ }), /***/ 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/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__(188) 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); /***/ }) };; //# sourceMappingURL=table-new-price-table.js.map