exports.ids = [76,1,17,19];
exports.modules = {

/***/ 141:
/***/ (function(module, exports) {

// Exports
module.exports = {

};


/***/ }),

/***/ 149:
/***/ (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__(141);
/* 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__));


/***/ }),

/***/ 154:
/***/ (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__(149)
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",
  "40ff4db0"
  
)

/* harmony default export */ var Pagination = __webpack_exports__["default"] = (component.exports);

/***/ }),

/***/ 160:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return formatPrice; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return round; });
/* unused harmony export transformNumber */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return getUnit; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return getSetup; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return getPrint; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getAddon; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return getPackaging; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getFright; });
/* harmony import */ var number_precision__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(112);
/* 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);
};

/***/ }),

/***/ 166:
/***/ (function(module, exports) {

// Exports
module.exports = {

};


/***/ }),

/***/ 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/addAddressDialog.vue?vue&type=template&id=443741dd&scoped=true
var render = function render() {
  var _vm = this,
    _c = _vm._self._c;
  return _c('div', [_c('el-dialog', {
    attrs: {
      "lock-scroll": false,
      "title": "Add address",
      "visible": _vm.dialogFormVisible,
      "width": "700px"
    },
    on: {
      "update:visible": function ($event) {
        _vm.dialogFormVisible = $event;
      }
    }
  }, [_c('el-form', {
    ref: "ruleForm",
    attrs: {
      "model": _vm.data,
      "rules": _vm.rules
    }
  }, [_c('el-form-item', {
    attrs: {
      "prop": "country"
    }
  }, [_c('label', [_vm._v("Country/Region")]), _vm._v(" "), _c('el-input', {
    model: {
      value: _vm.data.country,
      callback: function ($$v) {
        _vm.$set(_vm.data, "country", $$v);
      },
      expression: "data.country"
    }
  })], 1), _vm._v(" "), _c('el-form-item', {
    attrs: {
      "prop": "name"
    }
  }, [_c('label', [_vm._v("Full name")]), _vm._v(" "), _c('el-input', {
    model: {
      value: _vm.data.name,
      callback: function ($$v) {
        _vm.$set(_vm.data, "name", $$v);
      },
      expression: "data.name"
    }
  })], 1), _vm._v(" "), _c('el-form-item', {
    attrs: {
      "prop": "phone"
    }
  }, [_c('label', [_vm._v("Phone number")]), _vm._v(" "), _c('el-input', {
    model: {
      value: _vm.data.phone,
      callback: function ($$v) {
        _vm.$set(_vm.data, "phone", $$v);
      },
      expression: "data.phone"
    }
  })], 1), _vm._v(" "), _c('el-form-item', {
    attrs: {
      "prop": "address"
    }
  }, [_c('label', [_vm._v("Address")]), _vm._v(" "), _c('el-input', {
    attrs: {
      "placeholder": "Street address,P.O.box,company name,c/o"
    },
    model: {
      value: _vm.data.address,
      callback: function ($$v) {
        _vm.$set(_vm.data, "address", $$v);
      },
      expression: "data.address"
    }
  })], 1), _vm._v(" "), _c('el-form-item', {
    attrs: {
      "prop": "post_code"
    }
  }, [_c('label', [_vm._v("Postcode")]), _vm._v(" "), _c('el-input', {
    model: {
      value: _vm.data.post_code,
      callback: function ($$v) {
        _vm.$set(_vm.data, "post_code", $$v);
      },
      expression: "data.post_code"
    }
  })], 1), _vm._v(" "), _c('el-form-item', {
    attrs: {
      "prop": "city"
    }
  }, [_c('label', [_vm._v("City/Suburb")]), _vm._v(" "), _c('el-input', {
    attrs: {
      "placeholder": "Choose city by suburb"
    },
    model: {
      value: _vm.data.city,
      callback: function ($$v) {
        _vm.$set(_vm.data, "city", $$v);
      },
      expression: "data.city"
    }
  })], 1), _vm._v(" "), _c('el-form-item', {
    attrs: {
      "prop": "state"
    }
  }, [_c('label', [_vm._v("State/Territory")]), _vm._v(" "), _c('el-input', {
    attrs: {
      "placeholder": "Choose state by territory"
    },
    model: {
      value: _vm.data.state,
      callback: function ($$v) {
        _vm.$set(_vm.data, "state", $$v);
      },
      expression: "data.state"
    }
  })], 1), _vm._v(" "), _c('el-form-item', {
    attrs: {
      "prop": "is_default"
    }
  }, [_c('el-checkbox', {
    model: {
      value: _vm.data.is_default,
      callback: function ($$v) {
        _vm.$set(_vm.data, "is_default", $$v);
      },
      expression: "data.is_default"
    }
  }, [_vm._v("\n          Make this my default address\n        ")])], 1), _vm._v(" "), _c('el-form-item', [_c('label', [_vm._v("Delivery instruction(optional)")]), _vm._v(" "), _c('div', {
    staticStyle: {
      "color": "#86d4e9",
      "line-height": "14px"
    }
  }, [_c('i', {
    staticClass: "el-icon-arrow-down",
    staticStyle: {
      "color": "#a2a2a2"
    }
  }), _vm._v("\n          And preferences,notes,access codes and more\n        ")])])], 1), _vm._v(" "), _c('div', {
    staticClass: "dialog-footer",
    attrs: {
      "slot": "footer"
    },
    slot: "footer"
  }, [_c('el-button', {
    on: {
      "click": function ($event) {
        return _vm.submit('ruleForm');
      }
    }
  }, [_vm._v("Add address")])], 1)], 1)], 1);
};
var staticRenderFns = [];

// CONCATENATED MODULE: ./components/addAddressDialog.vue?vue&type=template&id=443741dd&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/addAddressDialog.vue?vue&type=script&lang=js
/* harmony default export */ var addAddressDialogvue_type_script_lang_js = ({
  props: {
    dialogVisible: {
      type: Boolean,
      default: false
    },
    componentVisible: {
      type: Number,
      default: 2
    },
    data: {
      type: Object,
      default: () => {
        return {
          country: "Australia",
          name: "",
          phone: "",
          address: "",
          post_code: "",
          city: "",
          state: "",
          is_default: null
        };
      }
    }
  },
  data() {
    return {
      value: [],
      options: [],
      rules: {
        country: [{
          required: true,
          message: "Please enter your country",
          trigger: "blur"
        }],
        name: [{
          required: true,
          message: "Please enter your name",
          trigger: "blur"
        }],
        phone: [{
          required: true,
          message: "Please enter your phone number",
          trigger: "blur"
        }],
        address: [{
          required: true,
          message: "Please enter your address",
          trigger: "blur"
        }],
        post_code: [{
          required: true,
          message: "Please enter post_code",
          trigger: "blur"
        }],
        city: [{
          required: true,
          message: "Please enter city",
          trigger: "blur"
        }],
        state: [{
          required: true,
          message: "Please enter state",
          trigger: "blur"
        }]
      },
      cityList: [{
        id: 1,
        name: "Sydney"
      }, {
        id: 2,
        name: "Adelaide Mail Centre"
      }, {
        id: 3,
        name: "Melbourne"
      }, {
        id: 4,
        name: "Eastern Suburbs Mc"
      }, {
        id: 5,
        name: "Hobart"
      }, {
        id: 6,
        name: "Perth"
      }, {
        id: 7,
        name: "Launceston"
      }, {
        id: 8,
        name: "Brisbane"
      }, {
        id: 9,
        name: "Northern Suburbs Mc"
      }, {
        id: 10,
        name: "Strawberry Hills"
      }, {
        id: 11,
        name: "Springfield"
      }, {
        id: 12,
        name: "Waterloo"
      }, {
        id: 13,
        name: "Richmond"
      }, {
        id: 14,
        name: "Haymarket"
      }, {
        id: 15,
        name: "Red Hill"
      }, {
        id: 16,
        name: "Brisbane GPO Boxes"
      }, {
        id: 17,
        name: "Mayfield"
      }, {
        id: 18,
        name: "Australia Square"
      }, {
        id: 19,
        name: "Woodstock"
      }, {
        id: 20,
        name: "Sydney South"
      }, {
        id: 21,
        name: "The Gap"
      }, {
        id: 22,
        name: "Kingston"
      }, {
        id: 23,
        name: "Kensington"
      }, {
        id: 24,
        name: "Darlington"
      }],
      stateList: [{
        id: 1,
        name: "Australian Capital Territory"
      }, {
        id: 2,
        name: "New South Wales"
      }, {
        id: 3,
        name: "Northern Territory"
      }, {
        id: 4,
        name: "Queensland"
      }, {
        id: 5,
        name: "South Australia"
      }, {
        id: 6,
        name: "Tasmania"
      }, {
        id: 7,
        name: "Victoria"
      }, {
        id: 8,
        name: "Western Australia"
      }]
    };
  },
  computed: {
    dialogFormVisible: {
      get: function () {
        return this.dialogVisible;
      },
      set: function (val) {
        this.$emit("update:dialogVisible", val);
      }
    }
  },
  methods: {
    submit(ruleForm) {
      this.$refs[ruleForm].validate(valid => {
        if (valid) {
          if (this.componentVisible == 2) {
            this.addAddress();
            if (this.$route.fullPath.includes('product-builder')) return;
            this.$router.push({
              path: '/home/myDetail',
              query: {
                type: "third"
              }
            });
          } else if (this.componentVisible == 3) {
            this.editAddress();
            this.$router.push({
              path: '/home/myDetail',
              query: {
                type: "third"
              }
            });
          }
        } else {
          console.log("error submit!!");
          return false;
        }
      });
    },
    addAddress() {
      this.$axios.post("/address/add", this.data).then(res => {
        if (res.code === 1) {
          this.$notify({
            title: "success",
            message: "Submitted successfully",
            type: "success",
            duration: 3000
          });
          this.dialogFormVisible = false;
          this.update();
        }
      }).catch(error => {
        this.$message.error(error.response.data.msg);
      });
    },
    editAddress() {
      this.$axios.post("/address/edit", this.data).then(res => {
        if (res.code === 1) {
          this.$notify({
            title: "success",
            message: "Submitted successfully",
            type: "success",
            duration: 3000
          });
          this.dialogFormVisible = false;
          this.update();
        }
      }).catch(error => {
        this.$message.error(error.response.data.msg);
      });
    },
    update() {
      this.$emit("update", true);
    }
  }
});
// CONCATENATED MODULE: ./components/addAddressDialog.vue?vue&type=script&lang=js
 /* harmony default export */ var components_addAddressDialogvue_type_script_lang_js = (addAddressDialogvue_type_script_lang_js); 
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(2);

// CONCATENATED MODULE: ./components/addAddressDialog.vue



function injectStyles (context) {
  
  var style0 = __webpack_require__(194)
if (style0.__inject__) style0.__inject__(context)

}

/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  components_addAddressDialogvue_type_script_lang_js,
  render,
  staticRenderFns,
  false,
  injectStyles,
  "443741dd",
  "72c5b0ae"
  
)

/* harmony default export */ var addAddressDialog = __webpack_exports__["default"] = (component.exports);

/***/ }),

/***/ 194:
/***/ (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_addAddressDialog_vue_vue_type_style_index_0_id_443741dd_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(166);
/* 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_addAddressDialog_vue_vue_type_style_index_0_id_443741dd_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_addAddressDialog_vue_vue_type_style_index_0_id_443741dd_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_addAddressDialog_vue_vue_type_style_index_0_id_443741dd_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_addAddressDialog_vue_vue_type_style_index_0_id_443741dd_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));


/***/ }),

/***/ 216:
/***/ (function(module, exports) {

// Exports
module.exports = {

};


/***/ }),

/***/ 247:
/***/ (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_049aaa02_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(216);
/* 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_049aaa02_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_049aaa02_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_049aaa02_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_049aaa02_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));


/***/ }),

/***/ 266:
/***/ (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=049aaa02&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=049aaa02&scoped=true

// EXTERNAL MODULE: external "vuedraggable"
var external_vuedraggable_ = __webpack_require__(133);
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(`/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__(247)
if (style0.__inject__) style0.__inject__(context)

}

/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  components_ImageUploadvue_type_script_lang_js,
  render,
  staticRenderFns,
  false,
  injectStyles,
  "049aaa02",
  "a18b4ac4"
  
)

/* harmony default export */ var ImageUpload = __webpack_exports__["default"] = (component.exports);

/***/ }),

/***/ 287:
/***/ (function(module, exports) {

// Exports
module.exports = {

};


/***/ }),

/***/ 288:
/***/ (function(module, exports) {

// Exports
module.exports = {

};


/***/ }),

/***/ 352:
/***/ (function(module, exports) {

module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE0AAABNCAYAAADjCemwAAAAAXNSR0IArs4c6QAAAhVJREFUeF7t3EtKA0EYxPH6FHXjCQQhg2cQ8XEM3SuufSCoZzABEV2L7vUYPhCvoExA8ARufLZMRFBM1FQITMI/20z19PxSmUmg6VC5XqHK3KqUViRVJNWlOFD9bF9SKstUoywTacwjm65KA5s/5/RWU365VZa5lgdtbHJcw8O5QoM/cJJe9fSU6f76rgxw5UHLZualOGmNkhaUX5yC9lWgMrOoiKOWKCktqX5xDBpoHXaAphmAoIFmCBgRmgaaIWBEaBpohoARoWmgGQJGhKaBZggYEZoGmiFgRGgaaIaAEaFpoBkCRoSmgWYIGBGaBpohYERoGmiGgBGhaaAZAkaEpoFmCBiRnmxasT5sZGhKSaPGJXceiZiTtPzLQIdK6azzExkjhB70+Hz1uT6uWJ8WyqZ3lAY2mi6oM87Rl5FiYWFoV/n5drHGdU2R9vryQrtxUSnWQ5XZG4UmujF+X46ZdFugvfC1bOPjTXqlaW14NQ79aBr3tLbcGvc0np7/M/v29PyM8DutNV6T32n/k+72UT35j6DbKH+ND9pfQk3eBw00Q8CI0DTQDAEjQtNAMwSMCE0DzRAwIjQNNEPAiNA00AwBI0LTQDMEjAhNA80QMCI0DTRDwIjQNNAMASNC00AzBIwITQPNEDAiNA00Q8CI0DTQDAEjwu6jBhr73BpoRSSbrUpqsqOyasrP2VG5BWtP7N39DnF70LrahZYoAAAAAElFTkSuQmCC"

/***/ }),

/***/ 353:
/***/ (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_b5122ea0_prod_lang_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(287);
/* 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_b5122ea0_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_b5122ea0_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_b5122ea0_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_b5122ea0_prod_lang_scss__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));


/***/ }),

/***/ 354:
/***/ (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_b5122ea0_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(288);
/* 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_b5122ea0_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_b5122ea0_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_b5122ea0_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_b5122ea0_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));


/***/ }),

/***/ 405:
/***/ (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=b5122ea0&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-b5122ea0>", "</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-b5122ea0>", "</div>", [_vm._ssrNode("<div" + _vm._ssrStyle(null, null, {
    display: _vm.activeMenu === 'profile' ? '' : 'none'
  }) + " data-v-b5122ea0>", "</div>", [_vm._ssrNode("<div class=\"content-form\" data-v-b5122ea0>", "</div>", [_vm._ssrNode("<p class=\"content-title\" data-v-b5122ea0>" + _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-b5122ea0>", "</div>", [_vm._ssrNode("<p class=\"content-title\" data-v-b5122ea0>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-b5122ea0>", "</div>", [_vm._ssrNode("<p class=\"content-title\" data-v-b5122ea0>" + _vm._ssrEscape(_vm._s(_vm.tabName)) + "</p> "), _vm._ssrNode("<div class=\"searchInput\" data-v-b5122ea0>", "</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 === 'address' ? '' : 'none'
  }) + " data-v-b5122ea0>", "</div>", [_vm._ssrNode("<p class=\"content-title\" data-v-b5122ea0>" + _vm._ssrEscape(_vm._s(_vm.tabName)) + "</p> "), _vm._ssrNode("<div class=\"address-content\" data-v-b5122ea0>", "</div>", [_vm._ssrNode("<div class=\"my-addresses add-address\" data-v-b5122ea0><img" + _vm._ssrAttr("src", __webpack_require__(352)) + " alt data-v-b5122ea0> <p data-v-b5122ea0>Add address</p></div> "), _vm._l(_vm.addressList, function (item) {
    return _vm._ssrNode("<div class=\"my-addresses address\" data-v-b5122ea0>", "</div>", [_vm._ssrNode("<div class=\"username\" data-v-b5122ea0><p data-v-b5122ea0>" + _vm._ssrEscape(_vm._s(item.name)) + "</p> <span" + _vm._ssrStyle(null, null, {
      display: item.is_default ? '' : 'none'
    }) + " data-v-b5122ea0>Default</span></div> <div class=\"my-address-content\" data-v-b5122ea0><p data-v-b5122ea0>" + _vm._ssrEscape(_vm._s(item.state)) + "</p> <p data-v-b5122ea0>" + _vm._ssrEscape(_vm._s(item.city)) + "</p> <p data-v-b5122ea0>" + _vm._ssrEscape(_vm._s(item.address)) + "</p> <p data-v-b5122ea0>" + _vm._ssrEscape(_vm._s(item.post_code)) + "</p> <p data-v-b5122ea0>" + _vm._ssrEscape(_vm._s(item.country)) + "</p> <p data-v-b5122ea0>" + _vm._ssrEscape("Phone number: " + _vm._s(item.phone)) + "</p></div> "), _vm._ssrNode("<div class=\"edit-btns\" data-v-b5122ea0>", "</div>", [_c('el-button', {
      attrs: {
        "size": "mini"
      },
      on: {
        "click": function ($event) {
          return _vm.editAddress(3, item.id);
        }
      }
    }, [_vm._v("\n              Edit\n            ")]), _vm._ssrNode(" "), _c('el-button', {
      attrs: {
        "size": "mini"
      },
      on: {
        "click": function ($event) {
          return _vm.delAddress(item.id);
        }
      }
    }, [_vm._v("\n              Remove\n            ")]), _vm._ssrNode(" "), _c('el-button', {
      directives: [{
        name: "show",
        rawName: "v-show",
        value: !item.is_default,
        expression: "!item.is_default"
      }],
      attrs: {
        "size": "mini"
      },
      on: {
        "click": function ($event) {
          return _vm.setDefault(item.id);
        }
      }
    }, [_vm._v("\n              Set as Default\n            ")])], 2)], 2);
  })], 2), _vm._ssrNode(" "), _c('pagination', {
    directives: [{
      name: "show",
      rawName: "v-show",
      value: _vm.addressTotal > 0,
      expression: "addressTotal > 0"
    }],
    attrs: {
      "total": _vm.addressTotal,
      "page": _vm.addressListQuery.page,
      "limit": _vm.addressListQuery.limit
    },
    on: {
      "update:page": function ($event) {
        return _vm.$set(_vm.addressListQuery, "page", $event);
      },
      "update:limit": function ($event) {
        return _vm.$set(_vm.addressListQuery, "limit", $event);
      },
      "pagination": _vm.getAddressList
    }
  })], 2), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"content-form\"" + _vm._ssrStyle(null, null, {
    display: _vm.activeMenu.includes('orders') ? '' : 'none'
  }) + " data-v-b5122ea0>", "</div>", [_vm._ssrNode("<p class=\"content-title\" data-v-b5122ea0>" + _vm._ssrEscape(_vm._s(_vm.tabName)) + "</p> "), _vm._ssrNode("<div class=\"searchInput\" data-v-b5122ea0>", "</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))]);
        }), 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('add-address-dialog', {
    attrs: {
      "dialogVisible": _vm.dialogVisible,
      "data": _vm.addressDetail,
      "componentVisible": _vm.componentVisible
    },
    on: {
      "update:dialogVisible": function ($event) {
        _vm.dialogVisible = $event;
      },
      "update:dialog-visible": function ($event) {
        _vm.dialogVisible = $event;
      },
      "close": _vm.closeAddressDialog,
      "update": _vm.update
    }
  }), _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=b5122ea0&scoped=true

// EXTERNAL MODULE: external "vuex"
var external_vuex_ = __webpack_require__(5);

// EXTERNAL MODULE: ./components/addAddressDialog.vue + 4 modules
var addAddressDialog = __webpack_require__(182);

// EXTERNAL MODULE: ./components/DIalogXXSuccess.vue + 4 modules
var DIalogXXSuccess = __webpack_require__(30);

// EXTERNAL MODULE: ./components/ImageUpload.vue + 4 modules
var ImageUpload = __webpack_require__(266);

// EXTERNAL MODULE: ./utils/price.js
var price = __webpack_require__(160);

// 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





/* harmony default export */ var myDetailvue_type_script_lang_js = ({
  components: {
    addAddressDialog: addAddressDialog["default"],
    '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.getMemberDetail();
      this.updateType();
    } else {
      this.$router.replace('/');
    }
  },
  methods: {
    transformNumber(value) {
      return Object(price["h" /* 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';
      } 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('/au/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('/au/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('/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('/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('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 (false) {}
      }).catch(() => {});
    },
    addAddress(num) {
      this.addressDetail = {};
      this.componentVisible = num;
      this.dialogVisible = true;
    },
    editAddress(num, id) {
      this.$axios.get('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('address/delete/' + id).then(res => {
        this.$notify({
          title: 'success',
          message: 'Deleted successfully',
          type: 'success',
          duration: 3000
        });
        this.getAddressList();
      });
      // .catch((error) => {});
    },
    setDefault(id) {
      this.$axios.get('address/set_default/' + id).then(res => {
        this.$notify({
          title: 'success',
          message: 'Default address is set successfully',
          type: 'success',
          duration: 3000
        });
        this.getAddressList();
      });
      // .catch((error) => {});
    },
    update() {
      this.getAddressList();
    },
    resetPassword() {
      if (this.accountPasswordForm.confirm_password !== this.accountPasswordForm.password) {
        this.$message.error('The second password is inconsistent!');
      } else {
        this.$axios({
          url: 'au/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__(353)
if (style0.__inject__) style0.__inject__(context)
var style1 = __webpack_require__(354)
if (style1.__inject__) style1.__inject__(context)

}

/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  home_myDetailvue_type_script_lang_js,
  render,
  staticRenderFns,
  false,
  injectStyles,
  "b5122ea0",
  "71448b1a"
  
)

/* harmony default export */ var myDetail = __webpack_exports__["default"] = (component.exports);

/* nuxt-component-imports */
installComponents(component, {ImageUpload: __webpack_require__(266).default,Pagination: __webpack_require__(154).default,AddAddressDialog: __webpack_require__(182).default})


/***/ })

};;
//# sourceMappingURL=index.js.map