You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3017 lines
122 KiB

require('../common/vendor.js');(global["webpackJsonp"] = global["webpackJsonp"] || []).push([["package2/other/newLogisticsBill"],{
/***/ 905:
/*!*************************************************************************************!*\
!*** C://distribution-uni/main.js?{"page":"package2%2Fother%2FnewLogisticsBill"} ***!
\*************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(wx, createPage) {
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
__webpack_require__(/*! uni-pages */ 26);
var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
var _newLogisticsBill = _interopRequireDefault(__webpack_require__(/*! ./package2/other/newLogisticsBill.vue */ 906));
// @ts-ignore
wx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;
createPage(_newLogisticsBill.default);
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"], __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["createPage"]))
/***/ }),
/***/ 906:
/*!******************************************************************!*\
!*** C://distribution-uni/package2/other/newLogisticsBill.vue ***!
\******************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _newLogisticsBill_vue_vue_type_template_id_243adc84___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./newLogisticsBill.vue?vue&type=template&id=243adc84& */ 907);
/* harmony import */ var _newLogisticsBill_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./newLogisticsBill.vue?vue&type=script&lang=js& */ 909);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _newLogisticsBill_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _newLogisticsBill_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var _newLogisticsBill_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./newLogisticsBill.vue?vue&type=style&index=0&lang=scss& */ 911);
/* harmony import */ var _HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../软件/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js */ 38);
var renderjs
/* normalize component */
var component = Object(_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__["default"])(
_newLogisticsBill_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
_newLogisticsBill_vue_vue_type_template_id_243adc84___WEBPACK_IMPORTED_MODULE_0__["render"],
_newLogisticsBill_vue_vue_type_template_id_243adc84___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"],
false,
null,
null,
null,
false,
_newLogisticsBill_vue_vue_type_template_id_243adc84___WEBPACK_IMPORTED_MODULE_0__["components"],
renderjs
)
component.options.__file = "package2/other/newLogisticsBill.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);
/***/ }),
/***/ 907:
/*!*************************************************************************************************!*\
!*** C://distribution-uni/package2/other/newLogisticsBill.vue?vue&type=template&id=243adc84& ***!
\*************************************************************************************************/
/*! exports provided: render, staticRenderFns, recyclableRender, components */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_17_0_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_newLogisticsBill_vue_vue_type_template_id_243adc84___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../软件/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../软件/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--17-0!../../../../软件/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../软件/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../软件/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../软件/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./newLogisticsBill.vue?vue&type=template&id=243adc84& */ 908);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "render", function() { return _HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_17_0_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_newLogisticsBill_vue_vue_type_template_id_243adc84___WEBPACK_IMPORTED_MODULE_0__["render"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return _HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_17_0_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_newLogisticsBill_vue_vue_type_template_id_243adc84___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return _HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_17_0_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_newLogisticsBill_vue_vue_type_template_id_243adc84___WEBPACK_IMPORTED_MODULE_0__["recyclableRender"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "components", function() { return _HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_17_0_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_newLogisticsBill_vue_vue_type_template_id_243adc84___WEBPACK_IMPORTED_MODULE_0__["components"]; });
/***/ }),
/***/ 908:
/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--17-0!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!C://distribution-uni/package2/other/newLogisticsBill.vue?vue&type=template&id=243adc84& ***!
\*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! exports provided: render, staticRenderFns, recyclableRender, components */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return staticRenderFns; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return recyclableRender; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "components", function() { return components; });
var components
try {
components = {
uniDataSelect: function () {
return Promise.all(/*! import() | uni_modules/uni-data-select/components/uni-data-select/uni-data-select */[__webpack_require__.e("common/vendor"), __webpack_require__.e("uni_modules/uni-data-select/components/uni-data-select/uni-data-select")]).then(__webpack_require__.bind(null, /*! @/uni_modules/uni-data-select/components/uni-data-select/uni-data-select.vue */ 1188))
},
uniIcons: function () {
return Promise.all(/*! import() | uni_modules/uni-icons/components/uni-icons/uni-icons */[__webpack_require__.e("common/vendor"), __webpack_require__.e("uni_modules/uni-icons/components/uni-icons/uni-icons")]).then(__webpack_require__.bind(null, /*! @/uni_modules/uni-icons/components/uni-icons/uni-icons.vue */ 1065))
},
uniPopup: function () {
return __webpack_require__.e(/*! import() | uni_modules/uni-popup/components/uni-popup/uni-popup */ "uni_modules/uni-popup/components/uni-popup/uni-popup").then(__webpack_require__.bind(null, /*! @/uni_modules/uni-popup/components/uni-popup/uni-popup.vue */ 1106))
},
uniCard: function () {
return __webpack_require__.e(/*! import() | uni_modules/uni-card/components/uni-card/uni-card */ "uni_modules/uni-card/components/uni-card/uni-card").then(__webpack_require__.bind(null, /*! @/uni_modules/uni-card/components/uni-card/uni-card.vue */ 1091))
},
uniForms: function () {
return Promise.all(/*! import() | uni_modules/uni-forms/components/uni-forms/uni-forms */[__webpack_require__.e("common/vendor"), __webpack_require__.e("uni_modules/uni-forms/components/uni-forms/uni-forms")]).then(__webpack_require__.bind(null, /*! @/uni_modules/uni-forms/components/uni-forms/uni-forms.vue */ 1230))
},
}
} catch (e) {
if (
e.message.indexOf("Cannot find module") !== -1 &&
e.message.indexOf(".vue") !== -1
) {
console.error(e.message)
console.error("1. 排查组件名称拼写是否正确")
console.error(
"2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"
)
console.error(
"3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件"
)
} else {
throw e
}
}
var render = function () {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
var g0 = _vm.faBookShow && _vm.faBookShow ? _vm.customList.length : null
var g1 = _vm.shouBookShow && _vm.shouBookShow ? _vm.customList.length : null
var g2 = _vm.devicesList.length
var g3 = _vm.orderList.length
if (!_vm._isMounted) {
_vm.e0 = function ($event) {
_vm.faBookShow = false
}
_vm.e1 = function ($event) {
_vm.shouBookShow = false
}
_vm.e2 = function ($event) {
return _vm.$refs.popup.close()
}
_vm.e3 = function ($event) {
return _vm.$refs.inputDialog.close()
}
_vm.e4 = function ($event) {
return _vm.$refs.inputDialog.close()
}
}
_vm.$mp.data = Object.assign(
{},
{
$root: {
g0: g0,
g1: g1,
g2: g2,
g3: g3,
},
}
)
}
var recyclableRender = false
var staticRenderFns = []
render._withStripped = true
/***/ }),
/***/ 909:
/*!*******************************************************************************************!*\
!*** C://distribution-uni/package2/other/newLogisticsBill.vue?vue&type=script&lang=js& ***!
\*******************************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_newLogisticsBill_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../软件/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib!../../../../软件/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--13-1!../../../../软件/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../软件/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../软件/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./newLogisticsBill.vue?vue&type=script&lang=js& */ 910);
/* harmony import */ var _HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_newLogisticsBill_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_newLogisticsBill_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_newLogisticsBill_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_newLogisticsBill_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony default export */ __webpack_exports__["default"] = (_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_newLogisticsBill_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
/***/ }),
/***/ 910:
/*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/babel-loader/lib!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--13-1!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!C://distribution-uni/package2/other/newLogisticsBill.vue?vue&type=script&lang=js& ***!
\**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(uni, wx) {
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 13);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 28));
var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 30));
var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
var blesdk = _interopRequireWildcard(__webpack_require__(/*! @/components/kk-printer/utils/bluetoolth.js */ 441));
var _printUtilGBK = _interopRequireDefault(__webpack_require__(/*! @/components/kk-printer/utils/printUtil-GBK.js */ 474));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var plugin = requirePlugin("WechatSI");
var manager = plugin.getRecordRecognitionManager();
var _default = {
data: function data() {
return {
faBookShow: false,
weightCount: 1,
printcount: '',
shouBookShow: false,
moreShouList: [],
weigthAdd: '',
moreFaList: [],
newFa: false,
orderList: [],
daodaList: [],
newShou: false,
linshiPrice: 0,
addForm: {
nickName: '',
mobile: '',
address: ''
},
pageNum: 1,
bufferData: [],
voiceText: '',
addressType: '',
isVoice: false,
priceCurrent: 0,
priceItems: [{
value: 0,
name: '否'
}, {
value: 1,
name: '是'
}],
arrivalStationList: [],
goStationList: [],
payTypeList: [{
value: "0",
text: "现金"
}, {
value: "1",
text: "月付"
}, {
value: "2",
text: "提付"
}],
userData: {},
//是否正在搜索设备
isSearching: false,
//是否显示蓝牙列表
isShowSearch: false,
//设备列表
devicesList: [],
//连接的设备ID
deviceId: '',
//根据设备ID获取的服务
services: '',
//获取特征值时返回的三要素
serviceId: '',
deviceType: 'ios',
voiceDataPrint: {},
voiceData: {
createBy: uni.getStorageSync('contacts'),
companyId: uni.getStorageSync('transCompany'),
companyName: uni.getStorageSync('companyName'),
imagePath: '',
weightHistory: '',
circuitId: '',
// 线路id
circuitName: '',
// 线路名称
shipperName: '',
// 发货人名-
shipperMobile: '',
// 发货人电话-
shipperAddress: '',
// 发货人地址
receiverName: '',
// 收货人名-
receiverMobile: '',
// 收货人电话-
receiverAddress: '',
// 收货人地址
newReceiverName: "",
newShipperName: "",
goStationId: '',
// 出发站id-
goStationName: '沧州',
// 出发站名称-
arrivalStationId: '',
// 到达站id-
arrivalStationName: '',
// 到达站名称-
landingFee: 0,
//落地费
deliveryFee: 0,
//送货费
weight: 0,
// 重量-
count: 1,
// 件数-
freight: 0,
// 运输费-
premium: 0,
// 保费-
transitFee: 0,
// 中转费
transferAddition: 0,
paymentForGoods: 0,
// 代收货款
tips: 0,
// 拉包小费
methodOfSettlement: "2",
// 结算方式
cost: 0,
// 工本费
allCost: 0,
// 总费用
orderNumber: '',
// 票号
objectName: '',
// 物体名称
remark: '',
// 备注
receivingUserId: '',
// 收货站人id
receivingUserName: '' // 收货站人名称
},
recordState: false,
userList: [],
isEdit: false,
transferStationList: [],
productPicture: [],
customList: [],
shopRemark: []
};
},
onShow: function onShow() {
var that = this;
uni.getSystemInfo({
success: function success(res) {
that.deviceType = res.osName;
},
fail: function fail(err) {}
});
if (uni.getStorageSync('transCompany') == '1751796589518786560' || uni.getStorageSync('transCompany') == '1899371352842964992' || uni.getStorageSync('transCompany') == '1782981706819702784') {
// 初始化蓝牙模块
wx.openBluetoothAdapter({
//111
mode: 'central',
success: function success(res2) {
wx.createBLEConnection({
//555
deviceId: uni.getStorageSync('deviceId'),
// 搜索到设备的 deviceId
success: function success() {},
fail: function fail(res) {}
});
},
fail: function fail(res) {
if (res.errCode == '10001') {
// that.tui.toast('请打开蓝牙后,再进行连接')
uni.showToast({
duration: 2000,
title: "请打开蓝牙后,再进行连接",
icon: 'none',
mask: true
});
} else {
that.tui.toast('连接失败,请重启蓝牙或删除小程序重新进入-1');
that.isShowSearch = true;
}
setTimeout(function (res) {
uni.hideLoading();
}, 2000);
}
});
}
uni.authorize({
scope: 'scope.record',
success: function success() {},
fail: function fail() {
this.tui.toast("您未授权,语音功能可能会出现错误");
}
});
if (this.userData) {
if (this.userData.userType == 'ji') {
this.voiceData.shipperName = this.userData.shipperOrReceiverName;
this.voiceData.shipperMobile = this.userData.mobile;
this.voiceData.shipperAddress = this.userData.addressInfo;
this.voiceData.shipperId = this.userData.id;
} else if (this.userData.userType == 'shou') {
this.voiceData.receiverName = this.userData.shipperOrReceiverName;
this.voiceData.receiverMobile = this.userData.mobile;
this.voiceData.receiverAddress = this.userData.addressInfo;
this.voiceData.receiverId = this.userData.id;
}
}
this.getStationByCompanyId();
this.getGoStationList();
this.getUserList();
},
onLoad: function onLoad(option) {
if (uni.getStorageSync('remark')) {
var remark = uni.getStorageSync('remark');
this.shopRemark = remark.split('\n');
}
if (option.editData) {
this.isEdit = true;
var editData = JSON.parse(option.editData);
this.voiceData.imagePath = editData.imagePath;
this.voiceData.circuitId = editData.circuitId;
this.voiceData.circuitName = editData.circuitName;
this.voiceData.shipperName = editData.shipperName;
this.voiceData.shipperMobile = editData.shipperMobile;
this.voiceData.shipperAddress = editData.shipperAddress;
this.voiceData.receiverName = editData.receiverName;
this.voiceData.receiverMobile = editData.receiverMobile;
this.voiceData.receiverAddress = editData.receiverAddress;
this.voiceData.goStationId = editData.goStationId;
this.voiceData.goStationName = editData.goStationName;
this.voiceData.arrivalStationId = editData.arrivalStationId;
this.voiceData.arrivalStationName = editData.arrivalStationName;
this.voiceData.landingFee = editData.landingFee;
this.voiceData.deliveryFee = editData.deliveryFee;
this.voiceData.weight = editData.weight;
this.voiceData.count = editData.count;
this.voiceData.freight = editData.freight;
this.voiceData.premium = editData.premium;
this.voiceData.transitFee = editData.transitFee;
this.voiceData.paymentForGoods = editData.paymentForGoods;
this.voiceData.tips = editData.tips;
this.voiceData.methodOfSettlement = editData.methodOfSettlement;
this.voiceData.cost = editData.cost;
this.voiceData.allCost = editData.allCost;
this.voiceData.orderNumber = editData.orderNumber;
this.voiceData.objectName = editData.objectName;
this.voiceData.remark = editData.remark;
this.voiceData.weightHistory = editData.weightHistory;
this.voiceData.receivingUserId = editData.receivingUserId;
this.voiceData.receivingUserName = editData.receivingUserName;
this.voiceData.id = editData.id;
this.getStationByCompanyId();
this.arrivalStationChange(editData.arrivalStationId);
}
},
methods: {
countPrint: function countPrint() {
return this.yNum += 40;
},
doNothing: function doNothing() {
return;
},
addWeight: function addWeight() {
if (this.voiceData.weightHistory == '' || this.voiceData.weightHistory == undefined) {
this.voiceData.weightHistory = this.voiceData.weight + '+';
}
this.$refs.inputDialog.open();
},
addWeight1: function addWeight1(e) {
if (e.target.value > 0) {
if (e.target.value.indexOf('.') == -1 && String(this.voiceData.weight).indexOf('.') == -1) {
this.voiceData.weight = Number(this.voiceData.weight) + Number(e.target.value);
} else {
this.voiceData.weight = (Number(this.voiceData.weight) + Number(e.target.value)).toFixed(2);
}
this.voiceData.weightHistory += e.target.value + '+';
}
},
priceChange: function priceChange(e, index) {
var _this2 = this;
uni.showLoading({
title: '加载中...',
mask: true
});
var that = this;
this.voiceData.transferAddition = e;
that.priceCurrent = index;
if (e == 0) {
this.voiceData.transitFee = 0;
for (var i = 0; i < this.transferStationList.length; i++) {
this.voiceData.transitFee = (Number(this.voiceData.transitFee) + Number(this.transferStationList[i].transitFee) * Number(this.voiceData.weight)).toFixed(2);
}
} else if (e == 1) {
this.voiceData.transitFee = 0;
}
setTimeout(function (res) {
_this2.getAllCost();
uni.hideLoading();
}, 500);
this.$forceUpdate();
},
//查看地址簿
addressBook: function addressBook(type) {
uni.navigateTo({
url: '/package2/other/logisticsAddressBook?userType=' + type
});
},
inputFocus: function inputFocus(e, type) {
if (e.target.value != '') {
this.getCustomList(e.target.value, type);
} else {
this.customList = [];
}
if (type == 'fa') {
this.newFa = true;
this.shipperId = '';
this.faBookShow = true;
} else if (type == 'shou') {
this.newShou = true;
this.receiverId = '';
this.shouBookShow = true;
}
},
checkNewPeople: function checkNewPeople(type) {
if (type == 'fa') {
this.newFa = true;
this.voiceData.shipperName = this.voiceData.newShipperName;
this.voiceData.shipperMobile = this.voiceData.newShipperMobile;
this.voiceData.shipperId = "";
} else {
this.newShou = true;
this.voiceData.receiverName = this.voiceData.newReceiverName;
this.voiceData.receiverMobile = this.voiceData.newReceiverMobile;
this.voiceData.receiverId = "";
}
this.$forceUpdate();
},
kuaijieName: function kuaijieName(name) {
if (name == 'fuzhuang') {
this.voiceData.objectName = '服装';
} else if (name == 'xiezi') {
this.voiceData.objectName = '鞋子';
} else {
this.voiceData.objectName = '其他';
}
},
//计算总金额
getAllCost: function getAllCost(e, type) {
if (type == 'yunshufei') {
if (this.linshiPrice == e.target.value) {
this.voiceData.freight = e.target.value;
} else {
if (e.target.value == '') {
this.voiceData.freight = this.linshiPrice;
} else {
this.voiceData.freight = e.target.value;
}
}
} else if (type == 'zhongzhuanfei') {
if (this.linshiPrice == e.target.value) {
this.voiceData.transitFee = e.target.value;
} else {
if (e.target.value == '') {
this.voiceData.transitFee = this.linshiPrice;
} else {
this.voiceData.transitFee = e.target.value;
}
}
} else if (type == 'luodifei') {
if (this.linshiPrice == e.target.value) {
this.voiceData.landingFee = Number(e.target.value);
} else {
if (e.target.value == '') {
this.voiceData.landingFee = Number(this.linshiPrice);
} else {
this.voiceData.landingFee = Number(e.target.value);
}
}
} else if (type == 'zhongzhuanfei') {
if (this.linshiPrice == e.target.value) {
this.voiceData.songhuofei = e.target.value;
} else {
if (e.target.value == '') {
this.voiceData.songhuofei = this.linshiPrice;
} else {
this.voiceData.songhuofei = e.target.value;
}
}
} else if (type == 'baofei') {
if (this.linshiPrice == e.target.value) {
this.voiceData.premium = e.target.value;
} else {
if (e.target.value == '') {
this.voiceData.premium = this.linshiPrice;
} else {
this.voiceData.premium = e.target.value;
}
}
} else if (type == 'xiaofei') {
if (this.linshiPrice == e.target.value) {
this.voiceData.tips = e.target.value;
} else {
if (e.target.value == '') {
this.voiceData.tips = this.linshiPrice;
} else {
this.voiceData.tips = e.target.value;
}
}
} else if (type == 'gongbenfei') {
if (this.linshiPrice == e.target.value) {
this.voiceData.cost = e.target.value;
} else {
if (e.target.value == '') {
this.voiceData.cost = this.linshiPrice;
} else {
this.voiceData.cost = e.target.value;
}
}
} else if (type == 'songhuofei') {
if (this.linshiPrice == e.target.value) {
this.voiceData.deliveryFee = e.target.value;
} else {
if (e.target.value == '') {
this.voiceData.deliveryFee = this.linshiPrice;
} else {
this.voiceData.deliveryFee = e.target.value;
}
}
}
if (type != 'zongfeiyong') {
this.voiceData.allCost = Number(Number(this.voiceData.landingFee) + Number(this.voiceData.deliveryFee) + Number(this.voiceData.freight) + Number(this.voiceData.premium) + Number(this.voiceData.transitFee) + Number(this.voiceData.tips) + Number(this.voiceData.cost)).toFixed(2);
}
},
//获取员工列表
getUserList: function getUserList() {
var _this3 = this;
uni.request({
url: this.tui.interfaceUrl() + '/app/logisticsUser/getLogisticsUserPageList',
data: {
pageNum: 1,
pageSize: "100",
companyId: uni.getStorageSync('transCompany'),
nickName: ""
},
header: {
'content-type': 'application/json',
'appWLToken': this.tui.getToken()
},
method: 'POST',
//'GET','POST'
dataType: 'json',
success: function success(res) {
if (res.data.code == 401) {
uni.clearStorage();
uni.navigateTo({
url: '/package2/login/login'
});
}
if (res.data.code == 200) {
for (var i = 0; i < res.data.result.records.length; i++) {
res.data.result.records[i].value = res.data.result.records[i].id;
res.data.result.records[i].text = res.data.result.records[i].nickName;
if (res.data.result.records[i].userRole == '2') {
_this3.voiceData.receivingUserId = res.data.result.records[i].id;
_this3.voiceData.receivingUserName = res.data.result.records[i].nickName;
}
}
setTimeout(function (res1) {
_this3.userList = res.data.result.records;
}, 200);
}
},
fail: function fail(res) {
_this3.tui.toast("网络不给力,请稍后再试~");
}
});
},
getOrderList: function getOrderList() {
var _this4 = this;
var that = this;
uni.request({
url: this.tui.interfaceUrl() + '/app/logisticsOrder/getLogisticsOrderPageList',
data: {
//stationId
pageNum: 1,
pageSize: "100",
companyId: uni.getStorageSync('transCompany'),
orderStatus: 2
},
header: {
'content-type': 'application/json',
'appWLToken': this.tui.getToken()
},
method: 'POST',
//'GET','POST'
dataType: 'json',
success: function success(res) {
_this4.status = 'nomore';
if (res.data.code == 401) {
uni.clearStorage();
uni.navigateTo({
url: '/package2/login/login'
});
}
if (res.data.code == 200) {
if (_this4.pages == 1) {
_this4.orderList = res.data.result.records;
} else {
_this4.orderList = [].concat((0, _toConsumableArray2.default)(_this4.orderList), (0, _toConsumableArray2.default)(res.data.result.records));
}
_this4.pages = res.data.result.pages;
}
},
fail: function fail(res) {
_this4.tui.toast("网络不给力,请稍后再试~");
}
});
},
checkName: function checkName(item, type) {
if (type == 'fa') {
this.newFa = false;
this.voiceData.shipperName = item.shipperOrReceiverName;
this.voiceData.shipperMobile = item.mobile;
this.voiceData.shipperAddress = item.addressInfo;
this.voiceData.shipperId = item.id;
} else {
this.newShou = false;
this.voiceData.receiverName = item.shipperOrReceiverName;
this.voiceData.receiverMobile = item.mobile;
this.voiceData.receiverAddress = item.addressInfo;
this.voiceData.receiverId = item.id;
}
this.shouBookShow = false;
this.faBookShow = false;
this.$forceUpdate();
},
getGuadan: function getGuadan() {
this.getOrderList();
this.$refs.shopPopup.open('bottom');
},
sreachName: function sreachName(e, type) {
if (type == 'ji') {
this.voiceData.shipperName = e.detail.value;
this.getCustomList(e.detail.value, type);
} else {
this.voiceData.receiverName = e.detail.value;
this.getCustomList(e.detail.value, type);
}
},
//获取地址簿列表
getCustomList: function getCustomList(name, type) {
var _this5 = this;
this.customList = [];
uni.request({
url: this.tui.interfaceUrl() + '/app/logisticsAddressBook/getLogisticsAddressBookPageList',
data: {
pageNum: this.pageNum,
pageSize: 100,
keyWord: name,
companyId: uni.getStorageSync('transCompany'),
addressType: type == 'ji' ? '1' : type == 'shou' ? '2' : ''
},
header: {
'content-type': 'application/json',
'appWLToken': this.tui.getToken()
},
method: 'POST',
dataType: 'json',
success: function success(res) {
_this5.status = 'loading';
if (res.data.code == 401) {
uni.clearStorage();
uni.navigateTo({
url: '/package2/login/login'
});
}
if (res.data.code == 200) {
if (res.data.result.records.length == 0) {
if (type == 'ji') {
_this5.newFa = true;
_this5.voiceData.shipperId = '';
_this5.voiceData.shipperMobile = '';
_this5.voiceData.shipperAddress = '';
} else {
_this5.newShou = true;
_this5.voiceData.receiverId = '';
_this5.voiceData.receiverMobile = '';
_this5.voiceData.receiverAddress = '';
}
} else {
_this5.status = 'nomore';
if (_this5.pages == 1) {
_this5.customList = res.data.result.records;
} else {
_this5.customList = [].concat((0, _toConsumableArray2.default)(_this5.customList), (0, _toConsumableArray2.default)(res.data.result.records));
}
_this5.pages = res.data.result.pages;
}
}
},
fail: function fail(res) {
_this5.tui.toast("网络不给力,请稍后再试~");
}
});
},
getStationByCompanyId: function getStationByCompanyId() {
var _this6 = this;
uni.request({
url: this.tui.interfaceUrl() + '/app/logisticsStation/getLogisticsStationListByCompanyId',
data: {
companyId: uni.getStorageSync('transCompany')
},
header: {
'content-type': 'application/json',
'appWLToken': this.tui.getToken()
},
method: 'POST',
//'GET','POST'
dataType: 'json',
success: function success(res) {
if (res.data.code == 401) {
uni.clearStorage();
uni.navigateTo({
url: '/package2/login/login'
});
}
if (res.data.code == 200) {
for (var i = 0; i < res.data.result.length; i++) {
_this6.daodaList.push(res.data.result[i].stationName);
res.data.result[i].value = res.data.result[i].id;
res.data.result[i].text = res.data.result[i].stationName + '(' + res.data.result[i].freightRules + '元/每公斤)';
if (_this6.voiceData.arrivalStationId == res.data.result[i].id) {
_this6.voiceData.arrivalStationId = res.data.result[i].id;
_this6.voiceData.arrivalStationName = res.data.result[i].stationName;
_this6.voiceData.freight = (_this6.voiceData.weight * res.data.result[i].freightRules).toFixed(2);
_this6.voiceData.circuitId = res.data.result[i].circuitId;
_this6.voiceData.freightRules = res.data.result[i].freightRules;
_this6.voiceData.landingFee = Number(res.data.result[i].landingFeeRules);
_this6.voiceData.deliveryFee = res.data.result[i].deliveryFeeRules;
}
}
setTimeout(function (res1) {
_this6.arrivalStationList = res.data.result;
}, 200);
}
},
fail: function fail(res) {
_this6.tui.toast("网络不给力,请稍后再试~");
}
});
},
getGoStationList: function getGoStationList() {
var _this7 = this;
uni.request({
url: this.tui.interfaceUrl() + '/app/logisticsStation/getLogisticsStationListByCompanyId',
data: {
companyId: uni.getStorageSync('transCompany')
},
header: {
'content-type': 'application/json',
'appWLToken': this.tui.getToken()
},
method: 'POST',
//'GET','POST'
dataType: 'json',
success: function success(res) {
if (res.data.code == 401) {
uni.clearStorage();
uni.navigateTo({
url: '/package2/login/login'
});
}
if (res.data.code == 200) {
for (var i = 0; i < res.data.result.length; i++) {
res.data.result[i].value = res.data.result[i].id;
res.data.result[i].text = res.data.result[i].stationName;
if (res.data.result[i].stationName == '沧州') {
_this7.voiceData.goStationId = res.data.result[i].id;
_this7.voiceData.goStationName = res.data.result[i].stationName;
}
}
setTimeout(function (res1) {
_this7.goStationList = res.data.result;
}, 200);
}
},
fail: function fail(res) {
_this7.tui.toast("网络不给力,请稍后再试~");
}
});
},
//按住语音识别,开始
kaishi: function kaishi() {
if (this.isVoice == false) {
this.recordState = true;
uni.vibrateShort();
manager.start({
duration: 60000,
lang: "zh_CN"
});
}
},
//松开语音识别,结束
jieshu: function jieshu() {
this.recordState = false;
manager.stop();
},
extractInfo: function extractInfo(str) {
var info = {};
var regexes = [{
name: 'shipperName',
regex: /发货人:(.*?),/
}, {
name: 'shipperMobile',
regex: /发货电话:(.*?),/
}, {
name: 'receiverName',
regex: /收货人:(.*?),/
}, {
name: 'receiverMobile',
regex: /收货电话:(.*?),/
}, {
name: 'arrivalStationName',
regex: /到达站:(.*),/
}, {
name: 'arrivalStationName',
regex: /物品名称:(.*),/
}, {
name: 'weight',
regex: /重量:(.*?),/
}, {
name: 'count',
regex: /数量:(.*?),/
}, {
name: 'tips',
regex: /小费:(.*?),/
}, {
name: 'premium',
regex: /保费:(.*?)/
}];
regexes.forEach(function (_ref) {
var name = _ref.name,
regex = _ref.regex;
var match = str.match(regex);
if (match && match[1]) {
// 去除可能的前后空格
info[name] = match[1].trim();
}
});
return info;
},
//切换结算方式
payTypeChange: function payTypeChange(e) {
for (var i = 0; i < this.payTypeList.length; i++) {
if (this.payTypeList[i].value == e) {
this.voiceData.methodOfSettlement = e;
}
}
},
arrivalStationChange: function arrivalStationChange(e) {
var _this8 = this;
for (var i = 0; i < this.arrivalStationList.length; i++) {
if (this.arrivalStationList[i].id == e) {
this.voiceData.arrivalStationId = this.arrivalStationList[i].id;
this.voiceData.arrivalStationName = this.arrivalStationList[i].stationName;
this.voiceData.freight = (this.voiceData.weight * this.arrivalStationList[i].freightRules).toFixed(2);
this.voiceData.circuitId = this.arrivalStationList[i].circuitId;
this.voiceData.freightRules = this.arrivalStationList[i].freightRules;
this.voiceData.landingFee = Number(this.arrivalStationList[i].landingFeeRules);
this.voiceData.deliveryFee = this.arrivalStationList[i].deliveryFeeRules;
}
}
setTimeout(function (res) {
_this8.getTransferStation();
}, 300);
},
getTransferStation: function getTransferStation() {
var _this9 = this;
uni.request({
url: this.tui.interfaceUrl() + '/app/logisticsTransferStation/getLogisticsTransferStationPageList',
data: {
arrivalStation: "",
goStation: "",
pageNum: 1,
pageSize: 100,
stationId: this.voiceData.arrivalStationId
},
header: {
'content-type': 'application/json',
'appWLToken': this.tui.getToken()
},
method: 'POST',
//'GET','POST'
dataType: 'json',
success: function success(res) {
if (res.data.code == 401) {
uni.clearStorage();
uni.navigateTo({
url: '/package2/login/login'
});
}
if (res.data.code == 200) {
_this9.voiceData.transitFee = 0;
_this9.transferStationList = res.data.result.records;
if (_this9.priceCurrent == 0) {
for (var i = 0; i < res.data.result.records.length; i++) {
_this9.voiceData.transitFee += Number(res.data.result.records[i].transitFee) * Number(_this9.voiceData.weight).toFixed(2);
}
}
setTimeout(function (res1) {
_this9.getAllCost();
}, 300);
}
},
fail: function fail(res) {
_this9.tui.toast("网络不给力,请稍后再试~");
}
});
},
goAddOrderPage: function goAddOrderPage(data) {
this.$refs.shopPopup.close();
uni.navigateTo({
url: '/package2/other/newLogisticsBill?editData=' + JSON.stringify(data)
});
},
delOrder: function delOrder(item) {
this.$refs.shopPopup.close();
var that = this;
uni.showModal({
title: "提示",
content: "确定删除此条信息吗?",
success: function success(res) {
uni.showLoading({
title: '加载中...'
});
if (res.confirm) {
uni.request({
url: that.tui.interfaceUrl() + '/app/logisticsOrder/deleteLogisticsOrder',
data: {
id: item.id
},
header: {
'content-type': 'application/x-www-form-urlencoded',
'appWLToken': that.tui.getToken()
},
method: 'POST',
//'GET','POST'
dataType: 'json',
success: function success(res) {
if (res.data.code == 401) {
uni.clearStorage();
uni.navigateTo({
url: '/package2/login/login'
});
}
if (res.data.code == 200) {
uni.showToast({
title: '删除成功'
});
setTimeout(function (res1) {
that.pageNum = 1;
that.orderList = [];
that.getOrderList();
that.getAllNum();
}, 500);
}
},
fail: function fail(res) {
that.tui.toast("网络不给力,请稍后再试~");
}
});
}
setTimeout(function (res) {
uni.hideLoading();
}, 500);
}
});
},
goStationChange: function goStationChange(e) {
for (var i = 0; i < this.goStationList.length; i++) {
if (this.goStationList[i].id == e) {
this.voiceData.goStationId = this.goStationList[i].id;
this.voiceData.goStationName = this.goStationList[i].stationName;
}
}
},
stationUserChange: function stationUserChange(e) {
for (var i = 0; i < this.userList.length; i++) {
if (this.userList[i].id == e) {
this.voiceData.receivingUserId = this.userList[i].id;
this.voiceData.receivingUserName = this.userList[i].nickName;
}
}
},
freightCount: function freightCount(e) {
if (this.linshiPrice == e.target.value) {
this.voiceData.weight = e.target.value;
} else {
if (e.target.value == '') {
this.voiceData.weight = this.linshiPrice;
} else {
this.voiceData.weight = e.target.value;
}
}
this.voiceData.weightHistory = this.voiceData.weight + '+';
this.voiceData.freight = Number((this.voiceData.freightRules == undefined ? 0 : this.voiceData.freightRules) * this.voiceData.weight).toFixed(2);
this.voiceData.transitFee = 0;
if (this.priceCurrent == 0) {
for (var i = 0; i < this.transferStationList.length; i++) {
this.voiceData.transitFee = (Number(this.voiceData.transitFee) + Number(this.transferStationList[i].transitFee) * Number(this.voiceData.weight)).toFixed(2);
}
}
this.getAllCost();
},
clickGetOneShou: function clickGetOneShou(item) {
this.voiceData.receiverName = item.shipperOrReceiverName;
this.voiceData.receiverMobile = item.mobile;
this.voiceData.receiverId = item.id;
this.voiceData.receiverAddress = item.addressInfo;
if (item.id == '') {
this.newShou = true;
}
this.$forceUpdate();
this.$refs.moreShouPopup.close();
},
clickGetOneFa: function clickGetOneFa(item) {
this.voiceData.shipperName = item.shipperOrReceiverName;
this.voiceData.shipperMobile = item.mobile;
this.voiceData.shipperId = item.id;
this.voiceData.shipperAddress = item.addressInfo;
if (item.id == '') {
this.newFa = true;
}
this.$forceUpdate();
this.$refs.moreFaPopup.close();
},
yuyinChange: function yuyinChange() {
this.isVoice = false;
},
//去掉空格和换行
trimWhitespace: function trimWhitespace(str) {
return str.replace(/\s+/g, '');
},
replaceCharAfterNumber: function replaceCharAfterNumber(str, charToFind, charToReplace) {
// 正则表达式匹配字符前是否有数字,并且该字符与charToFind相同
var regex = new RegExp("\\d".concat(charToFind), 'g');
// 使用replace方法进行替换
return str.replace(regex, function (match) {
// 将匹配到的字符中的指定字符替换为charToReplace
return match.replace(charToFind, charToReplace);
});
},
timestampToDatetime: function timestampToDatetime() {
var dateObj = new Date();
var year = dateObj.getFullYear();
var month = dateObj.getMonth() + 1;
var day = dateObj.getDate();
var hours = dateObj.getHours();
var minutes = dateObj.getMinutes();
var seconds = dateObj.getSeconds();
return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds;
},
kuaijieFocus: function kuaijieFocus() {
this.kjFocus = this.voiceData.objectName;
this.voiceData.objectName = "";
},
kuaijieBlur: function kuaijieBlur() {
if (this.voiceData.objectName == "") {
this.voiceData.objectName = this.kjFocus;
}
},
obtainPrice: function obtainPrice(e, type, num, num1) {
this.linshiPrice = e.target.value;
if (type == 'zhongliang') {
this.voiceData.weight = '';
} else if (type == 'shuliang') {
this.voiceData.count = '';
} else if (type == 'yunshufei') {
this.voiceData.freight = '';
} else if (type == 'xiaofei') {
this.voiceData.tips = '';
} else if (type == 'zongfeiyong') {
this.voiceData.allCost = '';
} else if (type == 'baofei') {
this.voiceData.premium = '';
} else if (type == 'zhongzhuanfei') {
this.voiceData.transitFee = '';
} else if (type == 'luodifei') {
this.voiceData.landingFee = '';
} else if (type == 'songhuofei') {
this.voiceData.deliveryFee = '';
} else if (type == 'gongbenfei') {
this.voiceData.cost = '';
} else if (type == 'zhongliangAdd') {
this.weigthAdd = '';
}
},
getVoiceData: function getVoiceData() {
var _this10 = this;
if (this.voiceText == '') {
this.tui.toast('识别内容不能为空');
return;
}
uni.showLoading({
title: 'Ai识别中...'
});
var convertedStr = this.trimWhitespace(this.voiceText);
if (convertedStr.indexOf('点') != -1) {
convertedStr = this.replaceCharAfterNumber(convertedStr, '点', '.');
}
if (convertedStr.indexOf('发货人,') != -1) {
convertedStr = convertedStr.replace(/发货人,/g, '发货人');
}
if (convertedStr.indexOf('发货人::') != -1) {
convertedStr = convertedStr.replace(/发货人::/g, '发货人');
}
if (convertedStr.indexOf('发货人:') != -1) {
convertedStr = convertedStr.replace(/发货人:/g, '发货人');
}
if (convertedStr.indexOf('发货人') != -1) {
convertedStr = convertedStr.replace(/发货人/g, ',发货人:');
}
if (convertedStr.indexOf(',发货电话') != -1) {
convertedStr = convertedStr.replace(/,发货电话/g, '发货电话');
}
if (convertedStr.indexOf('发货电话,') != -1) {
convertedStr = convertedStr.replace(/发货电话,/g, '发货电话');
}
if (convertedStr.indexOf('发货电话::') != -1) {
convertedStr = convertedStr.replace(/发货电话::/g, '发货电话');
}
if (convertedStr.indexOf('发货电话:') != -1) {
convertedStr = convertedStr.replace(/发货电话:/g, '发货电话');
}
if (convertedStr.indexOf('发货电话') != -1) {
convertedStr = convertedStr.replace(/发货电话/g, ',发货电话:');
}
if (convertedStr.indexOf(',收货人') != -1) {
convertedStr = convertedStr.replace(/,收货人/g, '收货人');
}
if (convertedStr.indexOf('收货人,') != -1) {
convertedStr = convertedStr.replace(/收货人,/g, '收货人');
}
if (convertedStr.indexOf('收货人::') != -1) {
convertedStr = convertedStr.replace(/收货人::/g, '收货人');
}
if (convertedStr.indexOf('收货人:') != -1) {
convertedStr = convertedStr.replace(/收货人:/g, '收货人');
}
if (convertedStr.indexOf('收货人') != -1) {
convertedStr = convertedStr.replace(/收货人/g, ',收货人:');
}
if (convertedStr.indexOf(',收货电话') != -1) {
convertedStr = convertedStr.replace(/,收货电话/g, '收货电话');
}
if (convertedStr.indexOf('收货电话,') != -1) {
convertedStr = convertedStr.replace(/收货电话,/g, '收货电话');
}
if (convertedStr.indexOf('收货电话::') != -1) {
convertedStr = convertedStr.replace(/收货电话::/g, '收货电话');
}
if (convertedStr.indexOf('收货电话:') != -1) {
convertedStr = convertedStr.replace(/收货电话:/g, '收货电话');
}
if (convertedStr.indexOf('收货电话') != -1) {
convertedStr = convertedStr.replace(/收货电话/g, ',收货电话:');
}
if (convertedStr.indexOf(',重量') != -1) {
convertedStr = convertedStr.replace(/,重量/g, '重量');
}
if (convertedStr.indexOf('重量,') != -1) {
convertedStr = convertedStr.replace(/重量,/g, '重量');
}
if (convertedStr.indexOf('重量::') != -1) {
convertedStr = convertedStr.replace(/重量::/g, '重量');
}
if (convertedStr.indexOf('重量:') != -1) {
convertedStr = convertedStr.replace(/重量:/g, '重量');
}
if (convertedStr.indexOf('重量') != -1) {
convertedStr = convertedStr.replace(/重量/g, ',重量:');
}
if (convertedStr.indexOf(',数量') != -1) {
convertedStr = convertedStr.replace(/,数量/g, '数量');
}
if (convertedStr.indexOf('数量,') != -1) {
convertedStr = convertedStr.replace(/数量,/g, '数量');
}
if (convertedStr.indexOf('数量::') != -1) {
convertedStr = convertedStr.replace(/数量::/g, '数量');
}
if (convertedStr.indexOf('数量:') != -1) {
convertedStr = convertedStr.replace(/数量:/g, '数量');
}
if (convertedStr.indexOf('数量') != -1) {
convertedStr = convertedStr.replace(/数量/g, ',数量:');
}
if (convertedStr.indexOf(',小费') != -1) {
convertedStr = convertedStr.replace(/,小费/g, '小费');
}
if (convertedStr.indexOf('小费,') != -1) {
convertedStr = convertedStr.replace(/小费,/g, '小费');
}
if (convertedStr.indexOf('小费::') != -1) {
convertedStr = convertedStr.replace(/小费::/g, '小费');
}
if (convertedStr.indexOf('小费:') != -1) {
convertedStr = convertedStr.replace(/小费:/g, '小费');
}
if (convertedStr.indexOf('小费') != -1) {
convertedStr = convertedStr.replace(/小费/g, ',小费:');
}
if (convertedStr.indexOf(',保费') != -1) {
convertedStr = convertedStr.replace(/,保费/g, '保费');
}
if (convertedStr.indexOf('保费,') != -1) {
convertedStr = convertedStr.replace(/保费,/g, '保费');
}
if (convertedStr.indexOf('保费::') != -1) {
convertedStr = convertedStr.replace(/保费::/g, '保费');
}
if (convertedStr.indexOf('保费:') != -1) {
convertedStr = convertedStr.replace(/保费:/g, '保费');
}
if (convertedStr.indexOf('保费') != -1) {
convertedStr = convertedStr.replace(/保费/g, ',保费:');
}
if (convertedStr.indexOf(',物品') != -1) {
convertedStr = convertedStr.replace(/,物品/g, '物品');
}
if (convertedStr.indexOf('物品,') != -1) {
convertedStr = convertedStr.replace(/物品,/g, '物品');
}
if (convertedStr.indexOf('物品::') != -1) {
convertedStr = convertedStr.replace(/物品::/g, '物品');
}
if (convertedStr.indexOf('物品:') != -1) {
convertedStr = convertedStr.replace(/物品:/g, '物品');
}
if (convertedStr.indexOf('物品') != -1) {
convertedStr = convertedStr.replace(/物品/g, ',物品:');
}
if (convertedStr.indexOf(',到达站') != -1) {
convertedStr = convertedStr.replace(/,到达站/g, '到达站');
}
if (convertedStr.indexOf('到达站,') != -1) {
convertedStr = convertedStr.replace(/到达站,/g, '到达站');
}
if (convertedStr.indexOf('到达站::') != -1) {
convertedStr = convertedStr.replace(/到达站::/g, '到达站');
}
if (convertedStr.indexOf('到达站:') != -1) {
convertedStr = convertedStr.replace(/到达站:/g, '到达站');
}
if (convertedStr.indexOf('到达站') != -1) {
convertedStr = convertedStr.replace(/到达站/g, ",到达站:'");
if (convertedStr.charAt(convertedStr.length - 1) == '。' || convertedStr.charAt(convertedStr.length - 1) == ',') {
convertedStr = convertedStr.slice(0, -1);
}
convertedStr = convertedStr + "'";
}
if (convertedStr.indexOf('13行') != -1) {
convertedStr = convertedStr.replace(/13行/g, '十三行');
}
convertedStr = this.convertStringCorrectly(convertedStr);
convertedStr = this.spliceMsg(convertedStr);
if (convertedStr.indexOf(',') == 0) {
convertedStr = convertedStr.substr(1);
}
var now = new Date();
var year = now.getFullYear();
var month = now.getMonth() + 1;
var day = now.getDate();
var hour = now.getHours();
var minute = now.getMinutes();
var second = now.getSeconds();
var currentDate = year + '/' + month + '/' + day + ' ' + hour + ':' + minute + ':' + second;
this.$refs.popup.close();
uni.request({
url: this.tui.interfaceUrl() + '/purchaseOcrPicture/getLogisticsOrderOfAi',
data: {
questionMsg: convertedStr,
arrivalStation: JSON.stringify(this.daodaList)
},
header: {
'content-type': 'application/x-www-form-urlencoded',
'appWLToken': this.tui.getToken()
},
method: 'POST',
dataType: 'json',
success: function success(res) {
if (res.data.code == 401) {
uni.clearStorage();
uni.navigateTo({
url: '/package2/login/login'
});
}
if (res.data.code == 200) {
if (res.data.result.data[0].receiverList != null && res.data.result.data[0].receiverList.length > 1) {
_this10.newShou = false;
_this10.voiceData.newReceiverName = "";
_this10.voiceData.newReceiverMobile = "";
res.data.result.data[0].receiverList.push({
mobile: res.data.result.data[0].receiverMobile,
shipperOrReceiverName: res.data.result.data[0].receiverName,
id: ""
});
_this10.moreShouList = res.data.result.data[0].receiverList;
_this10.$refs.moreShouPopup.open();
}
if (res.data.result.data[0].shipperList != null && res.data.result.data[0].shipperList.length > 1) {
_this10.newFa = false;
_this10.voiceData.newShipperName = "";
_this10.voiceData.newShipperMobile = "";
res.data.result.data[0].shipperList.push({
mobile: res.data.result.data[0].shipperMobile,
shipperOrReceiverName: res.data.result.data[0].shipperName,
id: ""
});
_this10.moreFaList = res.data.result.data[0].shipperList;
_this10.$refs.moreFaPopup.open();
}
for (var key in res.data.result.data[0]) {
if (res.data.result.data[0][key] != '' && res.data.result.data[0][key] != null && res.data.result.data[0][key] != 0) {
if (res.data.result.data[0].arrivalStationName && key == 'arrivalStationName') {
_this10.pinyinMatch(res.data.result.data[0].arrivalStationName);
}
if (res.data.result.data[0].hasOwnProperty(key) && _this10.voiceData.hasOwnProperty(key) && res.data.result.data[0][key] != 'receiverName' && res.data.result.data[0][key] != 'receiverMobile' && res.data.result.data[0][key] != 'shipperName' && res.data.result.data[0][key] != 'shipperMobile') {
_this10.voiceData[key] = res.data.result.data[0][key];
}
if (res.data.result.data[0].receiverList != null && res.data.result.data[0].receiverList.length == 0) {
_this10.voiceData.receiverName = res.data.result.data[0].receiverName;
_this10.voiceData.receiverMobile = res.data.result.data[0].receiverMobile;
_this10.voiceData.newReceiverName = "";
_this10.voiceData.newReceiverMobile = "";
_this10.newShou = true;
} else if (res.data.result.data[0].receiverList != null && res.data.result.data[0].receiverList.length == 1) {
_this10.newShou = false;
_this10.voiceData.receiverName = res.data.result.data[0].receiverList[0].shipperOrReceiverName;
_this10.voiceData.receiverMobile = res.data.result.data[0].receiverList[0].mobile;
_this10.voiceData.receiverAddress = res.data.result.data[0].receiverList[0].addressInfo;
_this10.voiceData.receiverId = res.data.result.data[0].receiverList[0].id;
_this10.voiceData.newReceiverName = res.data.result.data[0].receiverName;
_this10.voiceData.newReceiverMobile = res.data.result.data[0].receiverMobile;
}
if (res.data.result.data[0].shipperList != null && res.data.result.data[0].shipperList.length == 0) {
_this10.voiceData.shipperName = res.data.result.data[0].shipperName;
_this10.voiceData.shipperMobile = res.data.result.data[0].shipperMobile;
_this10.newFa = true;
_this10.voiceData.newShipperName = "";
_this10.voiceData.newShipperMobile = "";
} else if (res.data.result.data[0].shipperList != null && res.data.result.data[0].shipperList.length == 1) {
_this10.voiceData.shipperName = res.data.result.data[0].shipperList[0].shipperOrReceiverName;
_this10.voiceData.shipperMobile = res.data.result.data[0].shipperList[0].mobile;
_this10.voiceData.shipperAddress = res.data.result.data[0].shipperList[0].addressInfo;
_this10.voiceData.shipperId = res.data.result.data[0].shipperList[0].id;
_this10.voiceData.newShipperName = res.data.result.data[0].shipperName;
_this10.voiceData.newShipperMobile = res.data.result.data[0].shipperMobile;
_this10.newFa = false;
}
_this10.$forceUpdate();
}
}
}
uni.hideLoading();
setTimeout(function (res) {
_this10.getAllCost();
}, 300);
},
fail: function fail(res) {
_this10.tui.toast("网络不给力,请稍后再试~");
uni.hideLoading();
}
});
},
//数量失去焦点
shuliangChange: function shuliangChange(e) {
if (this.linshiPrice == e.target.value) {
this.voiceData.count = e.target.value;
} else {
if (e.target.value == '') {
this.voiceData.count = this.linshiPrice;
} else {
this.voiceData.count = e.target.value;
}
}
},
pinyinMatch: function pinyinMatch(name) {
var _this11 = this;
if (name.indexOf('。') != -1) {
name = name.split('。')[0];
}
uni.request({
url: this.tui.interfaceUrl() + '/app/logisticsStation/getLogisticsStationPageList',
data: {
pageNum: 1,
pageSize: 10,
circuitId: "",
stationName: name
},
header: {
'content-type': 'application/json',
'appWLToken': this.tui.getToken()
},
method: 'POST',
dataType: 'json',
success: function success(res) {
if (res.data.code == 401) {
uni.clearStorage();
uni.navigateTo({
url: '/package2/login/login'
});
}
if (res.data.code == 200) {
if (res.data.result.records != '') {
for (var i = 0; i < _this11.arrivalStationList.length; i++) {
for (var m = 0; m < res.data.result.records.length; m++) {
if (_this11.arrivalStationList[i].id == res.data.result.records[m].id) {
_this11.voiceData.arrivalStationId = res.data.result.records[m].id;
_this11.voiceData.arrivalStationName = res.data.result.records[m].stationName;
_this11.arrivalStationChange(res.data.result.records[m].id);
}
}
}
} else {
_this11.tui.toast("当前到达站查无此信息,请确认");
}
}
},
fail: function fail(res) {
_this11.tui.toast("网络不给力,请稍后再试~");
}
});
},
//获取当月1日到当前时间
getMonth: function getMonth() {
var date = new Date();
var year = date.getFullYear().toString(); //'年'
var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1).toString() : (date.getMonth() + 1).toString(); //'月'
var da = date.getDate() < 10 ? '0' + date.getDate().toString() : date.getDate().toString(); //'日'
var end = year + '-' + month + '-' + da; //当天
return end;
},
//正则匹配处理“2十9”等情况
convertStringCorrectly: function convertStringCorrectly(str) {
var regexForSingleTen = /(\d+)十(?!\d)/g;
var regexForFollowedByDigit = /(\d+)十(?=\d)/g;
var step1Result = str.replace(regexForSingleTen, '$10');
var finalResult = step1Result.replace(regexForFollowedByDigit, '$1');
return finalResult;
},
convertChineseToArabic: function convertChineseToArabic(str) {
var chineseNumToArabic = {
'零': 0,
'一': 1,
'二': 2,
'两': 2,
'三': 3,
'四': 4,
'五': 5,
'六': 6,
'七': 7,
'八': 8,
'九': 9,
'时1': '11',
'时2': '12',
'时3': '13',
'时4': '14',
'时5': '15',
'时6': '16',
'时7': '17',
'时8': '18',
'时9': '19',
'消费': '小费',
'报废': '保费',
'报费': '保费'
};
var regex = /(零|一|二|两|三|四|五|六|七|八|九|时1|时2|时3|时4|时5|时6|时7|时8|时9|消费|报废|报费)/g;
return str.replace(regex, function (match) {
return chineseNumToArabic[match];
});
},
spliceMsg: function spliceMsg(res) {
var regex = /嗯|啊|儿|阿|恩/g;
return res.replace(regex, '');
},
//弹出
toggle: function toggle(type, id) {
this.initRecord();
this.voiceText = '';
this.$refs.popup.open('center');
},
//清空语音输入的文字
clearText: function clearText() {
this.voiceText = '';
},
//语音识别功能初始化
initRecord: function initRecord() {
var that = this;
manager.stop();
// 识别结束事件
manager.onStop = function (res) {
that.voiceText = res.result;
};
// 识别错误事件
manager.onError = function (res) {
if (res.retcode == '-30011') {
that.isVoice = true;
}
if (res.retcode == '-30004') {
// uni.hideLoading()
that.isVoice = false;
uni.hideToast();
uni.showToast({
title: "未识别到声音信息,请重新录入",
icon: 'none'
});
}
if (res.retcode == '-40001') {
uni.showToast({
title: '使用次数超限制,请联系管理员!',
icon: 'none'
});
}
};
},
setGuaBill: function setGuaBill() {
var _this12 = this;
if (this.voiceData.receiverName == '' || this.voiceData.arrivalStationId == '') {
uni.showToast({
title: (this.voiceData.receiverName == '' ? '收货人' : this.voiceData.arrivalStationId == '' ? '到达站' : "") + '不能为空',
icon: 'none'
});
return;
}
this.voiceData.orderStatus = 2;
var url;
if (this.isEdit != true) {
url = '/app/logisticsOrder/addLogisticsOrder';
} else {
url = '/app/logisticsOrder/updateLogisticsOrder';
}
uni.request({
url: this.tui.interfaceUrl() + url,
data: this.voiceData,
header: {
'content-type': 'application/json',
'appWLToken': this.tui.getToken()
},
method: 'POST',
//'GET','POST'
dataType: 'json',
success: function success(res) {
if (res.data.code == 401) {
uni.clearStorage();
uni.navigateTo({
url: '/package2/login/login'
});
}
if (res.data.code == 200) {
_this12.tui.toast('挂单成功', 500);
_this12.clearData('');
_this12.$forceUpdate();
if (_this12.isEdit != true) {} else {
setTimeout(function (res1) {
uni.navigateBack();
}, 500);
}
}
},
fail: function fail(res) {
_this12.tui.toast("网络不给力,请稍后再试~");
}
});
},
setBill: function setBill() {
var _this13 = this;
this.voiceDataPrint = this.voiceData;
if (this.voiceData.receiverName == '' || this.voiceData.arrivalStationId == '' || this.voiceData.objectName == '') {
uni.showToast({
title: (this.voiceData.receiverName == '' ? '收货人' : this.voiceData.arrivalStationId == '' ? '到达站' : this.voiceData.objectName == '' ? '物品名' : "") + '不能为空',
icon: 'none'
});
return;
}
this.voiceData.orderStatus = 1;
var url;
if (this.isEdit != true) {
url = '/app/logisticsOrder/addLogisticsOrder';
} else {
url = '/app/logisticsOrder/updateLogisticsOrder';
}
uni.request({
url: this.tui.interfaceUrl() + url,
data: this.voiceData,
header: {
'content-type': 'application/json',
'appWLToken': this.tui.getToken()
},
method: 'POST',
//'GET','POST'
dataType: 'json',
success: function success(res) {
if (res.data.code == 401) {
uni.clearStorage();
uni.navigateTo({
url: '/package2/login/login'
});
}
if (res.data.code == 200) {
_this13.tui.toast('开单成功', 500);
if (_this13.isEdit != true) {
if (uni.getStorageSync('transCompany') == '1899370468356526080' || uni.getStorageSync('transCompany') == '1751796589518786560' || uni.getStorageSync('transCompany') == '1899371352842964992' || uni.getStorageSync('transCompany') == '1782981706819702784') {
if (uni.getStorageSync('deviceId') != '' && uni.getStorageSync('deviceId') != undefined) {
_this13.huoqufuwu(uni.getStorageSync('deviceId'));
} else {
_this13.handlePrintTap();
}
_this13.voiceData.orderNumber = res.data.result.orderNumber;
} else {
_this13.clearData("1");
}
} else {
setTimeout(function (res1) {
uni.navigateBack();
}, 500);
}
}
},
fail: function fail(res) {
_this13.tui.toast("网络不给力,请稍后再试~");
}
});
},
pictureAdd: function pictureAdd() {
var that = this;
uni.chooseMedia({
count: 1,
mediaType: ['image'],
sourceType: ['album', 'camera'],
success: function success(res) {
uni.showLoading({
title: '加载中...',
mask: true
});
that.upLoadFile(res.tempFiles[0].tempFilePath);
}
});
},
upLoadFile: function upLoadFile(path) {
var _this14 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
var that, hiver_token;
return _regenerator.default.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
that = _this14;
hiver_token = uni.getStorageSync("hiver_token");
that.productPicture = [];
_context.next = 5;
return uni.uploadFile({
url: that.tui.interfaceUrl() + '/upload/file',
filePath: path,
name: 'file',
header: {
"content-type": "multipart/form-data",
'appWLToken': hiver_token
},
formData: {},
success: function success(uploadFileRes) {
var pathData = JSON.parse(uploadFileRes.data);
that.voiceData.imagePath = pathData.result;
that.productPicture.push(pathData.result);
that.$forceUpdate();
},
fail: function fail(err) {
uni.hideLoading();
uni.showToast({
title: JSON.stringify(err),
icon: 'none'
});
}
});
case 5:
_context.next = 7;
return setTimeout(function (res) {
uni.hideLoading();
}, 1000);
case 7:
case "end":
return _context.stop();
}
}
}, _callee);
}))();
},
//点击打印按钮
handlePrintTap: function handlePrintTap() {
var that = this;
uni.showLoading({
mask: true,
title: '打印中...'
});
uni.getSystemInfo({
success: function success(res) {
that.deviceType = res.osName;
},
fail: function fail(err) {}
});
// 初始化蓝牙模块
wx.openBluetoothAdapter({
//111
mode: 'central',
success: function success(res2) {
that.sousuo();
},
fail: function fail(res) {
if (res.errCode == '10001') {
// that.tui.toast('请打开蓝牙后,再进行连接')
uni.showToast({
duration: 2000,
title: "请打开蓝牙后,再进行连接",
icon: 'none',
mask: true
});
} else {
that.tui.toast('连接失败,请重启蓝牙或删除小程序重新进入-1');
that.isShowSearch = true;
}
setTimeout(function (res) {
uni.hideLoading();
}, 2000);
}
});
},
// 开始搜索附近的蓝牙外围设备
sousuo: function sousuo() {
var that = this;
this.devicesList = [];
wx.startBluetoothDevicesDiscovery({
//222
success: function success(res3) {
that.jiantingshebei();
},
fail: function fail(err) {
that.tui.toast('连接失败,请重启蓝牙或删除小程序重新进入-2', err);
wx.closeBLEConnection({
deviceId: uni.getStorageSync('deviceId'),
success: function success(res2) {}
});
wx.closeBluetoothAdapter();
uni.removeStorageSync('deviceId');
that.handlePrintTap();
that.isShowSearch = true;
setTimeout(function (res) {
uni.hideLoading();
}, 2000);
}
});
},
//停止搜索蓝牙设备
stopSearchBtnTap: function stopSearchBtnTap() {
wx.stopBluetoothDevicesDiscovery();
},
jiantingshebei: function jiantingshebei() {
var that = this;
if (uni.getStorageSync('deviceId')) {
that.lianejieshebei(uni.getStorageSync('deviceId'));
} else {
uni.hideLoading();
that.clearData('1');
that.isShowSearch = true;
that.$forceUpdate();
// 监听扫描到新设备事件
wx.onBluetoothDeviceFound(function (res4) {
//333
res4.devices.forEach(function (device) {
if (!device.name && !device.localName) {
return;
}
that.devicesList.push(device);
});
});
}
},
lianejieshebei: function lianejieshebei(deviceId) {
var that = this;
uni.showLoading({
mask: true,
title: '加载中...'
});
var timerId = setTimeout(function () {
wx.closeBLEConnection({
deviceId: deviceId,
success: function success(res2) {}
});
wx.closeBluetoothAdapter();
uni.removeStorageSync('deviceId');
that.handlePrintTap();
that.isShowSearch = true;
return;
}, 5000);
// 连接设备
wx.createBLEConnection({
//555
deviceId: deviceId,
// 搜索到设备的 deviceId
success: function success() {
clearTimeout(timerId);
that.isShowSearch = false;
that.huoqufuwu(deviceId);
},
fail: function fail(res) {
clearTimeout(timerId);
if (res.errno == '1509007') {
that.huoqufuwu(deviceId);
}
if (res.errno == '1509003') {
that.lianejieshebei(deviceId);
}
}
});
},
huoqufuwu: function huoqufuwu(deviceId) {
var that = this;
//获取服务
wx.getBLEDeviceServices({
//666
deviceId: deviceId,
// 搜索到设备的 deviceId
success: function success(res5) {
that.duxietezhengzhi(deviceId, res5);
},
fail: function fail(res) {
that.tui.toast('连接失败,请重启蓝牙或删除小程序重新进入-4', res);
wx.closeBLEConnection({
deviceId: deviceId,
success: function success(res2) {}
});
wx.closeBluetoothAdapter();
uni.removeStorageSync('deviceId');
that.handlePrintTap();
that.isShowSearch = true;
setTimeout(function (res) {
uni.hideLoading();
}, 2000);
}
});
},
duxietezhengzhi: function duxietezhengzhi(deviceId, res5) {
var that = this;
//读写特征值
wx.getBLEDeviceCharacteristics({
//777
deviceId: deviceId,
// 搜索到设备的 deviceId
serviceId: res5.services[0].uuid,
// 上一步中找到的某个服务
success: function success(res6) {
for (var i = 0; i < res6.characteristics.length; i++) {
var item = res6.characteristics[i];
that.startNoticeBle(deviceId, res5.services[0].uuid, res6.characteristics[2].uuid);
if (item.properties.write) {
// 该特征值可写
uni.setStorageSync('deviceId', deviceId);
uni.setStorageSync('serviceId', res5.services[0].uuid);
uni.setStorageSync('characteristicId', item.uuid);
that.xierushuju();
return;
}
}
},
fail: function fail(res) {
that.tui.toast('连接失败,请重启蓝牙或删除小程序重新进入-5', res);
wx.closeBLEConnection({
deviceId: uni.getStorageSync('deviceId'),
success: function success(res) {}
});
uni.removeStorageSync('deviceId');
that.$forceUpdate();
that.sousuo();
that.isShowSearch = true;
uni.hideLoading();
setTimeout(function (res) {
uni.hideLoading();
}, 2000);
}
});
},
// 开启蓝牙数据监听
startNoticeBle: function startNoticeBle(deviceId, serviceId, characteristicId) {
var _this = this;
uni.notifyBLECharacteristicValueChange({
state: true,
// 启用 notify 功能
deviceId: deviceId,
serviceId: serviceId,
characteristicId: characteristicId,
success: function success(res) {
_this.GetDataFromBle();
}
});
},
// 设备返回的数据接收
GetDataFromBle: function GetDataFromBle() {
var that = this;
uni.onBLECharacteristicValueChange(function (res) {
uni.hideLoading();
that.clearData('');
that.$forceUpdate();
});
},
clearData: function clearData(type) {
var that = this;
if (type == '') {
that.bufferData = [];
}
that.productPicture = [];
that.newFa = false;
that.newShou = false;
that.transferStationList = [];
this.printcount = "";
that.voiceData = {
createBy: uni.getStorageSync('contacts'),
companyId: uni.getStorageSync('transCompany'),
companyName: uni.getStorageSync('companyName'),
imagePath: '',
circuitId: '',
// 线路id
circuitName: '',
// 线路名称
shipperName: '',
// 发货人名-
shipperMobile: '',
// 发货人电话-
shipperAddress: '',
// 发货人地址
receiverName: '',
// 收货人名-
receiverMobile: '',
// 收货人电话-
receiverAddress: '',
// 收货人地址
goStationId: '',
// 出发站id-
goStationName: '沧州',
// 出发站名称-
arrivalStationId: '',
// 到达站id-
arrivalStationName: '',
// 到达站名称-
landingFee: 0,
//落地费
deliveryFee: 0,
//送货费
weight: 0,
// 重量-
weightHistory: '',
count: 0,
// 件数-
freight: 0,
// 运输费-
premium: 0,
// 保费-
transitFee: 0,
// 中转费
transferAddition: 0,
paymentForGoods: 0,
// 代收货款
tips: 0,
// 拉包小费
methodOfSettlement: "2",
// 结算方式
cost: 0,
// 工本费
allCost: 0,
// 总费用
orderNumber: '',
// 票号
objectName: '',
// 物体名称
remark: '',
// 备注
newShipperName: "",
newReceiverName: '',
newReceiverMobile: '',
newShipperMobile: '',
receivingUserId: '',
// 收货站人id
receivingUserName: '' // 收货站人名称
};
that.$forceUpdate();
},
getPrintByte: function getPrintByte(data) {
if (data == undefined || data == null) {
return '';
} else {
if (data == '冀J059DE' || data == '测试勿选') {
return '顺达快运';
} else {
return data;
}
}
},
//获取打印小标签的数据
smallData: function smallData() {
var _this15 = this;
var that = this;
return new Promise(function (resolve, reject) {
var strCmd = '';
var count = that.voiceDataPrint.count == 0 ? 1 : that.voiceDataPrint.count;
if (_this15.printcount != '' && _this15.printcount > 0) {
count = _this15.printcount;
}
for (var i = 1; i <= count; i++) {
var _strCmd = blesdk.CreatCPCLPage(600, 480, 1, 0, 0);
_strCmd += blesdk.addCPCLBox(10, 10, 570, 450, 3); //画框
_strCmd += blesdk.addCPCLLocation(2);
_strCmd += blesdk.addCPCLSETMAG(2, 2);
_strCmd += blesdk.addCPCLText('0', 20, '24', '0', 0, that.voiceDataPrint.companyName);
_strCmd += blesdk.addCPCLLine(10, 80, 570, 80, 2); //画线
_strCmd += blesdk.addCPCLLocation(0);
_strCmd += blesdk.addCPCLSETMAG(1, 1);
_strCmd += blesdk.addCPCLText('20', 100, '24', '0', 0, '开票日期:' + that.getMonth());
_strCmd += blesdk.addCPCLLine(10, 140, 570, 140, 2); //画线
_strCmd += blesdk.addCPCLLine(382, 140, 382, 316, 2); //画线
_strCmd += blesdk.addCPCLSETMAG(2, 2);
_strCmd += blesdk.addCPCLText('20', 160, '24', '0', 0, '到站:' + that.voiceDataPrint.arrivalStationName);
_strCmd += blesdk.addCPCLLine(10, 220, 382, 220, 2); //画线
_strCmd += blesdk.addCPCLText('20', 248, '24', '0', 0, '收:' + that.voiceDataPrint.receiverName);
_strCmd += blesdk.addCPCLLine(10, 316, 570, 316, 2); //画线
_strCmd += blesdk.addCPCLSETMAG(1, 1);
_strCmd += blesdk.addCPCLText('20', 336, '24', '0', 0, '共' + count + '件');
var jiesuan = '';
if (that.getPrintByte(that.voiceDataPrint.methodOfSettlement) == '0') {
jiesuan = '现金';
} else if (that.getPrintByte(that.voiceDataPrint.methodOfSettlement) == '1') {
jiesuan = '月付';
} else if (that.getPrintByte(that.voiceDataPrint.methodOfSettlement) == '2') {
jiesuan = '提付';
}
_strCmd += blesdk.addCPCLText('112', 336, '24', '0', 0, jiesuan);
_strCmd += blesdk.addCPCLLine(170, 316, 170, 450, 2); //画线
// strCmd += blesdk.addCPCLText('10', that.yNum+=40, '24', '0', 0, '单 号:'+ that.voiceDataPrint.orderNumber + '-' +i)
_strCmd += blesdk.addCPCLText('186', 336, '24', '0', 0, '单号:' + that.voiceDataPrint.orderNumber + '-' + i);
_strCmd += blesdk.addCPCLLine(10, 376, 570, 376, 2); //画线
_strCmd += blesdk.addCPCLText('20', 396, '24', '0', 0, that.voiceDataPrint.receiverMobile == 'undefined' ? '' : that.voiceDataPrint.receiverMobile);
_strCmd += blesdk.addCPCLText('186', 396, '24', '0', 0, '备注:' + that.voiceDataPrint.remark);
// strCmd += blesdk.addCPCLQRCode(400, 150 , 'H', '1', 4, orderNumber) //二维码
_strCmd += blesdk.addCPCLQRCode(400, 150, 'H', '1', 4, that.voiceDataPrint.orderNumber); //二维码
_strCmd += blesdk.addCPCLPrint();
that.bufferData.push(_strCmd);
resolve(that.bufferData);
}
});
},
//获取打印物流单的数据
wuliuData: function wuliuData() {
var _this16 = this;
var that = this;
return new Promise(function (resolve, reject) {
var wlNum = uni.getStorageSync('wlNum');
for (var i = 0; i < wlNum; i++) {
var strCmd1 = '';
if (uni.getStorageSync('zhiType') == 1) {
strCmd1 = blesdk.CreatCPCLPage(600, 1800, 1, 0, 0);
strCmd1 += blesdk.addCPCLSETMAG(2, 2);
strCmd1 += blesdk.addCPCLLocation(2);
strCmd1 += blesdk.addCPCLText('30', '30', '24', '0', '0', _this16.getPrintByte(uni.getStorageSync('companyName')));
strCmd1 += blesdk.addCPCLSETMAG(1, 1);
strCmd1 += blesdk.addCPCLLocation(0);
var orderNum = that.voiceDataPrint.orderNumber;
if (uni.getStorageSync('transCompany') == '1899370468356526080' || uni.getStorageSync('transCompany') == '1782981706819702784') {
orderNum = that.voiceDataPrint.orderNumber.split('-')[1] + that.voiceDataPrint.orderNumber.split('-')[2].replace('-', '');
}
strCmd1 += blesdk.addCPCLSETMAG(2, 2);
strCmd1 += blesdk.addCPCLText('30', '150', '24', '0', '0', '单号:' + _this16.getPrintByte(orderNum));
strCmd1 += blesdk.addCPCLSETMAG(1, 1);
strCmd1 += blesdk.addCPCLText('30', '210', '24', '0', '0', that.timestampToDatetime());
strCmd1 += blesdk.addCPCLLine(25, 270, 1080, 270, 2); //画线
strCmd1 += blesdk.addCPCLText('30', '290', '24', '0', '0', '始发站:' + _this16.getPrintByte(that.voiceDataPrint.goStationName));
strCmd1 += blesdk.addCPCLText('300', '290', '24', '0', '0', '到达站:' + _this16.getPrintByte(that.voiceDataPrint.arrivalStationName));
strCmd1 += blesdk.addCPCLSETMAG(2, 2);
strCmd1 += blesdk.addCPCLText('30', '340', '24', '0', '0', '收:' + _this16.getPrintByte(that.voiceDataPrint.receiverName));
strCmd1 += blesdk.addCPCLSETMAG(1, 2);
strCmd1 += blesdk.addCPCLText('300', '340', '24', '0', '0', ' ' + _this16.getPrintByte(that.voiceDataPrint.receiverMobile));
strCmd1 += blesdk.addCPCLSETMAG(1, 1);
strCmd1 += blesdk.addCPCLText('30', '410', '24', '0', '0', '地址:' + _this16.getPrintByte(that.voiceDataPrint.receiverAddress));
strCmd1 += blesdk.addCPCLLine(25, 470, 1080, 470, 2); //画线
strCmd1 += blesdk.addCPCLText('30', '490', '24', '0', '0', '发货人:' + _this16.getPrintByte(that.voiceDataPrint.shipperName));
strCmd1 += blesdk.addCPCLText('300', '490', '24', '0', '0', '电话:' + _this16.getPrintByte(that.voiceDataPrint.shipperMobile));
strCmd1 += blesdk.addCPCLLine(25, 550, 1080, 550, 2); //画线
strCmd1 += blesdk.addCPCLText('30', '570', '24', '0', '0', '重量:' + that.getPrintByte(that.voiceDataPrint.weight) + 'kg');
strCmd1 += blesdk.addCPCLText('300', '570', '24', '0', '0', '件数:' + that.getPrintByte(that.voiceDataPrint.count));
strCmd1 += blesdk.addCPCLText('30', '630', '24', '0', '0', '运费:' + that.getPrintByte(that.voiceDataPrint.freight) + '元');
strCmd1 += blesdk.addCPCLSETMAG(2, 2);
strCmd1 += blesdk.addCPCLText('300', '620', '24', '0', '0', '物品:' + that.getPrintByte(that.voiceDataPrint.objectName));
strCmd1 += blesdk.addCPCLSETMAG(1, 1);
strCmd1 += blesdk.addCPCLText('30', '690', '24', '0', '0', '小费:' + that.getPrintByte(that.voiceDataPrint.tips) + '元');
var jiesuan = '';
if (that.getPrintByte(that.voiceDataPrint.methodOfSettlement) == '0') {
jiesuan = '现付';
} else if (that.getPrintByte(that.voiceDataPrint.methodOfSettlement) == '1') {
jiesuan = '月付';
} else if (that.getPrintByte(that.voiceDataPrint.methodOfSettlement) == '2') {
jiesuan = '提付';
}
strCmd1 += blesdk.addCPCLText('300', '690', '24', '0', '0', '结算:' + jiesuan);
strCmd1 += blesdk.addCPCLText('30', '750', '24', '0', '0', '中转费:' + that.getPrintByte(that.voiceDataPrint.transitFee) + '元');
strCmd1 += blesdk.addCPCLText('300', '750', '24', '0', '0', '落地费:' + that.getPrintByte(that.voiceDataPrint.landingFee) + '元');
strCmd1 += blesdk.addCPCLText('30', '810', '24', '0', '0', '送货费:' + that.getPrintByte(that.voiceDataPrint.deliveryFee) + '元');
strCmd1 += blesdk.addCPCLText('300', '810', '24', '0', '0', '保费:' + that.getPrintByte(that.voiceDataPrint.premium) + '元');
strCmd1 += blesdk.addCPCLSETMAG(2, 2);
strCmd1 += blesdk.addCPCLText('30', '860', '24', '0', '0', '总费用:' + that.getPrintByte(that.voiceDataPrint.allCost) + '元');
strCmd1 += blesdk.addCPCLLine(25, 920, 1080, 920, 2); //画线
strCmd1 += blesdk.addCPCLSETMAG(1, 1);
strCmd1 += blesdk.addCPCLText('30', '940', '24', '0', '0', '备注:' + _this16.getPrintByte(that.voiceDataPrint.remark));
strCmd1 += blesdk.addCPCLText('30', '1000', '24', '0', '0', '收货人签字:');
strCmd1 += blesdk.addCPCLLine(25, 1060, 1080, 1060, 2); //画线
_this16.yNum = 1060;
strCmd1 += blesdk.addCPCLSETMAG(1, 1);
//店铺备注
if (_this16.shopRemark.length > 0) {
for (var _i = 0; _i < _this16.shopRemark.length; _i++) {
strCmd1 += blesdk.addCPCLText('30', _this16.countPrint(), '24', '0', 0, _this16.shopRemark[_i]);
}
}
} else {
strCmd1 = blesdk.CreatCPCLPage(600, 480, 1, 0, 0);
strCmd1 += blesdk.addCPCLBox(10, 10, 570, 450, 3);
strCmd1 += blesdk.addCPCLSETMAG(2, 2);
strCmd1 += blesdk.addCPCLSETBOLD('2');
strCmd1 += blesdk.addCPCLLocation(0);
strCmd1 += blesdk.addCPCLText('30', '30', '24', '0', '0', that.getPrintByte(uni.getStorageSync('companyName')));
strCmd1 += blesdk.addCPCLSETMAG(1, 1);
strCmd1 += blesdk.addCPCLSETBOLD('2');
strCmd1 += blesdk.addCPCLText('300', '30', '24', '0', '0', '单号:' + that.voiceDataPrint.orderNumber);
// strCmd1 += blesdk.addCPCLText('300', '30', '24', '0', '0', ('单号:1321646846846546'))
strCmd1 += blesdk.addCPCLSETBOLD('2');
strCmd1 += blesdk.addCPCLBox(25, 50, 555, 50, 2); //画框
strCmd1 += blesdk.addCPCLText('30', '90', '24', '0', '0', '收货人:' + that.getPrintByte(that.voiceDataPrint.receiverName));
strCmd1 += blesdk.addCPCLText('300', '90', '24', '0', '0', '到达站:' + that.getPrintByte(that.voiceDataPrint.arrivalStationName));
strCmd1 += blesdk.addCPCLText('30', '140', '24', '0', '0', '地址:' + that.getPrintByte(that.voiceDataPrint.receiverAddress));
strCmd1 += blesdk.addCPCLText('300', '140', '24', '0', '0', '电话:' + that.getPrintByte(that.voiceDataPrint.receiverMobile));
strCmd1 += blesdk.addCPCLLine(25, 180, 555, 180, 2); //画线
strCmd1 += blesdk.addCPCLText('30', '190', '24', '0', '0', '发货人:' + that.getPrintByte(that.voiceDataPrint.shipperName));
strCmd1 += blesdk.addCPCLText('300', '190', '24', '0', '0', '电话:' + that.getPrintByte(that.voiceDataPrint.shipperMobile));
strCmd1 += blesdk.addCPCLLine(25, 240, 555, 240, 2); //画线
if (uni.getStorageSync('transCompany') != '1751796589518786560' && uni.getStorageSync('transCompany') != '1899371352842964992' && uni.getStorageSync('transCompany') != '1782981706819702784') {
strCmd1 += blesdk.addCPCLText('30', '250', '24', '0', '0', '重量:' + that.getPrintByte(that.voiceDataPrint.weight));
strCmd1 += blesdk.addCPCLText('300', '250', '24', '0', '0', '件数:' + that.getPrintByte(that.voiceDataPrint.count) + '件');
var _jiesuan = '';
if (that.getPrintByte(that.voiceDataPrint.methodOfSettlement) == '0') {
_jiesuan = '现金';
} else if (that.getPrintByte(that.voiceDataPrint.methodOfSettlement) == '1') {
_jiesuan = '月付';
} else if (that.getPrintByte(that.voiceDataPrint.methodOfSettlement) == '2') {
_jiesuan = '提付';
}
strCmd1 += blesdk.addCPCLText('30', '290', '24', '0', '0', '结算方式:' + _jiesuan);
} else {
var beginWidth = 0;
var beginNum = 0;
if (that.voiceDataPrint.weight != 0) {
if (beginNum == 0) {
beginWidth = 30;
} else {
beginWidth += 130;
}
strCmd1 += blesdk.addCPCLText(beginWidth.toString(), '250', '24', '0', '0', '重量:' + that.getPrintByte(that.voiceDataPrint.weight));
beginNum = 1;
}
if (that.voiceDataPrint.count != 0) {
if (beginNum == 0) {
beginWidth = 30;
} else {
beginWidth += 130;
}
strCmd1 += blesdk.addCPCLText(beginWidth.toString(), '250', '24', '0', '0', '件数:' + that.getPrintByte(that.voiceDataPrint.count));
beginNum = 1;
}
if (that.voiceDataPrint.freight != 0) {
if (beginNum == 0) {
beginWidth = 30;
} else {
beginWidth += 130;
}
strCmd1 += blesdk.addCPCLText(beginWidth.toString(), '250', '24', '0', '0', '运费:' + that.getPrintByte(that.voiceDataPrint.freight));
beginNum = 1;
}
if (that.voiceDataPrint.tips != 0 && uni.getStorageSync('transCompany') != '1751796589518786560') {
if (beginNum == 0) {
beginWidth = 30;
} else {
beginWidth += 130;
}
strCmd1 += blesdk.addCPCLText(beginWidth.toString(), '250', '24', '0', '0', '小费:' + that.getPrintByte(that.voiceDataPrint.tips));
beginNum = 1;
}
beginWidth = 0;
beginNum = 0;
var _jiesuan2 = '';
if (that.getPrintByte(that.voiceDataPrint.methodOfSettlement) == '0') {
_jiesuan2 = '现金';
} else if (that.getPrintByte(that.voiceDataPrint.methodOfSettlement) == '1') {
_jiesuan2 = '月付';
} else if (that.getPrintByte(that.voiceDataPrint.methodOfSettlement) == '2') {
_jiesuan2 = '提付';
}
strCmd1 += blesdk.addCPCLText('30', '290', '24', '0', '0', '结算:' + _jiesuan2);
if (that.voiceDataPrint.transitFee != 0) {
if (beginNum == 0) {
beginWidth = 160;
} else {
beginWidth += 130;
}
strCmd1 += blesdk.addCPCLText(beginWidth.toString(), '290', '24', '0', '0', '中转费:' + that.getPrintByte(that.voiceDataPrint.transitFee));
beginNum = 1;
}
if (that.voiceDataPrint.landingFee != 0) {
if (beginNum == 0) {
beginWidth = 160;
} else {
beginWidth += 130;
}
strCmd1 += blesdk.addCPCLText(beginWidth.toString(), '290', '24', '0', '0', '落地费:' + that.getPrintByte(that.voiceDataPrint.landingFee));
beginNum = 1;
}
if (that.voiceDataPrint.premium != 0) {
if (beginNum == 0) {
beginWidth = 160;
} else {
beginWidth += 130;
}
strCmd1 += blesdk.addCPCLText(beginWidth.toString(), '290', '24', '0', '0', '保费:' + that.getPrintByte(that.voiceDataPrint.premium));
beginNum = 1;
}
if (that.voiceDataPrint.deliveryFee != 0) {
if (beginNum == 0) {
beginWidth = 160;
} else {
beginWidth += 130;
}
strCmd1 += blesdk.addCPCLText(beginWidth.toString(), '290', '24', '0', '0', '送货费:' + that.getPrintByte(that.voiceDataPrint.deliveryFee));
beginNum = 1;
}
if (that.voiceDataPrint.objectName != 0) {
if (beginNum == 0) {
beginWidth = 160;
} else {
beginWidth += 130;
}
strCmd1 += blesdk.addCPCLText(beginWidth.toString(), '290', '24', '0', '0', '物品:' + that.getPrintByte(that.voiceDataPrint.objectName));
beginNum = 1;
}
}
strCmd1 += blesdk.addCPCLLine(25, 330, 555, 330, 2); //画线
strCmd1 += blesdk.addCPCLText('30', '340', '24', '0', '0', '备注:' + that.getPrintByte(that.voiceDataPrint.remark));
strCmd1 += blesdk.addCPCLLine(25, 400, 555, 400, 2); //画线
strCmd1 += blesdk.addCPCLText('30', '410', '24', '0', '0', '操作人:' + that.getPrintByte(that.voiceDataPrint.createBy));
strCmd1 += blesdk.addCPCLText('300', '410', '24', '0', '0', that.timestampToDatetime());
}
strCmd1 += blesdk.addCPCLPrint();
that.bufferData.push(strCmd1);
resolve(that.bufferData);
}
});
},
xierushuju: function xierushuju() {
var _this17 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
var that;
return _regenerator.default.wrap(function _callee2$(_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
that = _this17;
if (!(uni.getStorageSync('xbqNum') == 1)) {
_context2.next = 4;
break;
}
_context2.next = 4;
return _this17.smallData();
case 4:
_context2.next = 6;
return _this17.wuliuData();
case 6:
that.$nextTick(function () {
var dataStr = '';
for (var m = 0; m < that.bufferData.length; m++) {
dataStr += that.bufferData[m];
}
var maxChunk = that.deviceType == 'android' ? 20 : 180;
var delay = that.deviceType == 'android' ? 20 : 180;
var buffer = _printUtilGBK.default.strToGBKByte(dataStr);
for (var i = 0, j = 0, length = buffer.byteLength; i < length; i += maxChunk, j++) {
var subPackage = buffer.slice(i, i + maxChunk <= length ? i + maxChunk : length);
setTimeout(that._writeBLECharacteristicValue, j * delay, subPackage);
}
});
return _context2.abrupt("return");
case 8:
case "end":
return _context2.stop();
}
}
}, _callee2);
}))();
},
_writeBLECharacteristicValue: function _writeBLECharacteristicValue(buffer) {
var that = this;
wx.writeBLECharacteristicValue({
deviceId: uni.getStorageSync('deviceId'),
serviceId: uni.getStorageSync('serviceId'),
characteristicId: uni.getStorageSync('characteristicId'),
value: buffer,
success: function success(res) {},
fail: function fail(res) {
wx.closeBLEConnection({
deviceId: uni.getStorageSync('deviceId'),
success: function success(res) {}
});
if (uni.getStorageSync('deviceId')) {
that.xierushuju();
} else {
that.jiantingshebei();
}
uni.hideLoading();
}
});
},
handleSearchClose: function handleSearchClose() {
wx.closeBluetoothAdapter();
this.isShowSearch = false;
}
}
};
exports.default = _default;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"], __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"]))
/***/ }),
/***/ 911:
/*!****************************************************************************************************!*\
!*** C://distribution-uni/package2/other/newLogisticsBill.vue?vue&type=style&index=0&lang=scss& ***!
\****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_newLogisticsBill_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../软件/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../软件/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../软件/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../软件/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--8-oneOf-1-2!../../../../软件/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src??ref--8-oneOf-1-3!../../../../软件/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!../../../../软件/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--8-oneOf-1-5!../../../../软件/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../软件/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./newLogisticsBill.vue?vue&type=style&index=0&lang=scss& */ 912);
/* harmony import */ var _HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_newLogisticsBill_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_newLogisticsBill_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_newLogisticsBill_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_newLogisticsBill_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony default export */ __webpack_exports__["default"] = (_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_newLogisticsBill_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default.a);
/***/ }),
/***/ 912:
/*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!./node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--8-oneOf-1-2!./node_modules/postcss-loader/src??ref--8-oneOf-1-3!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--8-oneOf-1-5!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!C://distribution-uni/package2/other/newLogisticsBill.vue?vue&type=style&index=0&lang=scss& ***!
\********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
if(false) { var cssReload; }
/***/ })
},[[905,"common/runtime","common/vendor"]]]);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/package2/other/newLogisticsBill.js.map