exports.ids = [75];
exports.modules = {

/***/ 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);
};

/***/ }),

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

// Exports
module.exports = {

};


/***/ }),

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

// Exports
module.exports = {

};


/***/ }),

/***/ 367:
/***/ (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_enquiryDetail_vue_vue_type_style_index_0_id_0313a758_prod_lang_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(295);
/* 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_enquiryDetail_vue_vue_type_style_index_0_id_0313a758_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_enquiryDetail_vue_vue_type_style_index_0_id_0313a758_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_enquiryDetail_vue_vue_type_style_index_0_id_0313a758_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_enquiryDetail_vue_vue_type_style_index_0_id_0313a758_prod_lang_scss__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));


/***/ }),

/***/ 368:
/***/ (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_enquiryDetail_vue_vue_type_style_index_1_id_0313a758_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(296);
/* 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_enquiryDetail_vue_vue_type_style_index_1_id_0313a758_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_enquiryDetail_vue_vue_type_style_index_1_id_0313a758_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_enquiryDetail_vue_vue_type_style_index_1_id_0313a758_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_enquiryDetail_vue_vue_type_style_index_1_id_0313a758_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));


/***/ }),

/***/ 412:
/***/ (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/enquiryDetail.vue?vue&type=template&id=0313a758&scoped=true
var render = function render() {
  var _vm$detail$Quotes_Inf;
  var _vm = this,
    _c = _vm._self._c;
  return _c('div', {
    staticClass: "page-enquiry-detail com-main com-margin-auto"
  }, [_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', {
    attrs: {
      "to": {
        path: '/home/myDetail',
        query: {
          type: 'enquiry'
        }
      }
    }
  }, [_vm._v("My Enquiry")]), _vm._v(" "), _c('el-breadcrumb-item', [_vm._v("detail")])], 1), _vm._ssrNode(" "), _vm.loading ? _c('div', {
    directives: [{
      name: "loading",
      rawName: "v-loading",
      value: _vm.loadiding,
      expression: "loadiding"
    }],
    staticClass: "com-loading"
  }, []) : _vm._e(), _vm._ssrNode(" "), !_vm.loading ? _vm._ssrNode("<div data-v-0313a758>", "</div>", [_vm._ssrNode("<section class=\"main-header\" data-v-0313a758>", "</section>", [_vm._ssrNode("<h1 data-v-0313a758>" + _vm._ssrEscape("Job Name: " + _vm._s(_vm.detail.Enquiry_Title)) + "</h1> <div class=\"main-header-mid flex between\" data-v-0313a758><div class=\"left\" data-v-0313a758></div> <ul class=\"right\" data-v-0313a758><li data-v-0313a758>" + _vm._ssrEscape("Enquiry No: " + _vm._s(_vm.detail.Auto_Number)) + "</li> <li data-v-0313a758>" + _vm._ssrEscape("Enquiry Date:\n          " + _vm._s(_vm.formatStepDesc(_vm.detail.Created_Time))) + "</li> <li data-v-0313a758>" + _vm._ssrEscape("Payment Terms: " + _vm._s(_vm.detail.Payment_Terms)) + "</li></ul></div> "), _vm._ssrNode("<div class=\"steps\" data-v-0313a758>", "</div>", [_c('el-steps', {
    attrs: {
      "active": _vm.computedEnquiryState,
      "align-center": "",
      "finish-status": "success",
      "process-status": "wait"
    }
  }, [_c('el-step', {
    attrs: {
      "title": "Enquiry Submitted",
      "description": _vm.formatStepDesc(_vm.detail.Enquiry_Created)
    }
  }), _vm._v(" "), _c('el-step', {
    attrs: {
      "title": "Enquiry Confirmed",
      "description": _vm.formatStepDesc(_vm.detail.Enquiry_Allocated)
    }
  }), _vm._v(" "), _c('el-step', {
    attrs: {
      "title": "Quote Drafted",
      "description": _vm.formatStepDesc(_vm.detail.Quote_Created)
    }
  }), _vm._v(" "), _c('el-step', {
    attrs: {
      "title": "Quote Sent",
      "description": _vm.formatStepDesc(_vm.detail.Quote_Sent)
    }
  }), _vm._v(" "), _c('el-step', {
    attrs: {
      "title": "Order Confirmed"
    }
  }), _vm._v(" "), _c('el-step', {
    attrs: {
      "title": "Enquiry Closed",
      "description": _vm.formatStepDesc(_vm.detail.Enquiry_Closed)
    }
  })], 1)], 1)], 2), _vm._ssrNode(" " + (_vm.detail.Website_Message && _vm.detail.Website_Message.length > 1 || _vm.detail.Artworklink && _vm.detail.Artworklink.length ? "<section data-v-0313a758><p class=\"sharing-title\" data-v-0313a758>Enquiries Information</p> <div class=\"sharing-address\" data-v-0313a758><p style=\"white-space: pre-wrap\" data-v-0313a758>" + _vm._ssrEscape(_vm._s(_vm.detail.Website_Message)) + "</p> <p data-v-0313a758>\n          Artwork link:\n          <a" + _vm._ssrAttr("href", _vm.detail.Artworklink) + " target=\"_brank\" style=\"color: blue; text-decoration: underline\" data-v-0313a758>" + _vm._ssrEscape(_vm._s(_vm.detail.Artworklink)) + "</a></p></div></section>" : "<!---->") + " "), _vm.detail.Quotes_Information && (_vm$detail$Quotes_Inf = _vm.detail.Quotes_Information.quotes_details_data) !== null && _vm$detail$Quotes_Inf !== void 0 && _vm$detail$Quotes_Inf.length ? _vm._ssrNode("<section data-v-0313a758>", "</section>", [_vm._ssrNode("<div class=\"sharing-title\" data-v-0313a758>Quotes Information</div> "), _c('el-table', {
    attrs: {
      "data": [_vm.detail.Quotes_Information],
      "header-cell-style": {
        background: '#fff',
        color: '#101010',
        fontWeight: 'normal'
      }
    }
  }, [_c('el-table-column', {
    attrs: {
      "width": "200",
      "prop": "Quote_Title",
      "label": "Quote Name"
    }
  }), _vm._v(" "), _c('el-table-column', {
    attrs: {
      "align": "center",
      "prop": "Quote_Stage",
      "label": "Status"
    },
    scopedSlots: _vm._u([{
      key: "default",
      fn: function (scope) {
        return [_c('div', [_vm._v(_vm._s(scope.row.Quote_Stage || _vm.detail.Quote_Stage))])];
      }
    }], null, false, 3801520526)
  }), _vm._v(" "), _c('el-table-column', {
    attrs: {
      "align": "center",
      "prop": "Total_Including_Tax",
      "label": "Grand Total"
    },
    scopedSlots: _vm._u([{
      key: "default",
      fn: function (scope) {
        return [_vm._v("\n            " + _vm._s(_vm.transformNumber(scope.row.Total_Including_Tax)) + "\n          ")];
      }
    }], null, false, 3681501733)
  }), _vm._v(" "), _c('el-table-column', {
    attrs: {
      "align": "center",
      "prop": "",
      "label": "Date"
    },
    scopedSlots: _vm._u([{
      key: "default",
      fn: function (scope) {
        return [_c('div', [_vm._v("\n              " + _vm._s(_vm.formatStepDesc(scope.row.Created_Time)) + "\n            ")])];
      }
    }], null, false, 1050211034)
  })], 1), _vm._ssrNode(" <br data-v-0313a758> "), _c('el-table', {
    staticStyle: {
      "margin-left": "80px",
      "width": "calc(100% - 80px)"
    },
    attrs: {
      "header-cell-style": {
        background: '#fff',
        color: '#101010',
        fontWeight: 'normal'
      },
      "data": _vm.detail.Quotes_Information.quotes_details_data
    }
  }, [_c('el-table-column', {
    attrs: {
      "label": "S.No",
      "type": "index",
      "width": "65"
    }
  }), _vm._v(" "), _c('el-table-column', {
    attrs: {
      "min-width": "300",
      "prop": "product_name",
      "label": "Product Name"
    },
    scopedSlots: _vm._u([{
      key: "default",
      fn: function (scope) {
        return [_c('div', [_c('div', {
          staticClass: "text-link"
        }, [_vm._v(_vm._s(scope.row.product_name))]), _vm._v(" "), scope.row.product_description ? _c('div', {
          staticStyle: {
            "white-space": "pre-wrap"
          }
        }, [_vm._v("\n                " + _vm._s(scope.row.product_description) + "\n              ")]) : _vm._e()])];
      }
    }], null, false, 155598485)
  }), _vm._v(" "), _c('el-table-column', {
    attrs: {
      "align": "center",
      "prop": "quantity",
      "label": "Quantity"
    }
  }), _vm._v(" "), _c('el-table-column', {
    attrs: {
      "align": "center",
      "prop": "list_price",
      "label": "List Prices"
    },
    scopedSlots: _vm._u([{
      key: "default",
      fn: function (scope) {
        return [_vm._v("\n            " + _vm._s(_vm.transformNumber(scope.row.list_price)) + "\n          ")];
      }
    }], null, false, 2248021059)
  }), _vm._v(" "), _c('el-table-column', {
    attrs: {
      "align": "center",
      "prop": "amount",
      "label": "Amount"
    },
    scopedSlots: _vm._u([{
      key: "default",
      fn: function (scope) {
        return [_vm._v("\n            " + _vm._s(_vm.transformNumber(scope.row.amount)) + "\n          ")];
      }
    }], null, false, 2571101279)
  }), _vm._v(" "), _c('el-table-column', {
    attrs: {
      "align": "center",
      "prop": "Tax",
      "label": "Tax"
    },
    scopedSlots: _vm._u([{
      key: "default",
      fn: function (scope) {
        return [_vm._v("\n            " + _vm._s(_vm.transformNumber(scope.row.Tax)) + "\n          ")];
      }
    }], null, false, 1276862622)
  }), _vm._v(" "), _c('el-table-column', {
    attrs: {
      "align": "center",
      "prop": "Discount",
      "label": "Discount"
    },
    scopedSlots: _vm._u([{
      key: "default",
      fn: function (scope) {
        return [_vm._v("\n            " + _vm._s(_vm.transformNumber(scope.row.Discount)) + "\n          ")];
      }
    }], null, false, 1436355502)
  }), _vm._v(" "), _c('el-table-column', {
    attrs: {
      "align": "center",
      "prop": "net_total",
      "label": "Total"
    },
    scopedSlots: _vm._u([{
      key: "default",
      fn: function (scope) {
        return [_vm._v("\n            " + _vm._s(_vm.transformNumber(scope.row.net_total)) + "\n          ")];
      }
    }], null, false, 3728241425)
  })], 1), _vm._ssrNode(" <div class=\"table-wrap\" data-v-0313a758><table class=\"total\" data-v-0313a758><tr data-v-0313a758><td data-v-0313a758>Sub Total</td> <td data-v-0313a758>" + _vm._ssrEscape("\n              " + _vm._s(_vm.detail.Currency) + " \n              ") + "<div class=\"num\" data-v-0313a758>" + _vm._ssrEscape("\n                " + _vm._s(_vm.transformNumber(_vm.detail.Quotes_Information.quotecalculation__Sub_Total_Amount)) + "\n              ") + "</div></td></tr> <tr data-v-0313a758><td data-v-0313a758>Total Taxes</td> <td data-v-0313a758>" + _vm._ssrEscape("\n              " + _vm._s(_vm.detail.Currency) + " \n              ") + "<div class=\"num\" data-v-0313a758>" + _vm._ssrEscape("\n                " + _vm._s(_vm.transformNumber(_vm.detail.Quotes_Information.Tax_Total)) + "\n              ") + "</div></td></tr> <tr data-v-0313a758><td data-v-0313a758>Total Discount</td> <td data-v-0313a758>" + _vm._ssrEscape("\n              " + _vm._s(_vm.detail.Currency) + " \n              ") + "<div class=\"num\" data-v-0313a758>" + _vm._ssrEscape("\n                " + _vm._s(_vm.transformNumber(_vm.detail.Quotes_Information.Discount_Amount)) + "\n              ") + "</div></td></tr> <tr data-v-0313a758><td data-v-0313a758>Adjustment</td> <td data-v-0313a758>" + _vm._ssrEscape("\n              " + _vm._s(_vm.detail.Currency) + " \n              ") + "<div class=\"num\" data-v-0313a758>" + _vm._ssrEscape("\n                " + _vm._s(_vm.transformNumber(_vm.detail.Quotes_Information.Adjustment)) + "\n              ") + "</div></td></tr> <tr data-v-0313a758><td data-v-0313a758>Grand Total</td> <td data-v-0313a758>" + _vm._ssrEscape("\n              " + _vm._s(_vm.detail.Currency) + " \n              ") + "<div class=\"num\" data-v-0313a758>" + _vm._ssrEscape("\n                " + _vm._s(_vm.transformNumber(_vm.detail.Quotes_Information.Total_Including_Tax)) + "\n              ") + "</div></td></tr></table></div>")], 2) : _vm._e(), _vm._ssrNode(" "), _vm.detail.orderInformation.length ? _vm._ssrNode("<section data-v-0313a758>", "</section>", [_vm._ssrNode("<div class=\"sharing-title\" data-v-0313a758>Order Information</div> "), _c('el-table', {
    attrs: {
      "data": _vm.detail.orderInformation,
      "header-cell-style": {
        background: '#fff',
        color: '#101010',
        fontWeight: 'normal'
      },
      "row-style": {
        cursor: 'pointer'
      }
    },
    on: {
      "row-click": _vm.navToOrderDetail
    }
  }, [_c('el-table-column', {
    attrs: {
      "width": "100",
      "label": "Order No",
      "prop": "Reference"
    },
    scopedSlots: _vm._u([{
      key: "default",
      fn: function (scope) {
        return [_c('div', {}, [_vm._v(_vm._s(scope.row.Reference))])];
      }
    }], null, false, 2088554928)
  }), _vm._v(" "), _c('el-table-column', {
    attrs: {
      "align": "center",
      "label": "Job name",
      "prop": "Sales_Order_Title_Job_Name"
    },
    scopedSlots: _vm._u([{
      key: "default",
      fn: function (scope) {
        return [_c('div', {
          staticClass: "text-link"
        }, [_vm._v("\n              " + _vm._s(scope.row.Sales_Order_Title_Job_Name) + "\n            ")])];
      }
    }], null, false, 1077885697)
  }), _vm._v(" "), _c('el-table-column', {
    attrs: {
      "align": "center",
      "label": "Order Status",
      "prop": "Order_Stage"
    }
  }), _vm._v(" "), _c('el-table-column', {
    attrs: {
      "align": "center",
      "label": "Invoice status",
      "prop": "Invoice_status1"
    }
  }), _vm._v(" "), _c('el-table-column', {
    attrs: {
      "align": "center",
      "label": "Grand Total",
      "prop": "Total_Including_Tax"
    },
    scopedSlots: _vm._u([{
      key: "default",
      fn: function (scope) {
        return [_vm._v("\n            " + _vm._s(_vm.transformNumber(scope.row.Total_Including_Tax)) + "\n          ")];
      }
    }], null, false, 3681501733)
  }), _vm._v(" "), _c('el-table-column', {
    attrs: {
      "align": "center",
      "label": "Date",
      "prop": "Sales_Order_Created"
    },
    scopedSlots: _vm._u([{
      key: "default",
      fn: function (scope) {
        return [_c('div', [_vm._v(_vm._s(_vm.formatStepDesc(scope.row.Sales_Order_Created)))])];
      }
    }], null, false, 3904710774)
  }), _vm._v(" "), _c('el-table-column', {
    attrs: {
      "label": "Action",
      "width": "90",
      "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",
            "type": "primary",
            "plain": ""
          },
          on: {
            "click": function ($event) {
              return _vm.navToOrderDetail(scope.row);
            }
          }
        }, [_vm._v("View")])];
      }
    }], null, false, 778695663)
  })], 1)], 2) : _vm._e(), _vm._ssrNode(" "), _vm.detail.Emaillink && _vm.detail.Emaillink.length || _vm.detail.Email_link2 && _vm.detail.Email_link2.length ? _vm._ssrNode("<section data-v-0313a758>", "</section>", [_vm._ssrNode("<br data-v-0313a758> <br data-v-0313a758> "), _c('el-tabs', {
    model: {
      value: _vm.activeEnquiryMail,
      callback: function ($$v) {
        _vm.activeEnquiryMail = $$v;
      },
      expression: "activeEnquiryMail"
    }
  }, [_vm.detail.Email_link2 && _vm.detail.Email_link2.length ? _c('el-tab-pane', {
    attrs: {
      "label": "Initial Quote",
      "name": "quote"
    }
  }, [_c('iframe', {
    staticStyle: {
      "overflow": "scroll"
    },
    attrs: {
      "src": _vm.detail.Email_link2,
      "frameborder": "0",
      "height": "1200px",
      "width": "100%"
    }
  })]) : _vm._e(), _vm._v(" "), _vm.detail.Emaillink && _vm.detail.Emaillink.length ? _c('el-tab-pane', {
    attrs: {
      "label": "Initial Enquiry",
      "name": "enquiry"
    }
  }, [_c('iframe', {
    staticStyle: {
      "overflow": "scroll"
    },
    attrs: {
      "src": _vm.detail.Emaillink,
      "frameborder": "0",
      "height": "1200px",
      "width": "100%"
    }
  })]) : _vm._e()], 1)], 2) : _vm._e()], 2) : _vm._e()], 2);
};
var staticRenderFns = [];

// CONCATENATED MODULE: ./pages/home/myDetail/enquiryDetail.vue?vue&type=template&id=0313a758&scoped=true

// 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/enquiryDetail.vue?vue&type=script&lang=js

/* harmony default export */ var enquiryDetailvue_type_script_lang_js = ({
  name: 'EnquiryDetail',
  components: {},
  filters: {},
  props: {},
  data() {
    return {
      activeEnquiryMail: 'quote',
      loading: false,
      detail: {
        orderInformation: []
      },
      stepConfig: {
        'Enquiry Created': 1,
        'Enquiry Confirmed': 2,
        'Quote Drafted': 3,
        'Quote Sent': 4,
        'Order Confirmed': 5,
        'Enquiry Closed': 6
      }
    };
  },
  computed: {
    computedEnquiryState() {
      if (this.detail.Customize_Pipeline_Stage) {
        return this.stepConfig[this.detail.Customize_Pipeline_Stage];
      }
      return 0;
    }
  },
  watch: {},
  created() {
    this.getDetail();
  },
  mounted() {},
  updated() {},
  beforeDestroy() {},
  methods: {
    transformNumber(value) {
      // console.log(value, 'value')
      return Object(price["h" /* round */])(Number(value)).toFixed(2);
    },
    formatStepDesc(date) {
      return this.$utils.formatTime(date, 'DD/MM/YYYY');
    },
    getDetail() {
      var _this$$store$state$us;
      this.$axios.post('/crmdata/enquiries_detail', {
        accounts_id: ((_this$$store$state$us = this.$store.state.userInfo) === null || _this$$store$state$us === void 0 ? void 0 : _this$$store$state$us.crm_accounts_id) || '',
        id: this.$route.query.id
      }).then(res => {
        // console.log(res)
        // eslint-disable-next-line
        if (res.code == 1) {
          if (res.result === '4002' || res.result === null) {
            console.log('id不一致 || 数据空');
            this.$router.replace('/');
            return;
          }
          const temp = JSON.parse(JSON.stringify(res.result));
          if (temp.Orders_Information && temp.Orders_Information.Reference) {
            temp.orderInformation = [temp.Orders_Information];
          } else {
            temp.orderInformation = [];
          }
          this.detail = temp;
          if (!(this.detail.Email_link2 && this.detail.Email_link2.length)) {
            this.activeEnquiryMail = 'enquiry';
          }
        }
      }).catch(e => {
        console.log(e, 'eee');
        if (e.response.data.code === 10100) {
          this.$router.replace('/');
          console.log('not login');
        }
      });
    },
    navToOrderDetail(row) {
      console.log(row);
      const url = this.$router.resolve({
        path: '/home/myDetail/orderDetail',
        query: {
          id: row.sales_orders_id
        }
      });
      window.open(url.href, '_blank');
    }
  }
});
// CONCATENATED MODULE: ./pages/home/myDetail/enquiryDetail.vue?vue&type=script&lang=js
 /* harmony default export */ var myDetail_enquiryDetailvue_type_script_lang_js = (enquiryDetailvue_type_script_lang_js); 
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(2);

// CONCATENATED MODULE: ./pages/home/myDetail/enquiryDetail.vue



function injectStyles (context) {
  
  var style0 = __webpack_require__(367)
if (style0.__inject__) style0.__inject__(context)
var style1 = __webpack_require__(368)
if (style1.__inject__) style1.__inject__(context)

}

/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  myDetail_enquiryDetailvue_type_script_lang_js,
  render,
  staticRenderFns,
  false,
  injectStyles,
  "0313a758",
  "7472943c"
  
)

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

/***/ })

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