123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767 |
- exports.ids = [60,15,18];
- exports.modules = {
- /***/ 156:
- /***/ (function(module, exports) {
- // Exports
- module.exports = {
- };
- /***/ }),
- /***/ 174:
- /***/ (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_Pagination_vue_vue_type_style_index_0_id_044ef958_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(156);
- /* 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_Pagination_vue_vue_type_style_index_0_id_044ef958_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_Pagination_vue_vue_type_style_index_0_id_044ef958_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_Pagination_vue_vue_type_style_index_0_id_044ef958_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_Pagination_vue_vue_type_style_index_0_id_044ef958_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /***/ }),
- /***/ 175:
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* unused harmony export formatPrice */
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return round; });
- /* unused harmony export transformNumber */
- /* unused harmony export getUnit */
- /* unused harmony export getSetup */
- /* unused harmony export getPrint */
- /* unused harmony export getAddon */
- /* unused harmony export getPackaging */
- /* unused harmony export getFright */
- /* harmony import */ var number_precision__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(122);
- /* harmony import */ var number_precision__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(number_precision__WEBPACK_IMPORTED_MODULE_0__);
- // 商品价格计算相关
- // 价格格式化
- function formatPrice(value, needSymbol = true) {
- // 不能在最后一步显示之前格式化999 111, 否则可能出现单价1买999个得到999价格被格式化成poa的情况
- if (value === 0) {
- return needSymbol ? '£0.00' : '0.00';
- } else {
- return needSymbol ? `£${value}` : `${value}`;
- }
- }
- // 简单的乘法换算
- function multiply(value, ratio = 100) {
- return parseFloat((value * ratio).toPrecision(12));
- }
- // 小数处理, 四舍五入, 为toFixed做准备
- function round(number, ratio = 100) {
- return Math.round(multiply(number, ratio)) / ratio;
- }
- /**
- * 将字符串简单转换成数字, 并可数倍转换. 注意, 这个适用于整数倍(商品件数), 非整数的不能用这个处理小数.
- * @param {*} value 目标值
- * @param {*} ratio 倍数, 默认1
- * @returns number | origin, 转换后的数字, 无法转成数字的返回原值
- */
- function transformNumber(value, ratio = 1) {
- const v = Number(value);
- if (Number.isNaN(v)) {
- return value;
- } else {
- // 保留两位小数
- return Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["divide"])(Math.trunc(Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["times"])(Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["times"])(v, ratio), 100)), 100);
- }
- }
- // unit 单个商品的, 没有乘数量. 因为含有111 999 这些极端值, 没有格式化输出之前直接乘回出问题的.
- const getUnit = function (buyNum, index, attributeList, basePriceList) {
- // 算出购买数量位于 价格阶梯的 哪个区间
- const candidate = Object.entries(attributeList).filter(item => buyNum >= item[1]);
- let key = 'website_qty1';
- if (candidate.length) {
- key = candidate.pop()[0];
- }
- return transformNumber(basePriceList[index][key], buyNum);
- };
- // 打印和附加价格 的steup之和. 商品基础价格现在没有setup了.
- const getSetup = function (buyNum, form, additionList) {
- const sum = Object.entries(form).reduce((total, current) => {
- let s = 0;
- // 打印服务表单的数据跟附加服务表单的数据结构不一致, 以数字id字符串键名的是打印服务的数据
- if (/\d+/.test(current[0]) && current[1].enable) {
- const temp = current[1].colorForm.filter(i => i.id === current[1].printService);
- let colorNumber = 1;
- if (temp.length) {
- colorNumber = temp[0].colorNumber;
- }
- const decoration = current[1].decorationList.filter(i => i.id === current[1].printService);
- let setup = 0;
- if (decoration.length) {
- setup = Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["plus"])(Number(decoration[0].website_setup), Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["times"])(Number(decoration[0].supplier_setup), colorNumber - 1));
- }
- s = Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["plus"])(s, setup);
- } else if (current[1].length) {
- // 附加服务的表单数据, 有值说明该项有选中了附加服务
- const addition = additionList[current[0]].filter(addition => current[1].includes(addition.id));
- if (addition.length) {
- const temp = addition.reduce((t, c) => {
- let value = Number(c.website_setup);
- if ([5, 6].includes(c.website_setup_id)) {
- // 5是poa, 6是waived. 这种情况一般setup是留空的, 不留空大概是异常数据, 重置0保险一点.
- value = 0;
- }
- return Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["plus"])(t, Number.isNaN(value) ? 0 : value);
- }, 0);
- s = Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["plus"])(s, temp);
- }
- }
- total = Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["plus"])(total, s);
- return total;
- }, 0);
- return transformNumber(sum);
- };
- // 打印价格的 阶梯基础价*购买数量.
- const getPrint = function (buyNum, form, attributeList) {
- // 算出购买数量位于 价格阶梯的 哪个区间
- const candidate = Object.entries(attributeList).filter(item => buyNum >= item[1]);
- const key = `website_qty${candidate.length}`;
- const key2 = `supplier_qty${candidate.length}`;
- // 如果其中一项为POA, 则‘和’都是POA
- const result = Object.entries(form).reduce((total, current) => {
- if (total === 'POA') {
- return total;
- }
- let sum = 0;
- if (/\d+/.test(current[0]) && current[1].enable) {
- const temp = current[1].colorForm.filter(i => i.id === current[1].printService);
- let colorNumber = 1;
- if (temp.length) {
- colorNumber = temp[0].colorNumber;
- }
- const decoration = current[1].decorationList.filter(i => i.id === current[1].printService);
- // 打印价格的基础价. 其中数字111(代表'-') 和999(代表'POA')
- const p1 = transformNumber(decoration[0][key]);
- if (p1 === 999 || p1 === 111 || typeof p1 !== 'number') {
- return 'POA';
- }
- // 打印价格的附加价
- const p2 = transformNumber(decoration[0][key2]);
- if (p2 === 999 || p2 === 111 || typeof p2 !== 'number') {
- return 'POA';
- }
- let price = 0;
- if (decoration.length) {
- price = Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["plus"])(p1, Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["times"])(p2, colorNumber - 1));
- }
- sum = Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["plus"])(sum, price);
- }
- total = Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["plus"])(total, sum);
- return total;
- }, 0);
- return transformNumber(result, buyNum);
- };
- // 附加服务除了packing之外的总价
- const getAddon = function (buyNum, form, attributeList, additionList) {
- // 算出购买数量位于 价格阶梯的 哪个区间
- const candidate = Object.entries(attributeList).filter(item => buyNum >= item[1]);
- const key = `website_qty${candidate.length}`;
- const result = Object.entries(form).reduce((total, current) => {
- if (total === 'POA') {
- return total;
- }
- let sum = 0;
- if (!/\d+/.test(current[0]) && current[0] !== 'packaging') {
- sum = additionList[current[0]].filter(item => current[1].includes(item.id)).reduce((t, c) => {
- if (t === 'POA') {
- return t;
- }
- let temp = transformNumber(c[key]);
- if (temp === 999 || temp === 111 || typeof temp !== 'number') {
- temp = 0;
- return 'POA';
- }
- t = Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["plus"])(t, temp);
- return t;
- }, 0);
- }
- return Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["plus"])(total, sum);
- }, 0);
- return transformNumber(result, buyNum);
- };
- // 附加服务中 packing 的价格
- const getPackaging = function (buyNum, form, attributeList, additionList) {
- // 算出购买数量位于 价格阶梯的 哪个区间
- const candidate = Object.entries(attributeList).filter(item => buyNum >= item[1]);
- const key = `website_qty${candidate.length}`;
- const result = Object.entries(form).reduce((total, current) => {
- if (total === 'POA') {
- return total;
- }
- let sum = 0;
- if (!/\d+/.test(current[0]) && current[0] === 'packaging') {
- sum = additionList[current[0]].filter(item => current[1].includes(item.id)).reduce((t, c) => {
- if (t === 'POA') {
- return t;
- }
- let temp = transformNumber(c[key]);
- if (temp === 999 || temp === 111 || typeof temp !== 'number') {
- temp = 0;
- return 'POA';
- }
- t = Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["plus"])(t, temp);
- return t;
- }, 0);
- }
- return Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["plus"])(total, sum);
- }, 0);
- return transformNumber(result, buyNum);
- };
- // 运费计算. 从product页面抄过来的逻辑. +号是隐式类型转换
- const getFright = function (buyNum, config, freight, weight, ratio = 1) {
- // 单独批次数量的总重
- const totalWeight = Math.ceil(Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["times"])(+weight.unit_w_local, buyNum));
- const expressFactor = Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["plus"])(1, Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["divide"])(Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["plus"])(+config.express_freight, +config.fuel), 100));
- const AAEFactor = Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["plus"])(1, Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["divide"])(Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["plus"])(+config.bag_freight, +config.fuel), 100));
- let frightCost = 0;
- if (freight.type === 1) {
- if (totalWeight > 20) {
- const a1 = Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["minus"])(totalWeight, 20);
- const a2 = Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["times"])(a1, +freight.basic);
- const a3 = Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["plus"])(+freight.pickup, a2);
- frightCost = Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["times"])(a3, expressFactor);
- } else {
- frightCost = Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["times"])(+freight.pickup, expressFactor);
- }
- } else if (freight.type === 2) {
- const a1 = Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["times"])(totalWeight, +freight.basic);
- const a2 = Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["plus"])(+freight.pickup, a1);
- frightCost = Object(number_precision__WEBPACK_IMPORTED_MODULE_0__["times"])(a2, AAEFactor);
- } else {
- frightCost = 0;
- }
- return transformNumber(frightCost, ratio);
- };
- /***/ }),
- /***/ 182:
- /***/ (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/Pagination.vue?vue&type=template&id=044ef958&scoped=true
- var render = function render() {
- var _vm = this,
- _c = _vm._self._c;
- return _c('div', {
- staticClass: "pagination-container",
- class: {
- 'hidden': _vm.hidden
- }
- }, [_vm._t("slot"), _vm._ssrNode(" "), _c('el-pagination', _vm._b({
- attrs: {
- "background": _vm.background,
- "current-page": _vm.currentPage,
- "page-size": _vm.pageSize,
- "layout": _vm.layout,
- "total": _vm.total
- },
- on: {
- "update:currentPage": function ($event) {
- _vm.currentPage = $event;
- },
- "update:current-page": function ($event) {
- _vm.currentPage = $event;
- },
- "update:pageSize": function ($event) {
- _vm.pageSize = $event;
- },
- "update:page-size": function ($event) {
- _vm.pageSize = $event;
- },
- "size-change": _vm.handleSizeChange,
- "current-change": _vm.handleCurrentChange
- }
- }, 'el-pagination', _vm.$attrs, false))], 2);
- };
- var staticRenderFns = [];
- // CONCATENATED MODULE: ./components/Pagination.vue?vue&type=template&id=044ef958&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/Pagination.vue?vue&type=script&lang=js
- /* harmony default export */ var Paginationvue_type_script_lang_js = ({
- name: 'Pagination',
- props: {
- total: {
- required: true,
- type: Number
- },
- page: {
- type: Number,
- default: 0
- },
- limit: {
- type: Number,
- default: 10
- },
- // pageSizes: {
- // type: Array,
- // default() {
- // return [10, 20, 50, 100]
- // }
- // },
- layout: {
- type: String,
- default: 'prev, pager, next'
- },
- background: {
- type: Boolean,
- default: true
- },
- autoScroll: {
- type: Boolean,
- default: true
- },
- hidden: {
- type: Boolean,
- default: false
- }
- },
- computed: {
- currentPage: {
- get() {
- return this.page;
- },
- set(val) {
- this.$emit('update:page', val);
- }
- },
- pageSize: {
- get() {
- return this.limit;
- },
- set(val) {
- this.$emit('update:limit', val);
- }
- }
- },
- methods: {
- handleSizeChange(val) {
- this.$emit('pagination', {
- page: this.currentPage,
- limit: val
- });
- if (this.autoScroll) {
- scrollTo(0, 800);
- }
- },
- handleCurrentChange(val) {
- this.$emit('pagination', {
- page: val,
- limit: this.pageSize
- });
- if (this.autoScroll) {
- scrollTo(0, 800);
- }
- }
- }
- });
- // CONCATENATED MODULE: ./components/Pagination.vue?vue&type=script&lang=js
- /* harmony default export */ var components_Paginationvue_type_script_lang_js = (Paginationvue_type_script_lang_js);
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
- var componentNormalizer = __webpack_require__(2);
- // CONCATENATED MODULE: ./components/Pagination.vue
- function injectStyles (context) {
-
- var style0 = __webpack_require__(174)
- if (style0.__inject__) style0.__inject__(context)
- }
- /* normalize component */
- var component = Object(componentNormalizer["a" /* default */])(
- components_Paginationvue_type_script_lang_js,
- render,
- staticRenderFns,
- false,
- injectStyles,
- "044ef958",
- "230c7770"
-
- )
- /* harmony default export */ var Pagination = __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /***/ 206:
- /***/ (function(module, exports) {
- // Exports
- module.exports = {
- };
- /***/ }),
- /***/ 228:
- /***/ (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_ImageUpload_vue_vue_type_style_index_0_id_596f82bc_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(206);
- /* 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_ImageUpload_vue_vue_type_style_index_0_id_596f82bc_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_ImageUpload_vue_vue_type_style_index_0_id_596f82bc_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_ImageUpload_vue_vue_type_style_index_0_id_596f82bc_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_ImageUpload_vue_vue_type_style_index_0_id_596f82bc_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /***/ }),
- /***/ 245:
- /***/ (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/ImageUpload.vue?vue&type=template&id=596f82bc&scoped=true
- var render = function render() {
- var _vm = this,
- _c = _vm._self._c;
- return _c('div', {
- staticClass: "com-image-upload"
- }, [_c('draggable', {
- staticClass: "flex start wrap",
- attrs: {
- "draggable": ".image-item"
- },
- on: {
- "end": _vm.end
- },
- model: {
- value: _vm.imageList,
- callback: function ($$v) {
- _vm.imageList = $$v;
- },
- expression: "imageList"
- }
- }, [_vm._l(_vm.imageList, function (item, index) {
- return _c('div', {
- key: item.uid || index,
- staticClass: "image-item flex",
- style: {
- width: _vm.width,
- height: _vm.height
- }
- }, [_c('img', {
- attrs: {
- "src": item.url,
- "alt": ""
- }
- }), _vm._v(" "), _c('div', {
- staticClass: "action-area flex center"
- }, [!_vm.disablePreview ? _c('span', {
- staticClass: "action-icon",
- on: {
- "click": function ($event) {
- return _vm.handlePictureCardPreview(item);
- }
- }
- }, [_c('i', {
- staticClass: "el-icon-zoom-in"
- })]) : _vm._e(), _vm._v(" "), _c('span', {
- staticClass: "action-icon",
- on: {
- "click": function ($event) {
- return _vm.handleRemove(index);
- }
- }
- }, [_c('i', {
- staticClass: "el-icon-delete"
- })])])]);
- }), _vm._v(" "), _c('el-progress', {
- directives: [{
- name: "show",
- rawName: "v-show",
- value: _vm.loading,
- expression: "loading"
- }],
- staticStyle: {
- "margin": "8px"
- },
- attrs: {
- "type": "circle",
- "percentage": _vm.uploadPercent,
- "width": Number(_vm.width.slice(0, _vm.width.length - 2))
- }
- }), _vm._v(" "), _c('div', {
- staticClass: "upload-wrap",
- class: {
- hide: _vm.loading || _vm.imageList.length >= _vm.max
- },
- style: {
- width: _vm.width,
- height: _vm.height
- }
- }, [_c('el-upload', {
- ref: "pictureUpload",
- staticClass: "custom-upload-item",
- attrs: {
- "multiple": true,
- "limit": _vm.max,
- "action": "",
- "drag": "",
- "accept": ".jpg,.png,.jpeg",
- "list-type": "picture-card",
- "file-list": _vm.imageList,
- "show-file-list": false,
- "auto-upload": false,
- "on-remove": _vm.handleRemove,
- "on-preview": _vm.handlePictureCardPreview,
- "on-change": (file, fileList) => {
- _vm.handleUpload(file, fileList);
- }
- }
- }, [_c('i', {
- staticClass: "el-icon-plus avatar-uploader-icon"
- })])], 1)], 2), _vm._ssrNode(" "), _c('el-dialog', {
- attrs: {
- "visible": _vm.imageDialogVisible
- },
- on: {
- "update:visible": function ($event) {
- _vm.imageDialogVisible = $event;
- }
- }
- }, [_c('img', {
- attrs: {
- "width": "100%",
- "src": _vm.imageUrl,
- "alt": ""
- }
- })])], 2);
- };
- var staticRenderFns = [];
- // CONCATENATED MODULE: ./components/ImageUpload.vue?vue&type=template&id=596f82bc&scoped=true
- // EXTERNAL MODULE: external "vuedraggable"
- var external_vuedraggable_ = __webpack_require__(143);
- var external_vuedraggable_default = /*#__PURE__*/__webpack_require__.n(external_vuedraggable_);
- // 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/ImageUpload.vue?vue&type=script&lang=js
- // import { common } from '@/api'
- /* harmony default export */ var ImageUploadvue_type_script_lang_js = ({
- name: 'ImageUpload',
- components: {
- draggable: external_vuedraggable_default.a
- },
- props: {
- list: {
- type: Array,
- default: () => []
- },
- max: {
- type: Number,
- default: 16
- },
- disablePreview: {
- type: Boolean,
- default: false
- },
- width: {
- type: String,
- default: '150px'
- },
- height: {
- type: String,
- default: '150px'
- }
- },
- data() {
- return {
- // 组件内部数据.
- imageList: [],
- loading: false,
- uploadPercent: 0,
- imageDialogVisible: false,
- // 预览大图的url, 每次点击都会更新
- imageUrl: ''
- };
- },
- computed: {
- fulled() {
- return 0;
- }
- },
- watch: {
- list() {
- this.imageList = JSON.parse(JSON.stringify(this.list));
- }
- },
- mounted() {
- this.updateList();
- },
- methods: {
- handleUpload(file, fileList) {
- this.fileList = [];
- if (file.status === 'ready') {
- this.loading = true;
- const interval = setInterval(() => {
- if (this.uploadPercent >= 99) {
- clearInterval(interval);
- return;
- }
- this.uploadPercent += 1; // 进度条进度
- }, 100);
- }
- const formData = new FormData();
- fileList.forEach(file => {
- formData.append('file', file.raw);
- });
- formData.append('type', 1);
- this.$axios.post(`/uk-api/user_base/imagesUpload`, formData).then(response => {
- if (response.result.code === 200) {
- this.imageList.push({
- url: response.result.data,
- uid: file.uid
- });
- this.updateList();
- return;
- }
- this.$message({
- message: response.result.message,
- type: 'warning'
- });
- }).catch(error => {
- console.log(error, 'component upload image error');
- this.$message.error(error.response.data.msg);
- }).finally(() => {
- this.loading = false;
- // 进度条恢复到初始状态
- this.uploadPercent = 0;
- });
- },
- handleRemove(index) {
- this.imageList.splice(index, 1);
- this.updateList();
- },
- handlePictureCardPreview(file) {
- this.imageUrl = file.url;
- this.imageDialogVisible = true;
- },
- // 每次更新imageList后手动更新父组件的数据, 不能用watch自动更新, 因为同时要watch prop值更新iamgeList, 同时watch会死循环.
- // 直接把prop数据绑定到dragable 和 el-upload的话vue和eslint会报错, 也可能造成调试困难
- updateList() {
- this.$emit('update:list', JSON.parse(JSON.stringify(this.imageList)));
- },
- end() {
- this.updateList();
- }
- }
- });
- // CONCATENATED MODULE: ./components/ImageUpload.vue?vue&type=script&lang=js
- /* harmony default export */ var components_ImageUploadvue_type_script_lang_js = (ImageUploadvue_type_script_lang_js);
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
- var componentNormalizer = __webpack_require__(2);
- // CONCATENATED MODULE: ./components/ImageUpload.vue
- function injectStyles (context) {
-
- var style0 = __webpack_require__(228)
- if (style0.__inject__) style0.__inject__(context)
- }
- /* normalize component */
- var component = Object(componentNormalizer["a" /* default */])(
- components_ImageUploadvue_type_script_lang_js,
- render,
- staticRenderFns,
- false,
- injectStyles,
- "596f82bc",
- "7f6e537e"
-
- )
- /* harmony default export */ var ImageUpload = __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /***/ 260:
- /***/ (function(module, exports) {
- // Exports
- module.exports = {
- };
- /***/ }),
- /***/ 261:
- /***/ (function(module, exports) {
- // Exports
- module.exports = {
- };
- /***/ }),
- /***/ 315:
- /***/ (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_index_vue_vue_type_style_index_0_id_799f5a64_prod_lang_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(260);
- /* 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_index_vue_vue_type_style_index_0_id_799f5a64_prod_lang_scss__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_index_vue_vue_type_style_index_0_id_799f5a64_prod_lang_scss__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_index_vue_vue_type_style_index_0_id_799f5a64_prod_lang_scss__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_index_vue_vue_type_style_index_0_id_799f5a64_prod_lang_scss__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /***/ }),
- /***/ 316:
- /***/ (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_index_vue_vue_type_style_index_1_id_799f5a64_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(261);
- /* 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_index_vue_vue_type_style_index_1_id_799f5a64_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_index_vue_vue_type_style_index_1_id_799f5a64_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_index_vue_vue_type_style_index_1_id_799f5a64_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_index_vue_vue_type_style_index_1_id_799f5a64_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /***/ }),
- /***/ 352:
- /***/ (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!./pages/home/myDetail/index.vue?vue&type=template&id=799f5a64&scoped=true
- var render = function render() {
- var _vm$$store$state$user, _vm$$store$state$user2, _vm$$store$state$user3;
- var _vm = this,
- _c = _vm._self._c;
- return _c('div', {
- staticClass: "com-main com-margin-auto com-fixationwidth-1400"
- }, [_c('el-breadcrumb', {
- attrs: {
- "separator-class": "el-icon-arrow-right"
- }
- }, [_c('el-breadcrumb-item', {
- attrs: {
- "to": {
- path: '/'
- }
- }
- }, [_vm._v("Home")]), _vm._v(" "), _c('el-breadcrumb-item', [_vm._v(_vm._s(_vm.tabName))])], 1), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"content\" data-v-799f5a64>", "</div>", [_c('el-menu', {
- ref: "menu",
- staticClass: "el-menu-vertical",
- attrs: {
- "background-color": "#e8eaee",
- "text-color": "#4a596c",
- "active-text-color": "#fff",
- "default-active": _vm.activeMenu
- },
- on: {
- "select": _vm.handleClick
- }
- }, [_c('el-menu-item', {
- attrs: {
- "index": "profile"
- }
- }, [_c('i', {
- staticClass: "iconfont"
- }, [_vm._v("")]), _vm._v(" "), _c('span', {
- attrs: {
- "slot": "title"
- },
- slot: "title"
- }, [_vm._v("My Profile")])]), _vm._v(" "), _c('el-submenu', {
- attrs: {
- "index": "order"
- }
- }, [_c('template', {
- slot: "title"
- }, [_c('i', {
- staticClass: "iconfont"
- }, [_vm._v("")]), _vm._v(" "), _c('span', {
- attrs: {
- "slot": "title"
- },
- slot: "title"
- }, [_vm._v("My Orders")])]), _vm._v(" "), _c('el-menu-item', {
- attrs: {
- "index": "all-orders"
- }
- }, [_vm._v("All Orders")]), _vm._v(" "), _c('el-menu-item', {
- attrs: {
- "index": "open-orders"
- }
- }, [_vm._v("Open Orders")]), _vm._v(" "), _c('el-menu-item', {
- attrs: {
- "index": "closed-orders"
- }
- }, [_vm._v("Closed Orders")])], 2)], 1), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"content-right\" data-v-799f5a64>", "</div>", [_vm._ssrNode("<div" + _vm._ssrStyle(null, null, {
- display: _vm.activeMenu === 'profile' ? '' : 'none'
- }) + " data-v-799f5a64>", "</div>", [_vm._ssrNode("<div class=\"content-form\" data-v-799f5a64>", "</div>", [_vm._ssrNode("<p class=\"content-title\" data-v-799f5a64>" + _vm._ssrEscape(_vm._s(_vm.tabName)) + "</p> "), _c('el-form', {
- ref: "form",
- attrs: {
- "model": _vm.profileform,
- "rules": _vm.rules,
- "label-width": "220px"
- }
- }, [_c('el-row', [_c('el-col', {
- attrs: {
- "span": 15
- }
- }, [_c('el-form-item', {
- attrs: {
- "label": "Email Address",
- "prop": "email"
- }
- }, [_c('el-input', {
- attrs: {
- "disabled": true
- },
- model: {
- value: _vm.profileform.email,
- callback: function ($$v) {
- _vm.$set(_vm.profileform, "email", $$v);
- },
- expression: "profileform.email"
- }
- })], 1)], 1), _vm._v(" "), _c('el-col', {
- attrs: {
- "span": 9
- }
- }, [_c('el-form-item', {
- staticClass: "upload-item",
- attrs: {
- "label": "Your Logo"
- }
- }, [_c('image-upload', {
- attrs: {
- "list": _vm.profileform.logo,
- "disablePreview": true,
- "max": 1
- },
- on: {
- "update:list": function ($event) {
- return _vm.$set(_vm.profileform, "logo", $event);
- }
- }
- })], 1)], 1)], 1), _vm._v(" "), _c('el-form-item', {
- attrs: {
- "label": "Company Name",
- "prop": "company"
- }
- }, [_c('el-input', {
- model: {
- value: _vm.profileform.company,
- callback: function ($$v) {
- _vm.$set(_vm.profileform, "company", $$v);
- },
- expression: "profileform.company"
- }
- })], 1), _vm._v(" "), _c('el-form-item', {
- attrs: {
- "label": "First Name",
- "prop": "contacts"
- }
- }, [_c('el-input', {
- model: {
- value: _vm.profileform.contacts,
- callback: function ($$v) {
- _vm.$set(_vm.profileform, "contacts", $$v);
- },
- expression: "profileform.contacts"
- }
- })], 1), _vm._v(" "), _c('el-form-item', {
- attrs: {
- "label": "Last Name",
- "prop": "last_name"
- }
- }, [_c('el-input', {
- model: {
- value: _vm.profileform.last_name,
- callback: function ($$v) {
- _vm.$set(_vm.profileform, "last_name", $$v);
- },
- expression: "profileform.last_name"
- }
- })], 1), _vm._v(" "), _c('el-form-item', {
- attrs: {
- "label": "Contact Phone Number",
- "prop": "phone"
- }
- }, [_c('el-input', {
- model: {
- value: _vm.profileform.phone,
- callback: function ($$v) {
- _vm.$set(_vm.profileform, "phone", $$v);
- },
- expression: "profileform.phone"
- }
- })], 1)], 1)], 2), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"content-form\" style=\"margin-top: 20px\" data-v-799f5a64>", "</div>", [_vm._ssrNode("<p class=\"content-title\" data-v-799f5a64>Account And Password</p> "), _c('el-form', {
- ref: "ruleForm",
- staticClass: "accountPasswordForm",
- attrs: {
- "model": _vm.accountPasswordForm,
- "label-width": "220px"
- }
- }, [_c('el-form-item', {
- attrs: {
- "label": "Enter the new password",
- "prop": "password"
- }
- }, [_c('el-input', {
- model: {
- value: _vm.accountPasswordForm.password,
- callback: function ($$v) {
- _vm.$set(_vm.accountPasswordForm, "password", $$v);
- },
- expression: "accountPasswordForm.password"
- }
- })], 1), _vm._v(" "), _c('el-form-item', {
- attrs: {
- "label": "Retype the password",
- "prop": "confirm_password"
- }
- }, [_c('el-input', {
- model: {
- value: _vm.accountPasswordForm.confirm_password,
- callback: function ($$v) {
- _vm.$set(_vm.accountPasswordForm, "confirm_password", $$v);
- },
- expression: "accountPasswordForm.confirm_password"
- }
- })], 1), _vm._v(" "), _c('el-form-item', [_c('el-button', {
- staticClass: "saveBtn",
- on: {
- "click": function ($event) {
- return _vm.onSave('form');
- }
- }
- }, [_vm._v("\n Save\n ")])], 1)], 1)], 2)], 2), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"content-form\"" + _vm._ssrStyle(null, null, {
- display: _vm.activeMenu === 'enquiry' ? '' : 'none'
- }) + " data-v-799f5a64>", "</div>", [_vm._ssrNode("<p class=\"content-title\" data-v-799f5a64>" + _vm._ssrEscape(_vm._s(_vm.tabName)) + "</p> "), _vm._ssrNode("<div class=\"searchInput\" data-v-799f5a64>", "</div>", [_c('el-input', {
- attrs: {
- "placeholder": "Search your job name",
- "clearable": ""
- },
- on: {
- "clear": _vm.getEnquiryList
- },
- nativeOn: {
- "keyup": function ($event) {
- if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")) return null;
- return _vm.getEnquiryList.apply(null, arguments);
- }
- },
- model: {
- value: _vm.enquiryKeyword,
- callback: function ($$v) {
- _vm.enquiryKeyword = $$v;
- },
- expression: "enquiryKeyword"
- }
- }, [_c('i', {
- staticClass: "el-input__icon el-icon-search",
- attrs: {
- "slot": "suffix"
- },
- on: {
- "click": _vm.getEnquiryList
- },
- slot: "suffix"
- })])], 1), _vm._ssrNode(" "), _c('el-table', {
- directives: [{
- name: "loading",
- rawName: "v-loading",
- value: _vm.tableLoading,
- expression: "tableLoading"
- }],
- staticStyle: {
- "width": "100%"
- },
- attrs: {
- "data": _vm.enquiryList,
- "stripe": "",
- "header-cell-style": {
- background: '#00213b',
- color: '#ffffff'
- }
- },
- on: {
- "row-click": _vm.goEnquiryDetail
- }
- }, [_c('el-table-column', {
- attrs: {
- "prop": "Auto_Number",
- "label": "Enquiry No"
- }
- }), _vm._v(" "), _c('el-table-column', {
- attrs: {
- "prop": "Enquiry_Title",
- "label": "Job Name",
- "width": "300"
- }
- }), _vm._v(" "), _c('el-table-column', {
- attrs: {
- "prop": "Customize_Pipeline_Stage",
- "label": "Status"
- }
- }), _vm._v(" "), _c('el-table-column', {
- attrs: {
- "prop": "Enquiry_Created",
- "label": "Date"
- },
- scopedSlots: _vm._u([{
- key: "default",
- fn: function (scope) {
- return [_c('div', [_vm._v("\n " + _vm._s(_vm.$utils.formatTime(scope.row.Sales_Order_Created, 'DD/MM/YYYY', true)) + "\n ")])];
- }
- }])
- }), _vm._v(" "), _c('el-table-column', {
- attrs: {
- "label": "Action",
- "width": "90",
- "align": "center"
- }
- }, [[_c('el-button', {
- staticStyle: {
- "background-color": "rgb(0, 33, 59)",
- "color": "#fff"
- },
- attrs: {
- "size": "small",
- "plain": ""
- }
- }, [_vm._v("View")])]], 2)], 1), _vm._ssrNode(" "), _c('pagination', {
- directives: [{
- name: "show",
- rawName: "v-show",
- value: _vm.enquiryTotal > 0,
- expression: "enquiryTotal > 0"
- }],
- attrs: {
- "total": _vm.enquiryTotal,
- "page": _vm.enquiryListQuery.page,
- "limit": _vm.enquiryListQuery.limit
- },
- on: {
- "update:page": function ($event) {
- return _vm.$set(_vm.enquiryListQuery, "page", $event);
- },
- "update:limit": function ($event) {
- return _vm.$set(_vm.enquiryListQuery, "limit", $event);
- },
- "pagination": _vm.getEnquiryList
- }
- })], 2), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"content-form\"" + _vm._ssrStyle(null, null, {
- display: _vm.activeMenu.includes('orders') ? '' : 'none'
- }) + " data-v-799f5a64>", "</div>", [_vm._ssrNode("<p class=\"content-title\" data-v-799f5a64>" + _vm._ssrEscape(_vm._s(_vm.tabName)) + "</p> "), _vm._ssrNode("<div class=\"searchInput\" data-v-799f5a64>", "</div>", [_c('el-input', {
- attrs: {
- "placeholder": "Search your job name",
- "clearable": ""
- },
- on: {
- "clear": _vm.getOrdersList
- },
- nativeOn: {
- "keyup": function ($event) {
- if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")) return null;
- return _vm.getOrdersList.apply(null, arguments);
- }
- },
- model: {
- value: _vm.orderKeyword,
- callback: function ($$v) {
- _vm.orderKeyword = $$v;
- },
- expression: "orderKeyword"
- }
- }, [_c('i', {
- staticClass: "el-input__icon el-icon-search",
- attrs: {
- "slot": "suffix"
- },
- on: {
- "click": _vm.getOrdersList
- },
- slot: "suffix"
- })]), _vm._ssrNode(" "), _vm.selShow ? _c('el-select', {
- attrs: {
- "filterable": "",
- "clearable": "",
- "default-first-option": "",
- "placeholder": "Select the status"
- },
- model: {
- value: _vm.selword,
- callback: function ($$v) {
- _vm.selword = $$v;
- },
- expression: "selword"
- }
- }, _vm._l(_vm.orderSelList, function (option) {
- return _c('el-option', {
- key: option,
- attrs: {
- "label": option,
- "value": option
- }
- });
- }), 1) : _vm._e(), _vm._ssrNode(" "), ((_vm$$store$state$user = _vm.$store.state.userInfo) === null || _vm$$store$state$user === void 0 ? void 0 : (_vm$$store$state$user2 = _vm$$store$state$user.memberCrmcomList) === null || _vm$$store$state$user2 === void 0 ? void 0 : _vm$$store$state$user2.length) > 1 ? _c('el-select', {
- attrs: {
- "filterable": "",
- "clearable": "",
- "default-first-option": "",
- "placeholder": "Select the CRM"
- },
- model: {
- value: _vm.accounts_id,
- callback: function ($$v) {
- _vm.accounts_id = $$v;
- },
- expression: "accounts_id"
- }
- }, _vm._l((_vm$$store$state$user3 = _vm.$store.state.userInfo) === null || _vm$$store$state$user3 === void 0 ? void 0 : _vm$$store$state$user3.memberCrmcomList, function (option) {
- return _c('el-option', {
- key: option.id,
- attrs: {
- "label": option.name,
- "value": option.id
- }
- });
- }), 1) : _vm._e(), _vm._ssrNode(" "), _c('el-button', {
- staticStyle: {
- "background-color": "rgb(0, 33, 59)",
- "border-color": "rgb(0, 33, 59)"
- },
- attrs: {
- "type": "primary"
- },
- on: {
- "click": _vm.getOrdersList
- }
- }, [_vm._v("Submit")])], 2), _vm._ssrNode(" "), _c('el-table', {
- directives: [{
- name: "loading",
- rawName: "v-loading",
- value: _vm.tableLoading,
- expression: "tableLoading"
- }],
- staticStyle: {
- "width": "100%"
- },
- attrs: {
- "data": _vm.tableData,
- "stripe": "",
- "header-cell-style": {
- background: '#00213b',
- color: '#ffffff'
- }
- }
- }, [_c('el-table-column', {
- attrs: {
- "prop": "Sales_Order_Title_Job_Name",
- "label": "Job Name"
- }
- }), _vm._v(" "), _c('el-table-column', {
- attrs: {
- "width": "100",
- "prop": "Reference",
- "label": "Order No"
- }
- }), _vm._v(" "), _c('el-table-column', {
- attrs: {
- "width": "120",
- "prop": "Sales_Order_Created",
- "label": "Order Date"
- },
- scopedSlots: _vm._u([{
- key: "default",
- fn: function (scope) {
- return [_c('div', [_vm._v("\n " + _vm._s(_vm.$utils.formatTime(scope.row.Sales_Order_Created, 'DD/MM/YYYY')) + "\n ")])];
- }
- }])
- }), _vm._v(" "), _c('el-table-column', {
- attrs: {
- "width": "140",
- "prop": "Order_Stage_new",
- "label": "Order Status"
- }
- }), _vm._v(" "), _c('el-table-column', {
- attrs: {
- "width": "160",
- "prop": "Tracking_No_arr",
- "label": "Tracking No#"
- },
- scopedSlots: _vm._u([{
- key: "default",
- fn: function (scope) {
- return [_c('ul', {
- staticClass: "location"
- }, _vm._l(scope.row.Tracking_No_arr, function (item) {
- return _c('li', {
- key: item.Tracking_No,
- on: {
- "click": function ($event) {
- return _vm.openTracking_URL(item.Tracking_URL);
- }
- }
- }, [_c('i', {
- staticClass: "el-icon-location"
- }), _vm._v(_vm._s(item.Tracking_No) + "\n ")]);
- }), 0)];
- }
- }])
- }), _vm._v(" "), _c('el-table-column', {
- attrs: {
- "width": "110",
- "prop": "Grand_Total",
- "label": "Amount"
- },
- scopedSlots: _vm._u([{
- key: "default",
- fn: function (scope) {
- return [_vm._v("\n $" + _vm._s(_vm.transformNumber(scope.row.Grand_Total)) + "\n ")];
- }
- }])
- }), _vm._v(" "), _c('el-table-column', {
- attrs: {
- "label": "Action",
- "width": "80",
- "align": "center"
- },
- scopedSlots: _vm._u([{
- key: "default",
- fn: function (scope) {
- return [_c('el-button', {
- staticStyle: {
- "background-color": "rgb(0, 33, 59)",
- "color": "#fff"
- },
- attrs: {
- "size": "small",
- "plain": ""
- },
- on: {
- "click": function ($event) {
- return _vm.goOrderDetail(scope.row);
- }
- }
- }, [_vm._v("View")])];
- }
- }])
- })], 1), _vm._ssrNode(" "), _c('pagination', {
- directives: [{
- name: "show",
- rawName: "v-show",
- value: _vm.orderTotal > 0,
- expression: "orderTotal > 0"
- }],
- attrs: {
- "total": _vm.orderTotal,
- "page": _vm.orderListQuery.page,
- "limit": _vm.orderListQuery.limit
- },
- on: {
- "update:page": function ($event) {
- return _vm.$set(_vm.orderListQuery, "page", $event);
- },
- "update:limit": function ($event) {
- return _vm.$set(_vm.orderListQuery, "limit", $event);
- },
- "pagination": _vm.getOrdersList
- }
- })], 2)], 2)], 2), _vm._ssrNode(" "), _c('dialog-XX-success', {
- attrs: {
- "visible": _vm.xxContentVisible,
- "content": _vm.xxContent
- },
- on: {
- "update:visible": function ($event) {
- _vm.xxContentVisible = $event;
- },
- "notify-parent": _vm.handleNotification
- }
- }), _vm._ssrNode(" "), _c('el-dialog', {
- attrs: {
- "lock-scroll": false,
- "visible": _vm.urlDialogShow,
- "center": "",
- "width": "850px",
- "top": "20vh"
- },
- on: {
- "update:visible": function ($event) {
- _vm.urlDialogShow = $event;
- }
- }
- }, [_c('iframe', {
- staticStyle: {
- "width": "100%",
- "height": "500px"
- },
- attrs: {
- "src": _vm.Tracking_URL,
- "frameborder": "0"
- }
- })])], 2);
- };
- var staticRenderFns = [];
- // CONCATENATED MODULE: ./pages/home/myDetail/index.vue?vue&type=template&id=799f5a64&scoped=true
- // EXTERNAL MODULE: external "vuex"
- var external_vuex_ = __webpack_require__(6);
- // EXTERNAL MODULE: ./components/DIalogXXSuccess.vue + 4 modules
- var DIalogXXSuccess = __webpack_require__(30);
- // EXTERNAL MODULE: ./components/ImageUpload.vue + 4 modules
- var ImageUpload = __webpack_require__(245);
- // EXTERNAL MODULE: ./utils/price.js
- var price = __webpack_require__(175);
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./pages/home/myDetail/index.vue?vue&type=script&lang=js
- // import addAddressDialog from '../../../components/addAddressDialog.vue'
- /* harmony default export */ var myDetailvue_type_script_lang_js = ({
- components: {
- // addAddressDialog,
- 'dialog-XX-success': DIalogXXSuccess["default"],
- imageUpload: ImageUpload["default"]
- },
- data() {
- return {
- xxContentVisible: false,
- xxContent: 'success',
- componentVisible: 1,
- // 2:add 3:edit 4:audit
- tabName: '',
- tableLoading: true,
- // 表单配置项
- profileform: {},
- rules: {
- email: [{
- required: true,
- message: 'Please enter the email',
- trigger: 'blur'
- }],
- company: [{
- required: true,
- message: 'Please enter the company',
- trigger: 'blur'
- }],
- contacts: [{
- required: true,
- message: 'Please enter first name',
- trigger: 'blur'
- }],
- last_name: [{
- required: true,
- message: 'Please enter last name',
- trigger: 'blur'
- }],
- phone: [{
- required: true,
- message: 'Please enter the phone',
- trigger: 'blur'
- }],
- password: [{
- required: true,
- message: 'Please enter the password',
- trigger: 'blur'
- }],
- confirm_password: [{
- required: true,
- message: 'Please enter the confirm_password',
- trigger: 'blur'
- }]
- },
- accountPasswordForm: {
- password: '',
- confirm_password: ''
- },
- orderKeyword: '',
- selword: '',
- accounts_id: '',
- orderTotal: 0,
- orderListQuery: {
- page: 1,
- limit: 20
- },
- tableData: [],
- dialogVisible: false,
- addressTotal: 0,
- addressListQuery: {
- page: 1,
- limit: 8
- },
- addressList: [],
- addressDetail: {},
- enquiryKeyword: '',
- enquiryList: [],
- enquiryListQuery: {
- page: 1,
- limit: 20
- },
- enquiryTotal: 0,
- orderSelList: [],
- Tracking_URL: '',
- urlDialogShow: false
- };
- },
- computed: {
- activeMenu() {
- var _this$$route$query$ty;
- return (_this$$route$query$ty = this.$route.query.type) !== null && _this$$route$query$ty !== void 0 ? _this$$route$query$ty : 'profile';
- },
- selShow() {
- return this.activeMenu === 'all-orders' || this.activeMenu === 'open-orders';
- }
- },
- watch: {
- $route: {
- handler(to) {
- if (false) {}
- }
- },
- orderKeyword() {
- this.orderListQuery.page = 1;
- },
- enquiryKeyword() {
- this.enquiryListQuery.page = 1;
- }
- },
- mounted() {
- if (this.$utils.checkLogin()) {
- this.updateType();
- } else {
- this.$router.replace('/');
- }
- },
- methods: {
- transformNumber(value) {
- return Object(price["a" /* round */])(Number(value)).toFixed(2);
- },
- handleClick(key, keyPath) {
- if (key) {
- this.$router.push({
- path: '/home/myDetail',
- query: {
- type: key
- }
- });
- }
- },
- updateType() {
- if (this.activeMenu === 'profile') {
- this.tabName = 'My Profile';
- this.getMemberDetail();
- } else if (this.activeMenu === 'enquiry') {
- this.tabName = 'My Enquiry';
- this.getEnquiryList();
- } else if (this.activeMenu === 'address') {
- // this.tabName = 'My Address'
- // this.getAddressList()
- } else {
- this.selword = '';
- if (this.activeMenu === 'all-orders') {
- this.orderSelList = ['Order Confirmed', 'In Production', 'In Transit', 'Order Completed'];
- }
- if (this.activeMenu === 'open-orders') {
- this.orderSelList = ['Order Confirmed', 'In Production', 'In Transit'];
- }
- this.tabName = 'My Orders';
- this.getOrdersList();
- }
- },
- closeAddressDialog() {
- this.dialogVisible = false;
- },
- // 获取用户信息
- getMemberDetail() {
- this.$axios.get('/uk-api/uk/member/detail').then(res => {
- if (res.code === 1) {
- this.profileform = res.result;
- this.profileform.logo = this.profileform.logo ? this.formatLogo(this.profileform.logo) : [];
- }
- }).catch(() => {});
- },
- formatLogo(params) {
- return [{
- url: params
- }];
- },
- onSave(form) {
- if (this.accountPasswordForm.confirm_password !== this.accountPasswordForm.password) {
- this.$message.error('The second password is inconsistent!');
- return;
- }
- this.$refs[form].validate(valid => {
- if (valid) {
- var _this$profileform$log, _this$profileform$log2;
- const requestBody = {
- email: this.profileform.email,
- company: this.profileform.company,
- contacts: this.profileform.contacts,
- last_name: this.profileform.last_name,
- phone: this.profileform.phone,
- logo: (_this$profileform$log = (_this$profileform$log2 = this.profileform.logo[0]) === null || _this$profileform$log2 === void 0 ? void 0 : _this$profileform$log2.url) !== null && _this$profileform$log !== void 0 ? _this$profileform$log : ''
- };
- let needLogout = false;
- if (this.accountPasswordForm.password.trim() !== '') {
- requestBody.password = this.accountPasswordForm.password;
- requestBody.confirm_password = this.accountPasswordForm.confirm_password;
- needLogout = true;
- }
- this.$axios.post('/uk-api/uk/member/edit', requestBody).then(res => {
- if (res.code === 1) {
- this.$notify({
- customClass: 'custom-notify-class',
- title: 'success',
- message: 'The profile information is modified successfully',
- type: 'success'
- });
- if (needLogout) {
- setTimeout(() => {
- this.$store.dispatch('logout').then(() => {
- this.$router.push('/');
- });
- }, 500);
- }
- }
- }).catch(() => {});
- } else {
- console.log('error submit!!');
- return false;
- }
- });
- },
- // 获取订单列表
- getOrdersList() {
- var _this$$store$state$us;
- const accounts_id = this.accounts_id ? this.accounts_id : (_this$$store$state$us = this.$store.state.userInfo) === null || _this$$store$state$us === void 0 ? void 0 : _this$$store$state$us.memberCrmcomList.map(i => i.id).join();
- const type = this.activeMenu === 'all-orders' ? '' : this.activeMenu === 'open-orders' ? 'Open Orders' : 'Closed Orders';
- this.tableLoading = true;
- this.$axios.post('/uk-api/crmdata/order_lists', {
- keyword: this.orderKeyword,
- page: this.orderListQuery.page,
- limit: this.orderListQuery.limit,
- accounts_id,
- Order_Stage: this.selword,
- type
- }).then(res => {
- if (res.code === 1) {
- this.tableData = res.result.data;
- this.orderTotal = res.result.total;
- this.tableLoading = false;
- }
- if (false) {}
- }).catch(() => {});
- },
- goOrderDetail(row) {
- const routeUrl = this.$router.resolve({
- path: '/home/myDetail/orderDetail',
- query: {
- id: row.sales_orders_id,
- crm: row.Account_Name_id
- }
- });
- window.open(routeUrl.href, '_blank');
- },
- getEnquiryList() {
- var _this$$store$state$us2;
- this.tableLoading = true;
- this.$axios.post('/uk-api/crmdata/enquiries_lists', {
- keyword: this.enquiryKeyword,
- page: this.enquiryListQuery.page,
- limit: this.enquiryListQuery.limit,
- accounts_id: ((_this$$store$state$us2 = this.$store.state.userInfo) === null || _this$$store$state$us2 === void 0 ? void 0 : _this$$store$state$us2.crm_accounts_id) || ''
- }).then(res => {
- if (res.code === 1) {
- this.enquiryList = res.result.data;
- this.enquiryTotal = res.result.total;
- this.tableLoading = false;
- }
- if (false) {}
- });
- },
- goEnquiryDetail(row) {
- const routeUrl = this.$router.resolve({
- path: '/home/myDetail/enquiryDetail',
- query: {
- id: row.enquiries_id
- }
- });
- window.open(routeUrl.href, '_blank');
- },
- // 获取地址列表
- // getAddressList() {
- // this.$axios
- // .get('/api/address/list', {
- // params: {
- // page: this.addressListQuery.page,
- // limit: this.addressListQuery.limit,
- // },
- // })
- // .then(res => {
- // if (res.code === 1) {
- // this.addressList = res.result.data
- // this.addressTotal = res.result.total
- // }
- // if (process.client) {
- // this.$nextTick(() => {
- // window.scroll(0, 0)
- // })
- // }
- // })
- // .catch(() => {})
- // },
- // addAddress(num) {
- // this.addressDetail = {}
- // this.componentVisible = num
- // this.dialogVisible = true
- // },
- // editAddress(num, id) {
- // this.$axios
- // .get('/api/address/detail/' + id)
- // .then(res => {
- // this.addressDetail = res.result
- // this.addressDetail.is_default = res.result.is_default === 1
- // this.componentVisible = num
- // this.dialogVisible = true
- // })
- // .catch(() => {})
- // },
- // delAddress(id) {
- // this.$axios.get('/api/address/delete/' + id).then(res => {
- // this.$notify({
- // title: 'success',
- // message: 'Deleted successfully',
- // type: 'success',
- // duration: 3000,
- // })
- // this.getAddressList()
- // })
- // },
- // setDefault(id) {
- // this.$axios.get('/api/address/set_default/' + id).then(res => {
- // this.$notify({
- // title: 'success',
- // message: 'Default address is set successfully',
- // type: 'success',
- // duration: 3000,
- // })
- // this.getAddressList()
- // })
- // },
- // update() {
- // this.getAddressList()
- // },
- resetPassword() {
- if (this.accountPasswordForm.confirm_password !== this.accountPasswordForm.password) {
- this.$message.error('The second password is inconsistent!');
- } else {
- this.$axios({
- url: '/uk-api/uk/member/reset',
- method: 'POST',
- data: this.accountPasswordForm
- }).then(res => {
- if (res.code === 1) {
- this.xxContentVisible = true;
- this.xxContent = 'Password Reset Successful';
- }
- }).catch(() => {
- // this.$message.error(error.response.data.msg);
- });
- }
- },
- openTracking_URL(url) {
- this.Tracking_URL = url;
- this.urlDialogShow = true;
- },
- handleNotification() {
- this.$router.push('/');
- this.$store.dispatch('logout');
- this.openDialog();
- },
- ...Object(external_vuex_["mapMutations"])(['openDialog'])
- }
- });
- // CONCATENATED MODULE: ./pages/home/myDetail/index.vue?vue&type=script&lang=js
- /* harmony default export */ var home_myDetailvue_type_script_lang_js = (myDetailvue_type_script_lang_js);
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
- var componentNormalizer = __webpack_require__(2);
- // CONCATENATED MODULE: ./pages/home/myDetail/index.vue
- function injectStyles (context) {
-
- var style0 = __webpack_require__(315)
- if (style0.__inject__) style0.__inject__(context)
- var style1 = __webpack_require__(316)
- if (style1.__inject__) style1.__inject__(context)
- }
- /* normalize component */
- var component = Object(componentNormalizer["a" /* default */])(
- home_myDetailvue_type_script_lang_js,
- render,
- staticRenderFns,
- false,
- injectStyles,
- "799f5a64",
- "4153663a"
-
- )
- /* harmony default export */ var myDetail = __webpack_exports__["default"] = (component.exports);
- /* nuxt-component-imports */
- installComponents(component, {ImageUpload: __webpack_require__(245).default,Pagination: __webpack_require__(182).default})
- /***/ })
- };;
- //# sourceMappingURL=index.js.map
|