123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571 |
- exports.ids = [26,24,33,35,36,39,40];
- exports.modules = {
- /***/ 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 = {
- };
- /***/ }),
- /***/ 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) ? "<ul" + _vm._ssrClass(null, _vm.borderType) + " data-v-8a32da06>" + _vm._ssrList(_vm.tabList, function (item, i) {
- return !item.hasOwnProperty('isShow') || item.isShow ? "<li" + _vm._ssrClass(null, {
- active: i === _vm.currTab
- }) + _vm._ssrStyle(null, {
- minWidth: _vm.liWidth + 'px',
- height: _vm.liHeight + 'px',
- lineHeight: _vm.liHeight + 'px',
- marginRight: _vm.marginRight + 'px'
- }, null) + " data-v-8a32da06><div data-v-8a32da06>" + _vm._ssrEscape(_vm._s(item.name)) + "</div></li>" : "<!---->";
- }) + _vm._ssrList(_vm.comRemaining, function (item) {
- return "<li class=\"unclickable\"" + _vm._ssrStyle(null, {
- minWidth: _vm.liWidth + 'px',
- lineHeight: _vm.liHeight + 'px',
- marginRight: _vm.marginRight + 'px'
- }, null) + " data-v-8a32da06><div data-v-8a32da06>" + _vm._ssrEscape(_vm._s(item)) + "</div></li>";
- }) + "</ul>" : "<ul data-v-8a32da06>" + _vm._ssrList(Object.keys(_vm.tabList), function (val, i) {
- return "<li" + _vm._ssrClass(null, {
- active: i === _vm.currTab
- }) + _vm._ssrStyle(null, {
- minWidth: _vm.liWidth + 'px',
- marginRight: _vm.marginRight + 'px'
- }, null) + " data-v-8a32da06><div data-v-8a32da06>" + _vm._ssrEscape(_vm._s(val)) + "</div></li>";
- }) + "</ul>")]);
- };
- 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__(191)
- 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);
- /***/ }),
- /***/ 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__));
- /***/ }),
- /***/ 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_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__));
- /***/ }),
- /***/ 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_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__));
- /***/ }),
- /***/ 191:
- /***/ (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__));
- /***/ }),
- /***/ 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' ? "<p class=\"tb-title\" data-v-8da20436>" + _vm._s(_vm.comTitle) + "</p>" : "<!---->") + " "), _vm._ssrNode("<div" + _vm._ssrClass(null, _vm.getTableContainerClass) + " data-v-8da20436>", "</div>", [_c('el-table', {
- 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);
- /***/ }),
- /***/ 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/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("<p" + _vm._ssrClass("tb-title", {
- 'left': _vm.tableType
- }) + " data-v-8afd0988><span data-v-8afd0988>" + _vm._ssrEscape(_vm._s(_vm.title)) + "</span> " + (_vm.title == 'Sell Price' && _vm.comLocationNum !== 1 ? "<span" + _vm._ssrStyle(null, {
- width: _vm.comWidth + 'px'
- }, null) + " data-v-8afd0988>Total</span>" : "<!---->") + "</p> "), _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__(189)
- 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);
- /***/ }),
- /***/ 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/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("<p class=\"tb-title\" data-v-931e8840>Markup %</p> "), _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__(190)
- 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);
- /***/ }),
- /***/ 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/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("<table border=\"1\" bordercolor=\"#000\" style=\"\\n border-collapse: collapse;\\n font-size: 14px;\\n table-layout: fixed;\\n width: 100%;\\n min-width: 800px;\\n \" data-v-13e7bb30>", "</table>", [_vm._ssrNode("<tbody data-v-13e7bb30>", "</tbody>", [_vm._ssrNode(_vm._ssrList(_vm.mailData, function (items, key, i) {
- return "<tr data-v-13e7bb30><td" + _vm._ssrStyle({
- "padding": "18px 0",
- "width": "40%",
- "text-align": "center",
- "color": "#000"
- }, (i == 1 || i == 10) && _vm.objStyle, null) + " data-v-13e7bb30>" + _vm._ssrEscape("\n " + _vm._s(key) + "\n ") + "</td> <td style=\"padding: 18px 10px\" data-v-13e7bb30>" + (typeof items == 'string' ? "<div data-v-13e7bb30>" + (items.indexOf('@') != -1 || items.indexOf('http') != -1 ? "<a" + _vm._ssrAttr("href", items) + " style=\"color: #6495ed; text-decoration: none\" data-v-13e7bb30><span data-v-13e7bb30>" + _vm._ssrEscape(_vm._s(items)) + "</span></a>" : "<span data-v-13e7bb30>" + _vm._ssrEscape(_vm._s(items)) + "</span>") + "</div>" : _vm.$utils.checkType(items) == 'Object' ? "<div style=\"\\n width: 100%;\\n display: flex;\\n justify-content: space-between;\\n \" data-v-13e7bb30>" + _vm._ssrList(items, function (item, i) {
- return "<div style=\"text-align: left; width: 100%\" data-v-13e7bb30>" + (key == 'QTY' ? "<span data-v-13e7bb30>" + _vm._ssrEscape(_vm._s(item)) + "</span>" : "<span data-v-13e7bb30>" + _vm._ssrEscape("$" + _vm._s(item)) + "</span>") + "</div>";
- }) + "</div>" : _vm._ssrList(items, function (item, i) {
- return "<div style=\"line-height: 20px\" data-v-13e7bb30><span data-v-13e7bb30>" + _vm._ssrEscape(_vm._s(item)) + "</span></div>";
- })) + "</td></tr>";
- }) + " "), _vm._ssrNode("<tr data-v-13e7bb30>", "</tr>", [_vm._ssrNode("<td colspan=\"2\" style=\"padding: 20px\" data-v-13e7bb30>", "</td>", [_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);
- /***/ }),
- /***/ 203:
- /***/ (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("<table><tbody><tr><td style=\"margin-right: 14px;\">" + (_vm.isImgSrc ? "<img" + _vm._ssrAttr("src", _vm.comInfo.image) + " width=\"320\" height=\"320\">" : "<img width=\"250\" height=\"250\">") + "</td> <td style=\"vertical-align: top;\"><p style=\"font-weight: bold;font-size: 22px;padding-bottom: 24px;color:#00213B\"><span style=\"margin-right: 5px;\">" + _vm._ssrEscape(_vm._s(_vm.pageData.product_code)) + "</span> <span>" + _vm._ssrEscape(_vm._s(_vm.pageData.product_name)) + "</span></p> <p style=\"line-height: 20px;color:#00213B;font-size: 14px;\">" + _vm._s(_vm.comInfo.description) + "</p></td></tr></tbody></table> <div><p style=\"font-weight: bold;font-size: 17px;margin: 12px 0 8px;color:#00213B\">Specifications</p> <table style=\"width:100%;border-collapse: collapse;font-size: 14px;table-layout: fixed;text-align:center;\"><tbody><tr style=\"background-color: #F7F8FC;font-weight: bold;\">" + _vm._ssrList(_vm.headerColumns, function (item, key) {
- return "<td style=\"padding:10px 0;color:#00213B;width: 25%;font-size: 14px;border:1px solid #EFEFEF\">" + _vm._ssrEscape(_vm._s(item.label)) + "</td>";
- }) + "</tr> <tr>" + _vm._ssrList(_vm.headerColumns, function (item, key) {
- return "<td style=\"padding:10px 0 6px;color:#00213B;border:1px solid #EFEFEF\">" + (_vm.specificationsObj[item.prop] ? "<div>" + (item.prop != 'addonArr' ? "<span>" + _vm._ssrEscape(_vm._s(_vm.specificationsObj[item.prop])) + "</span>" : _vm._ssrList(_vm.specificationsObj.addonArr, function (opt, idx) {
- return "<div style=\"padding-bottom:4px;\">" + _vm._ssrEscape(_vm._s(opt)) + "</div>";
- })) + "</div>" : "<span>-</span>") + "</td>";
- }) + "</tr></tbody></table></div> <div><p style=\"font-weight: bold;font-size: 17px;margin: 12px 0 8px;color:#00213B\">Quote</p> <table style=\"width:100%;border-collapse: collapse;font-size: 14px;table-layout: fixed;text-align:center;\"><tbody>" + (_vm.comLocationNum !== 1 ? "<tr style=\"background-color: #F7F8FC;font-weight: bold;\"><td" + _vm._ssrAttr("colspan", _vm.tableColumns.length - 1) + " style=\"padding:10px 0;color:#00213B;border:1px solid #EFEFEF\">Quote</td> <td" + _vm._ssrStyle({
- "padding": "10px 0",
- "color": "#00213B",
- "border": "1px solid #EFEFEF"
- }, {
- width: _vm.comWidth
- }, null) + ">Total</td></tr>" : "<!---->") + " <tr style=\"background-color: #F7F8FC;font-weight: bold;\">" + _vm._ssrList(_vm.tableColumns, function (item, key) {
- return "<td" + _vm._ssrStyle({
- "padding": "10px 0",
- "color": "#00213B",
- "border": "1px solid #EFEFEF"
- }, {
- width: _vm.comWidth
- }, null) + ">" + _vm._ssrEscape(_vm._s(item.label)) + "</td>";
- }) + "</tr> " + _vm._ssrList(_vm.tableData, function (row) {
- return "<tr style=\"padding:10px 0;\">" + _vm._ssrList(_vm.tableColumns, function (column) {
- return "<td" + _vm._ssrStyle({
- "padding": "10px 0",
- "color": "#00213B",
- "border": "1px solid #EFEFEF",
- "white-space": "nowrap"
- }, _vm.getColumnHeaderStyle(column), null) + ">" + _vm._ssrEscape("\n " + _vm._s(row[column.prop].includes('.') ? '£' : '') + " " + _vm._s(row[column.prop] ? row[column.prop] : '0.00') + "\n ") + "</td>";
- }) + "</tr>";
- }) + "</tbody></table></div> " + (_vm.emailForm.Comments ? "<div style=\"color:#00213B\"><p style=\"margin: 20px 0;\">" + _vm._ssrEscape(_vm._s(_vm.emailForm.Comments)) + "</p></div>" : "<!---->"))]);
- };
- 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__));
- /***/ }),
- /***/ 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("<div data-v-21f896fd>", "</div>", [_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("<div" + _vm._ssrStyle(null, null, {
- display: _vm.curWeek == indexs ? '' : 'none'
- }) + " data-v-21f896fd>", "</div>", [_vm._ssrNode("<div data-v-21f896fd>", "</div>", [_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("<div" + _vm._ssrStyle(null, null, {
- display: items.curPrint == index ? '' : 'none'
- }) + " data-v-21f896fd>", "</div>", [_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("<div" + _vm._ssrStyle(null, null, {
- display: items.curPrint == index && item.decoration_addition.length ? '' : 'none'
- }) + " data-v-21f896fd>", "</div>", [_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("<div class=\"quote-tips\" data-v-21f896fd>\n Current item prices are missing, please contact<a href=\"mailto:Info@promocollection.uk\" data-v-21f896fd>\n info@promocollection.uk</a></div>"), _vm._ssrNode(" "), _c('no-ssr', [_vm.quoteLoadState == 1 ? _c('div', [_c('mail-table', {
- 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__(199);
- // EXTERNAL MODULE: ./components/table/TotalTable.vue + 4 modules
- var TotalTable = __webpack_require__(200);
- // EXTERNAL MODULE: ./components/table/UnitTable.vue + 4 modules
- var UnitTable = __webpack_require__(201);
- // EXTERNAL MODULE: ./components/table/MailTable.vue + 4 modules
- var MailTable = __webpack_require__(202);
- // 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__(203).default})
- /***/ })
- };;
- //# sourceMappingURL=product-quote.js.map
|