(global["webpackJsonp"] = global["webpackJsonp"] || []).push([["package3/index/orderDetailTable"],{ /***/ 1002: /*!*************************************************************************************!*\ !*** C:/文档/distribution-uni/main.js?{"page":"package3%2Findex%2ForderDetailTable"} ***! \*************************************************************************************/ /*! 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 _orderDetailTable = _interopRequireDefault(__webpack_require__(/*! ./package3/index/orderDetailTable.vue */ 1003)); // @ts-ignore wx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__; createPage(_orderDetailTable.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"])) /***/ }), /***/ 1003: /*!******************************************************************!*\ !*** C:/文档/distribution-uni/package3/index/orderDetailTable.vue ***! \******************************************************************/ /*! no static exports found */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _orderDetailTable_vue_vue_type_template_id_edd3de20___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./orderDetailTable.vue?vue&type=template&id=edd3de20& */ 1004); /* harmony import */ var _orderDetailTable_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./orderDetailTable.vue?vue&type=script&lang=js& */ 1006); /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _orderDetailTable_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 _orderDetailTable_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__)); /* harmony import */ var _orderDetailTable_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./orderDetailTable.vue?vue&type=style&index=0&lang=scss& */ 1008); /* 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"])( _orderDetailTable_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"], _orderDetailTable_vue_vue_type_template_id_edd3de20___WEBPACK_IMPORTED_MODULE_0__["render"], _orderDetailTable_vue_vue_type_template_id_edd3de20___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"], false, null, null, null, false, _orderDetailTable_vue_vue_type_template_id_edd3de20___WEBPACK_IMPORTED_MODULE_0__["components"], renderjs ) component.options.__file = "package3/index/orderDetailTable.vue" /* harmony default export */ __webpack_exports__["default"] = (component.exports); /***/ }), /***/ 1004: /*!*************************************************************************************************!*\ !*** C:/文档/distribution-uni/package3/index/orderDetailTable.vue?vue&type=template&id=edd3de20& ***! \*************************************************************************************************/ /*! 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_orderDetailTable_vue_vue_type_template_id_edd3de20___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!./orderDetailTable.vue?vue&type=template&id=edd3de20& */ 1005); /* 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_orderDetailTable_vue_vue_type_template_id_edd3de20___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_orderDetailTable_vue_vue_type_template_id_edd3de20___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_orderDetailTable_vue_vue_type_template_id_edd3de20___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_orderDetailTable_vue_vue_type_template_id_edd3de20___WEBPACK_IMPORTED_MODULE_0__["components"]; }); /***/ }), /***/ 1005: /*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ !*** ./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/package3/index/orderDetailTable.vue?vue&type=template&id=edd3de20& ***! \*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ /*! 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 = { uniDatetimePicker: function () { return Promise.all(/*! import() | uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker */[__webpack_require__.e("common/vendor"), __webpack_require__.e("uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker")]).then(__webpack_require__.bind(null, /*! @/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue */ 1195)) }, 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)) }, uLoadmore: function () { return Promise.all(/*! import() | uni_modules/uview-ui/components/u-loadmore/u-loadmore */[__webpack_require__.e("common/vendor"), __webpack_require__.e("uni_modules/uview-ui/components/u-loadmore/u-loadmore")]).then(__webpack_require__.bind(null, /*! @/uni_modules/uview-ui/components/u-loadmore/u-loadmore.vue */ 1132)) }, 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)) }, uqrcode: function () { return Promise.all(/*! import() | uni_modules/Sansnn-uQRCode/components/uqrcode/uqrcode */[__webpack_require__.e("common/vendor"), __webpack_require__.e("uni_modules/Sansnn-uQRCode/components/uqrcode/uqrcode")]).then(__webpack_require__.bind(null, /*! @/uni_modules/Sansnn-uQRCode/components/uqrcode/uqrcode.vue */ 1270)) }, } } 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 l0 = _vm.__map(_vm.inventoryList, function (item, index) { var $orig = _vm.__get_orig(item) var g1 = item.lableList && item.lableList.length > 0 var g2 = item.lableList == null || item.lableList.length <= 1 var f0 = _vm._f("sliceTime")(item.createTime) return { $orig: $orig, g1: g1, g2: g2, f0: f0, } }) var g3 = _vm.qrArr.length if (!_vm._isMounted) { _vm.e0 = function ($event) { _vm.faBookShow = false } _vm.e1 = function ($event) { return _vm.$refs.lablePopup.open() } _vm.e2 = function ($event) { return _vm.$refs.printPopup.close() } } _vm.$mp.data = Object.assign( {}, { $root: { g0: g0, l0: l0, g3: g3, }, } ) } var recyclableRender = false var staticRenderFns = [] render._withStripped = true /***/ }), /***/ 1006: /*!*******************************************************************************************!*\ !*** C:/文档/distribution-uni/package3/index/orderDetailTable.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_orderDetailTable_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!./orderDetailTable.vue?vue&type=script&lang=js& */ 1007); /* 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_orderDetailTable_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_orderDetailTable_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_orderDetailTable_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_orderDetailTable_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_orderDetailTable_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), /***/ 1007: /*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ !*** ./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/package3/index/orderDetailTable.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 _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18)); var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 30)); var _util = _interopRequireDefault(__webpack_require__(/*! @/components/kk-printer/utils/util.js */ 440)); 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 kkPrinter = function kkPrinter() { Promise.all(/*! require.ensure | components/kk-printer/index */[__webpack_require__.e("common/vendor"), __webpack_require__.e("components/kk-printer/index")]).then((function () { return resolve(__webpack_require__(/*! @/components/kk-printer/index.vue */ 1398)); }).bind(null, __webpack_require__)).catch(__webpack_require__.oe); }; var _default = { data: function data() { return { enDayShow: false, textArr: ['您还未关注快衣店服务号,暂无法接收充值及上新提醒,点击关注'], FWHPic: 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/f2ba2080aaa54c618c2e47df4f220087.png', defaultText: '贴包单', radio1: 0, isSelfOrder: false, isshanglu: true, isSizeHeng: false, canvasshow: false, bigImg: [], shopId: uni.getStorageSync('shopId'), shopName: '', QrUrl: '', //二维码临时存放 newQRList: [], // 生成的二维码临时路径的数组 newQRList1: [], // 生成的二维码临时路径的数组 qrCodeImage: '', swiperDotIndex: 0, sex: [{ text: '是', value: 0 }, { text: '否', value: 2 }], orderByWorkerCandidates: [], orderByWorker: '', bufferData: [], userType: uni.getStorageSync('type'), show: false, popupShow: false, shopAddress: uni.getStorageSync('shopAddress'), shopOwnerPhone: uni.getStorageSync('shopOwnerPhone'), shopRemark1: uni.getStorageSync('shopRemark'), sales: {}, dealingsRecord: {}, order: {}, list: [], newData: [], listHeng: [], lettrList: ['XS', 'S', 'M', 'L', 'XL', '2XL', 'XXL', '3XL', 'XXXL', '4XL', 'XXXXL', '5XL', 'XXXXXL', '6XL', 'XXXXXXL', '7XL', 'XXXXXXXL'], isReturn: false, orderByWorkerList: [], inventoryList: [], inventoryReturnList: [], shopList: [], returnList1: [], editNoPrice: false, newEarn: 0, shopRemark: [], fontsmailDcl: 0, isgys: true, printHeight: 0, myCanvasHeight: '', myCanvasWidth: '', isReturnPrice: 1, type: '', orderXd: [], collection: [], returnPrice: 0, shopMoblie: '', smailSize: 0, returnNum: 0, lbgName: [], returnAmount: 0, smailDcl: 1, shopData: [], changeA: '', sAmout: 0, yNum: 150, picOk: false, printingMethod: '0', printHeight1: 0, printWidth1: 0, printTotal: 1040, deviceType: 'ios', payType1: 1, payTypeList: [{ value: 1, text: "切换样式" }, { value: 1, text: "展示图片" }, { value: 0, text: "表格样式" }, { value: 2, text: "尺码横排" }], qrArr: [], isShare: false, isDownKH: false, userId: '', customId: "", needPushMsg: false, mini_program_openid: '', unionid: '', official_account_openid: '', zhengtizhekou: false, addressArr: [], jinjuPhone: '', //金桔家单独改成这个电话 modal_qr: false, qrCodeUrl: 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/8e305338798c4152a89e3351eaf6c84e.png', // 要生成的二维码值 timeOrder: 0, lableIndex: 0, signIndex: [], isAddLableBtn: true, orderIndex: '', customName: '', faBookShow: false, lableText: '', checkColor: '', isEdit: false, signList: [], statusList: [{ value: 2, text: "作废" }, { value: 6, text: "待配货" }, { value: 7, text: "挂单" }, { value: 4, text: "已完成" }, { value: 0, text: "库房未配货" }, { value: 1, text: "库房配货完" }], colorList: [{ name: 'green', checked: false }, { name: 'blue', checked: false }, { name: 'orange', checked: false }, { name: '#6A5ACD', checked: false }, { name: '#FFC1C1', checked: false }, { name: '#FF3030', checked: false }, { name: '#1E90FF', checked: false }, { name: '#9C9C9C', checked: false }, { name: '#008B8B', checked: false }, { name: '#1C1C1C', checked: false }], range: [], status: 'loadmore', page: 1, totalPages: 0, customList: [], listStatus: '', isCancel: false, returnList: new Map() }; }, onReachBottom: function onReachBottom() { if (this.page >= this.totalPages) return; this.status = 'loading'; this.page = ++this.page; this.getOrderInfoList(); }, components: { kkPrinter: kkPrinter }, filters: { sliceTime: function sliceTime(val) { var name = ''; if (typeof val == 'string') { name = val.split(' ')[0]; } return name; } }, onShow: function onShow() { // 初始化蓝牙模块 wx.openBluetoothAdapter({ mode: 'central' }); if (uni.getStorageSync('noReload') == true) { uni.removeStorageSync('noReload'); } else { this.inventoryList = []; this.page = 1; this.getOrderInfoList(); } this.getLableList(); }, methods: { changeSort: function changeSort() { if (this.timeOrder == 0) { this.timeOrder = 1; } else if (this.timeOrder == 1) { this.timeOrder = 0; } this.getOrderInfoList('sreach'); }, goGoods: function goGoods(item) { var _this2 = this; return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() { var that; return _regenerator.default.wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: that = _this2; if (!(item.aiNotRecognition != '' && item.aiNotRecognition != null)) { _context.next = 5; break; } uni.showModal({ title: "提示", content: item.aiNotRecognition + '确认去开单吗?', success: function success(res) { if (res.confirm) { that.goSaleGoods(item); } } }); _context.next = 12; break; case 5: if (!(item.aiNotRecognition == '' && item.saleDetailDTOList == null)) { _context.next = 9; break; } uni.showModal({ title: "提示", content: '未识别到商品,确认去开单吗?', success: function success(res) { if (res.confirm) { that.goSaleGoods(item); } } }); _context.next = 12; break; case 9: _context.next = 11; return _this2.getReturnOrder1(item.id); case 11: uni.showModal({ title: "提示", content: '确认去开单吗?', success: function success(res) { if (res.confirm) { that.goSaleGoods(item); } } }); case 12: case "end": return _context.stop(); } } }, _callee); }))(); }, changeShowBtn: function changeShowBtn(index) { if (this.lableIndex != index) { this.inventoryList[this.lableIndex].isShowBtn = false; this.lableIndex = index; } if (this.inventoryList[index].isShowBtn == undefined || this.inventoryList[index].isShowBtn == false) { this.inventoryList[index].isShowBtn = true; } else { this.inventoryList[index].isShowBtn = false; } this.$forceUpdate(); }, showTime: function showTime(time) { uni.showToast({ title: "订单时间:" + time, icon: 'none' }); }, isPrint: function isPrint(id, customId, index) { var _this3 = this; uni.showLoading({ title: '加载中...', mask: true }); this.inventoryList[index].isShowBtn = false; this.printId = id; this.printCustomId = customId; this.qrArr = []; this.getOrderInfo(); setTimeout(function (res) { uni.hideLoading(); _this3.$refs.printPopup.open(); }, 500); }, // 取消订单 cancelOrder: function cancelOrder(item, type, index) { var _this4 = 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 = _this4; _context2.next = 3; return _this4.getReturnOrder1(item.id); case 3: _context2.next = 5; return _this4.tui.modal("提示", "您确定要撤销订单吗?", true, function (res) { if (res) { that.cancelOk(item, type, index); } else { that.returnList = new Map(); } }); case 5: case "end": return _context2.stop(); } } }, _callee2); }))(); }, //带参数跳转到开单页 goSaleGoods: function goSaleGoods(item, type) { var _this5 = this; var dataList = []; if (!item.saleDetailDTOList) { item.saleDetailDTOList = []; } this.returnList.forEach(function (value, key) { item.saleDetailDTOList.push(value); }); item.discount = item.discount == null ? 10 : item.discount; if (item.saleDetailDTOList) { for (var i = 0; i < item.saleDetailDTOList.length; i++) { var obj = {}; var attrMap = new Map(); var newSaleDetailDTOList = []; var num = 0; for (var m = 0; m < item.saleDetailDTOList[i].stockLogList1.length; m++) { if (attrMap.has(item.saleDetailDTOList[i].stockLogList1[m].attributeList) == true) { var hasCount = attrMap.get(item.saleDetailDTOList[i].stockLogList1[m].attributeList); newSaleDetailDTOList[hasCount].productCount = Number(newSaleDetailDTOList[hasCount].productCount) + Number(item.saleDetailDTOList[i].stockLogList1[m].productCount); if (this.isCancel == true) { newSaleDetailDTOList[hasCount].stockCount = newSaleDetailDTOList[hasCount].stockCount + newSaleDetailDTOList[hasCount].productCount; } } else { item.saleDetailDTOList[i].stockLogList1[m].name = this.sliceMsg(item.saleDetailDTOList[i].stockLogList1[m].attributeList); if (this.isCancel == true) { item.saleDetailDTOList[i].stockLogList1[m].stockCount = item.saleDetailDTOList[i].stockLogList1[m].stockCount + item.saleDetailDTOList[i].stockLogList1[m].productCount; } newSaleDetailDTOList.push(item.saleDetailDTOList[i].stockLogList1[m]); attrMap.set(item.saleDetailDTOList[i].stockLogList1[m].attributeList, num); num++; } } obj.saleDetailQueryDTO = newSaleDetailDTOList; obj.num = 0; obj.customerCategoryRule = item.saleDetailDTOList[i].customerCategoryRule != null ? JSON.parse(item.saleDetailDTOList[i].customerCategoryRule) : null; obj.id = item.saleDetailDTOList[i].productId; obj.price = item.saleDetailDTOList[i].price; if (item.status == '6') { obj.buyCount = item.saleDetailDTOList[i].buyCount; } else { obj.buyCount = item.saleDetailDTOList[i].buyCount - 1; } obj.lsprice = item.saleDetailDTOList[i].price; obj.categoryId = item.saleDetailDTOList[i].categoryId; obj.zPrice = item.saleDetailDTOList[i].discountAmount; obj.attrId = item.saleDetailDTOList[i].attrId; obj.discountAmount = item.saleDetailDTOList[i].discountAmount; obj.productName = item.saleDetailDTOList[i].productName; if (item.saleDetailDTOList[i].productPicture != null && item.saleDetailDTOList[i].productPicture != '') { obj.productPicture = item.saleDetailDTOList[i].productPicture + '?time=' + new Date().getTime(); } else { obj.productPicture = ""; } obj.productSn = item.saleDetailDTOList[i].productSn; obj.wholesalePrice = item.saleDetailDTOList[i].wholesalePrice; obj.returnPrice = item.saleDetailDTOList[i].returnPrice; obj.saleId = item.id; obj.remark = item.remark; obj.xsyId = item.createBy; obj.createByName = item.createByName; if (type == 'cancel') { obj.unitPrice = this.getUnitPrice(item, item.saleDetailDTOList[i]); } else { obj.unitPrice = item.saleDetailDTOList[i].discountAmount; } dataList.push(obj); } } else { var _obj = {}; _obj.num = 0; _obj.price = 0; _obj.saleId = item.id; _obj.remark = item.remark; _obj.xsyId = item.createBy; _obj.createByName = item.createByName; dataList.push(_obj); } this.$nextTick(function () { _this5.tui.request("/app/debt/selectByUserId", "post", { shopId: uni.getStorageSync('shopId'), userId: item.userId }, false, true).then(function (res) { if (res.code == 200) { _this5.returnList = new Map(); res.result.noEarn = res.result.amountOwed; res.result.name = res.result.userName; res.result.id = item.userId; uni.setStorageSync('khName', JSON.stringify(res.result)); uni.setStorageSync('carList1', JSON.stringify(dataList)); if (type == 'cancel') { uni.setStorageSync('discountAll', item.discount != null ? item.discount : 10); } uni.setStorageSync('hangOrder', true); uni.navigateTo({ url: '/package2/inventory/goodsList1HENG' }); } }); }); }, sliceMsg: function sliceMsg(val) { var name = ''; if (typeof val == 'string') { var newObj = JSON.parse(val); for (var as in newObj) { name += newObj[as] + '/'; } } return name; }, getUnitPrice: function getUnitPrice(item, items) { if (item.discount != 10) { if (item.discount == null || item.discount == 0 || item.discount == undefined) { return items.discountAmount; } else { return (items.discountAmount * 10000 / (item.discount * 100) / 10).toFixed(2); } } else if (items.discount != 10) { if (items.discount == null || items.discount == 0 || items.discount == undefined) { return items.discountAmount; } else { return (items.discountAmount * 10000 / (items.discount * 100) / 10).toFixed(2); } } else { return items.discountAmount || items.wholesalePrice; } }, // 取消订单 cancelOk: function cancelOk(item, type, index) { var _this6 = this; var that = this; that.inventoryList[index].isShowBtn = false; that.tui.request('/app/sale/cancelSale', "POST", { id: item.id }, true, true).then(function (res1) { if (res1.code == 200) { if (type == 'goPay') { _this6.isCancel = true; that.goSaleGoods(item, 'cancel'); } else { that.inventoryList[index].status = "2"; that.$forceUpdate(); uni.showToast({ title: "撤销成功", icon: 'none', duration: 1000 }); } } else { that.tui.toast(res.message); } }).catch(function (res1) {}); }, //退款接口 getReturnOrder1: function getReturnOrder1(id) { var _this7 = this; return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() { var that; return _regenerator.default.wrap(function _callee3$(_context3) { while (1) { switch (_context3.prev = _context3.next) { case 0: that = _this7; _context3.next = 3; return _this7.tui.request("/app/return/list", "post", { remark: 3, saleId: id }, false, false).then(function (res) { if (res.code == 200 && res.result != null && res.result != undefined) { if (res.result != '') { res.result.forEach(function (item) { _this7.tui.request("/app/return/get/" + item.id, "GET", null, false, false).then(function (res) { if (res.code == 200 && res.result != null && res.result != undefined) { for (var i = 0; i < res.result.saleDetailDTOList.length; i++) { res.result.saleDetailDTOList[i].returnPrice = res.result.saleDetailDTOList[i].discountAmount; res.result.saleDetailDTOList[i].stockLogList = new Map(); that.returnList.set(res.result.saleDetailDTOList[i].productId, res.result.saleDetailDTOList[i]); for (var m = 0; m < res.result.saleDetailDTOList[i].stockLogList1.length; m++) { res.result.saleDetailDTOList[i].stockLogList1[m].productCount = 0 - res.result.saleDetailDTOList[i].stockLogList1[m].productCount; that.returnList.get(res.result.saleDetailDTOList[i].productId).stockLogList.set(res.result.saleDetailDTOList[i].stockLogList1[m].attributeList, res.result.saleDetailDTOList[i].stockLogList1[m]); } } } }).catch(function (res) {}); }); } } else { _this7.tui.toast(res.message); } }); case 3: case "end": return _context3.stop(); } } }, _callee3); }))(); }, getOrderInfo: function getOrderInfo() { var _this8 = this; var that = this; this.tui.request("/app/sale/get/" + this.printId, "GET", { customerId: this.printCustomId }, false, false).then(function (res) { if (res.code == 200 && res.result != null && res.result != undefined) { if (res.result.sale.status == '2') { _this8.tui.toast('该订单已撤销'); } _this8.order = res.result.customer; _this8.sales = res.result.sale; if (res.result.sale.status == "7") { _this8.isShare = true; } if (res.result.dealingsRecord != null) { _this8.dealingsRecord = res.result.dealingsRecord; } if (res.result.sale.discount < 10) { //判断订单是否有折扣,整体折扣和单品折扣,都变为true _this8.zhengtizhekou = true; } _this8.list = res.result.saleDetailDTOList; for (var i = 0; i < that.list.length; i++) { if (that.list[i].realPrice != '' && that.list[i].discountAmount == null) { that.list[i].discountAmount = that.list[i].realPrice; } if (res.result.sale.discount < 10) { _this8.list[i].printDiscount = res.result.sale.discount; } else if (that.list[i].discount < 10) { _this8.zhengtizhekou = true; _this8.list[i].printDiscount = that.list[i].discount; } else { _this8.list[i].printDiscount = ''; } var isZiMu = false; var isNumber = false; var colorList = new Map(); var sizeNumList = []; var notNum = []; if (that.list[i].stockLogList1.length > 0) { for (var m = 0; m < that.list[i].stockLogList1.length; m++) { var attr = that.list[i].stockLogList1[m].attributeList; var newObj = JSON.parse(attr); for (var as in newObj) { if (as == '尺码' && that.isLetterOrDigit(newObj[as].replace(/码/g, '')) == 'Letter') { isZiMu = true; } if (as == '尺码' && that.isLetterOrDigit(newObj[as].replace(/码/g, '')) == 'Digit') { isNumber = true; } if (as == '尺码' && sizeNumList.indexOf(newObj[as].replace(/码/g, '')) == -1) { if (as == '尺码' && that.isLetterOrDigit(newObj[as].replace(/码/g, '')) == 'Digit') { sizeNumList.push(newObj[as].replace(/码/g, '')); } else { if (notNum.indexOf(newObj[as].replace(/码/g, '')) == -1) { notNum.push(newObj[as].replace(/码/g, '')); } } } if (as == '颜色') { if (colorList.has(newObj[as])) { colorList.get(newObj[as]).push(that.list[i].stockLogList1[m]); } else { var listChild = []; listChild.push(that.list[i].stockLogList1[m]); colorList.set(newObj[as], listChild); } } } } } if (notNum.length > 0) { sizeNumList = sizeNumList.concat(notNum); } var newStockList = []; if (isNumber) { sizeNumList = sizeNumList.sort(function (a, b) { return a - b; }); colorList.forEach(function (value, key) { for (var j = 0; j < sizeNumList.length; j++) { for (var m = 0; m < value.length; m++) { var newObj = JSON.parse(value[m].attributeList); var size = ''; var color = ''; for (var as in newObj) { if (as == '尺码') { size = newObj[as].replace(/码/g, ''); } } if (size == sizeNumList[j]) { newStockList.push(value[m]); value.splice(m, 1); break; } } } if (value.length > 0) { newStockList = newStockList.concat(value); } }); that.list[i].stockLogList1 = newStockList; } if (isZiMu) { colorList.forEach(function (value, key) { for (var j = 0; j < that.lettrList.length; j++) { for (var m = 0; m < value.length; m++) { var newObj = JSON.parse(value[m].attributeList); var size = ''; var color = ''; for (var as in newObj) { if (as == '尺码') { size = newObj[as].replace(/码/g, ''); } } if (size == that.lettrList[j]) { newStockList.push(value[m]); value.splice(m, 1); break; } } } if (value.length > 0) { newStockList = newStockList.concat(value); } }); that.list[i].stockLogList1 = newStockList; } for (var m = 0; m < _this8.list[i].stockLogList1.length; m++) { if (_this8.list[i].productCount == null) { _this8.list[i].productCount = _this8.list[i].stockLogList1[m].productCount; } else { _this8.list[i].productCount += _this8.list[i].stockLogList1[m].productCount; } var hasBuy = ''; if (_this8.list[i].stockLogList1[m].isPurchasedBefore == 0 || _this8.list[i].stockLogList1[m].isPurchasedBefore == 1 && _this8.sales.userName == '散客') { hasBuy = '【销】'; } if (_this8.list[i].stockLogList1[m].isPurchasedBefore == 1 && _this8.sales.userName != '散客') { hasBuy = '【补】'; } var tableData = { productSn: hasBuy + _this8.list[i].productSn, productName: _this8.list[i].productName, productCount: _this8.list[i].stockLogList1[m].productCount, attributeList: _this8.list[i].stockLogList1[m].attributeList, discountAmount: _this8.list[i].discountAmount }; that.listHeng.push(tableData); } _this8.list[i].chengben = _this8.list[i].productCount * _this8.list[i].purchasePrice; } _this8.newData = JSON.parse(JSON.stringify(_this8.list)); _this8.orderXd = res.result.orderXd; _this8.shopData = res.result.shop; _this8.splitTextIntoChunks(res.result.shop.shopAddress, 30); _this8.getReturnOrder(_this8.printId); _this8.analysisQrCode(); } else { if (res.code == 500 && res.message == 'java.lang.NullPointerException') { _this8.tui.toast('该订单已撤销,无法查看'); } else { _this8.tui.toast(res.message); } } }).catch(function (res) {}); }, // 展示二维码 showQrcode: function showQrcode() { for (var i = 0; i < _this.$refs.qrcodePopup.length; i++) { _this.$refs.qrcodePopup[i].crtQrCode(); } }, senrPath: function senrPath() { var _this9 = this; return new Promise( /*#__PURE__*/function () { var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(resolve, reject) { var that, ctx, imgA; return _regenerator.default.wrap(function _callee4$(_context4) { while (1) { switch (_context4.prev = _context4.next) { case 0: that = _this9; uni.showLoading({ title: '生成中...' }); ctx = uni.createCanvasContext('myCanvas1', _this9); //背景图 imgA = 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/38568f1580bc423698d2a499197a5b44.png'; uni.downloadFile({ url: imgA, success: function success(res2) { if (res2.statusCode === 200) { // // 绘制第一张图片 ctx.drawImage(res2.tempFilePath, 0, 0, 1515, 1210); ctx.draw(true); // 设置字体样式 ctx.font = 'bold 80px SimSun'; // 设置文字颜色 ctx.fillStyle = '#FF5809'; var beginHeight = 450; if (that.sales.productCount != null && that.sales.productCount != '') { var textWidth = 350; // 计算居中位置 beginHeight += 100; // 绘制文字 ctx.fillText('销售', textWidth, beginHeight); ctx.draw(true); // 设置字体样式 ctx.font = 'bold 60px SimSun'; // 设置文字颜色 ctx.fillStyle = '#FF5809'; beginHeight += 90; var text = '总件数:' + that.sales.productCount + ' 总金额:' + that.sales.totalAmount; // 绘制文字 ctx.fillText(text, textWidth, beginHeight); ctx.draw(true); } if (that.returnNum != null && that.returnNum != '') { beginHeight += 110; var textWidth = 350; // 绘制文字 // 设置字体样式 ctx.font = 'bold 80px SimSun'; // 设置文字颜色 ctx.fillStyle = '#FF5809'; ctx.fillText('退货', textWidth, beginHeight); ctx.draw(true); beginHeight += 90; // 设置字体样式 ctx.font = 'bold 60px SimSun'; // 设置文字颜色 ctx.fillStyle = '#FF5809'; var text = '总件数:' + that.returnNum + ' 总金额:' + that.returnPrice; // 绘制文字 ctx.fillText(text, textWidth, beginHeight); ctx.draw(true); } if (that.sales.realAmount != null) { var textWidth = 350; beginHeight += 120; // 绘制文字 // 设置字体样式 ctx.font = 'bold 80px SimSun'; // 设置文字颜色 ctx.fillStyle = 'black'; ctx.fillText('本单应收:' + that.sales.realAmount, textWidth, beginHeight); ctx.draw(true); } if (that.sales.alreadyEarn != null) { beginHeight += 100; var textWidth = 350; // 绘制文字 // 设置字体样式 ctx.font = 'bold 80px SimSun'; // 设置文字颜色 ctx.fillStyle = 'black'; ctx.fillText('本单实收:' + that.sales.alreadyEarn, textWidth, beginHeight); ctx.draw(true); beginHeight += 120; } setTimeout(function (ress) { uni.canvasToTempFilePath({ x: 0, y: 0, width: 1515, height: 1210, destWidth: 1515, destHeight: 1210, canvasId: 'myCanvas1', success: function success(res3) { uni.hideLoading(); return resolve(res3.tempFilePath); } }); }, 500); } } }); case 5: case "end": return _context4.stop(); } } }, _callee4); })); return function (_x, _x2) { return _ref.apply(this, arguments); }; }()); }, returnRealSize: function returnRealSize(size) { if (this.smailDcl >= 1) { return Number((size / this.smailDcl).toFixed(2)); } else { return size; } }, returnFontSize: function returnFontSize(size) { return Number((size / this.smailDcl).toFixed(0)) - 1; }, getData: function getData() { var _this10 = this; var that = this; if (that.picOk) { uni.showLoading({ title: '图片绘制中...' }); } else { this.tui.toast('账单生成中...'); return; } var dataHeight = that.printHeight1; this.canvasshow = true; var ctx = uni.createCanvasContext('myCanvas', this); ctx.fillStyle = "#FFFFFF"; ctx.fillRect(0, 0, that.printWidth1, dataHeight); //店铺名 // 设置字体样式 ctx.font = 'bold ' + that.returnFontSize(150) + 'px SimSun'; // 设置文字颜色 ctx.fillStyle = 'black'; var text = this.shopName + ' 销售单'; var textWidth = ctx.measureText(text).width; // 计算居中位置 var x = (that.printWidth1 - textWidth) / 2; // 绘制文字 ctx.fillText(text, x, that.returnRealSize(300)); ctx.draw(true); // 设置字体样式 ctx.font = 'bold ' + that.returnFontSize(60) + 'px SimSun'; // 设置文字颜色 ctx.fillStyle = 'black'; // 客户 ctx.fillText('客户:' + (that.shopId == '1863043415453863936' && that.order.name == '散客' ? '客户' : that.order.name ? that.order.name : '散客'), that.returnRealSize(20), that.returnRealSize(500)); ctx.fillText('单号:' + that.sales.id, that.returnRealSize(1450), that.returnRealSize(500)); // 销售员 ctx.fillText('销售员:' + that.sales.createByName, that.returnRealSize(20), that.returnRealSize(600)); ctx.fillText('日期:' + that.sales.createTime, that.returnRealSize(1450), that.returnRealSize(600)); // 横线 ctx.fillText('-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------', that.returnRealSize(20), that.returnRealSize(700)); // 数据 if (this.printingMethod == '0' || this.printingMethod == '2') { ctx.fillText('货号(名称)', that.returnRealSize(20), that.returnRealSize(800)); ctx.fillText('规格', that.returnRealSize(1040), that.returnRealSize(800)); ctx.fillText('数量', that.returnRealSize(1590), that.returnRealSize(800)); ctx.fillText('单价', that.returnRealSize(1875), that.returnRealSize(800)); ctx.fillText('总价', that.returnRealSize(2140), that.returnRealSize(800)); // 横线 ctx.fillText('-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------', that.returnRealSize(20), that.returnRealSize(900)); } var dataheigth = that.returnRealSize(700); var dataheigth1 = that.returnRealSize(900); var moretime = 0; var Xindex = 0; for (var i = 0; i < that.newData.length; i++) { if (this.printingMethod == '1') { moretime += 140; dataheigth += that.returnRealSize(100); //货号 if (that.newData[i].productName == that.newData[i].productSn) { ctx.fillText(that.newData[i].productSn, that.returnRealSize(20), dataheigth); } else { ctx.fillText(that.newData[i].productSn + '(' + (that.newData[i].productName == null ? '' : that.newData[i].productName) + ')', that.returnRealSize(20), dataheigth); } dataheigth += that.returnRealSize(100); //尺码头 ctx.fillText('颜色', that.returnRealSize(20), dataheigth); var startWith = that.returnRealSize(450); for (var a = 0; a < that.newData[i].sizeList.length; a++) { if ((that.shopId == '1820269107191353344' || that.shopId == '1818888277105709056') && that.newData[i].sizeList[a] == '均') { that.newData[i].sizeList[a] = '分码'; } ctx.fillText(that.newData[i].sizeList[a], startWith, dataheigth); startWith += Math.floor(that.returnRealSize(1250) / 8); } ctx.fillText('数量', that.returnRealSize(1700), dataheigth); ctx.fillText('单价', that.returnRealSize(1950), dataheigth); ctx.fillText('总价', that.returnRealSize(2200), dataheigth); var begin = 0; that.newData[i].sizePrintList.forEach(function (value, key) { moretime += 70; dataheigth += that.returnRealSize(100); if ((that.shopId == '1820269107191353344' || that.shopId == '1818888277105709056') && key == '均色') { key = '分色'; } ctx.fillText(key, that.returnRealSize(20), dataheigth); var childStartWith = that.returnRealSize(450); var allCount = 0; var discountAmount = 0; for (var _a = 0; _a < that.newData[i].sizeList.length; _a++) { var printSizeCount = []; if (that.newData[i].sizeList[_a] == '分码') { that.newData[i].sizeList[_a] = '均'; } if (value.has(that.newData[i].sizeList[_a])) { printSizeCount = value.get(that.newData[i].sizeList[_a]).split(':'); discountAmount = printSizeCount[1] == undefined ? '' : printSizeCount[1]; } allCount += printSizeCount[0] == undefined ? 0 : Number(printSizeCount[0]); that.newData[i].allCount = allCount; ctx.fillText(printSizeCount[0] == undefined ? '' : Number(printSizeCount[0]), childStartWith, dataheigth); childStartWith += Math.floor(that.returnRealSize(1250) / 8); } ctx.fillText(allCount, that.returnRealSize(1700), dataheigth); ctx.fillText(discountAmount, that.returnRealSize(1950), dataheigth); ctx.fillText(allCount * discountAmount, that.returnRealSize(2200), dataheigth); }); // 横线 ctx.fillText('-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------', that.returnRealSize(20), dataheigth += that.returnRealSize(100)); } else { for (var m = 0; m < that.newData[i].stockLogList1.length; m++) { moretime += 80; dataheigth1 += that.returnRealSize(100); if (that.newData[i].stockLogList1[m].isReturn) { if (that.newData[i].productName == that.newData[i].productSn) { ctx.fillText((Xindex += 1) + '.' + '【退】' + that.newData[i].productSn, that.returnRealSize(20), dataheigth1); } else { ctx.fillText((Xindex += 1) + '.' + '【退】' + that.newData[i].productSn + '(' + (that.newData[i].productName == null ? '' : that.newData[i].productName) + ')', that.returnRealSize(20), dataheigth1); } } else { if (that.newData[i].productName == that.newData[i].productSn && that.order.name != '散客') { if (that.newData[i].stockLogList1[m].isPurchasedBefore == 1) { //买过 ctx.fillText((Xindex += 1) + '.' + '【补】' + that.newData[i].productSn, that.returnRealSize(20), dataheigth1); } else { // 0是没买过 ctx.fillText((Xindex += 1) + '.' + '【销】' + that.newData[i].productSn, that.returnRealSize(20), dataheigth1); } } else { if (that.newData[i].stockLogList1[m].isPurchasedBefore == 1 && that.order.name != '散客') { //买过 ctx.fillText((Xindex += 1) + '.' + '【补】' + that.newData[i].productSn + '(' + (that.newData[i].productName == null ? '' : that.newData[i].productName) + ')', that.returnRealSize(20), dataheigth1); } else { // 0是没买过 ctx.fillText((Xindex += 1) + '.' + '【销】' + that.newData[i].productSn + '(' + (that.newData[i].productName == null ? '' : that.newData[i].productName) + ')', that.returnRealSize(20), dataheigth1); } } } if (that.shopId == '1820269107191353344' || that.shopId == '1818888277105709056') { if (that.newData[i].stockLogList1[m].attributeList.indexOf('均色') != -1) { that.newData[i].stockLogList1[m].attributeList = that.newData[i].stockLogList1[m].attributeList.replace(/均色/g, '分色'); } if (that.newData[i].stockLogList1[m].attributeList.indexOf('均码') != -1) { that.newData[i].stockLogList1[m].attributeList = that.newData[i].stockLogList1[m].attributeList.replace(/均码/g, '分码'); } } ctx.fillText(that.slicePrint(that.newData[i].stockLogList1[m].attributeList), that.returnRealSize(1040), dataheigth1); ctx.fillText(that.newData[i].stockLogList1[m].productCount, that.returnRealSize(1590), dataheigth1); if (that.newData[i].stockLogList1[m].isReturn) { ctx.fillText(that.newData[i].stockLogList1[m].discountAmount, that.returnRealSize(1875), dataheigth1); ctx.fillText(that.newData[i].stockLogList1[m].discountAmount * that.newData[i].stockLogList1[m].productCount, that.returnRealSize(2140), dataheigth1); } else { ctx.fillText(that.newData[i].discountAmount, that.returnRealSize(1875), dataheigth1); ctx.fillText(that.newData[i].discountAmount * that.newData[i].stockLogList1[m].productCount, that.returnRealSize(2140), dataheigth1); } // 横线 ctx.fillText('-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------', that.returnRealSize(20), dataheigth1 += that.returnRealSize(100)); } } } var lastHeight = 0; if (this.printingMethod == '1') { lastHeight = dataheigth; } else { lastHeight = dataheigth1; } ctx.fillText('合计:', that.returnRealSize(20), lastHeight += that.returnRealSize(100)); ctx.fillText(that.sales.productCount + '件', that.returnRealSize(1700), lastHeight); ctx.fillText(that.sales.totalAmount, that.returnRealSize(2200), lastHeight); ctx.fillText('-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------', that.returnRealSize(20), lastHeight += that.returnRealSize(100)); ctx.draw(true); // 设置字体样式 ctx.font = 'bold ' + that.returnFontSize(70) + 'px SimSun'; // 设置文字颜色 ctx.fillStyle = 'black'; ctx.fillText('本单应收:' + that.sales.realAmount + '(' + this.convertToChineseNumeral(that.sales.realAmount) + ')', that.returnRealSize(20), lastHeight += that.returnRealSize(100)); if (that.dealingsRecord.lastDebtAmount >= 0) { ctx.fillText('之前欠款:' + that.dealingsRecord.lastDebtAmount, that.returnRealSize(1700), lastHeight); } else if (that.dealingsRecord.lastDebtAmount < 0) { ctx.fillText('之前余额:' + Math.abs(that.dealingsRecord.lastDebtAmount), that.returnRealSize(1700), lastHeight); } else { ctx.fillText('之前欠款:0', that.returnRealSize(1700), lastHeight); } ctx.fillText('-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------', that.returnRealSize(20), lastHeight += that.returnRealSize(100)); ctx.fillText('本单实收:' + that.sales.alreadyEarn + '(' + this.convertToChineseNumeral(that.sales.alreadyEarn) + ')', that.returnRealSize(20), lastHeight += that.returnRealSize(100)); if (that.dealingsRecord.balanceDue >= 0) { ctx.fillText('累计欠款:' + that.dealingsRecord.balanceDue, that.returnRealSize(1700), lastHeight); } else if (that.dealingsRecord.balanceDue < 0) { ctx.fillText('累计余额:' + Math.abs(that.dealingsRecord.balanceDue), that.returnRealSize(1700), lastHeight); } else { ctx.fillText('累计欠款:0', that.returnRealSize(1700), lastHeight); } ctx.fillText('-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------', that.returnRealSize(20), lastHeight += that.returnRealSize(100)); ctx.draw(true); // 设置字体样式 ctx.font = 'bold ' + that.returnFontSize(60) + 'px SimSun'; // 设置文字颜色 ctx.fillStyle = 'black'; if (that.sales.noEarn >= 0) { ctx.fillText('本单欠款:' + that.sales.noEarn, that.returnRealSize(20), lastHeight += that.returnRealSize(100)); } else { ctx.fillText('本单余额:' + Math.abs(that.sales.noEarn), that.returnRealSize(20), lastHeight += that.returnRealSize(100)); } if (that.returnPrice > 0) { ctx.fillText('退货数量:' + that.returnNum, that.returnRealSize(900), lastHeight); ctx.fillText('退货金额:' + that.returnPrice, that.returnRealSize(1700), lastHeight); } ctx.fillText('-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------', that.returnRealSize(20), lastHeight += that.returnRealSize(100)); if (that.sales.remark) { ctx.fillText('订单备注:' + that.sales.remark, that.returnRealSize(20), lastHeight += that.returnRealSize(100)); ctx.fillText('-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------', that.returnRealSize(20), lastHeight += that.returnRealSize(100)); } ctx.fillText('店铺地址:' + this.addressArr, that.returnRealSize(20), lastHeight += that.returnRealSize(100)); if (this.shopId == '1820391948796694529' || this.shopId == '1848966744035692545' || this.shopId == '1850038419279974400') { ctx.fillText('店铺电话:' + this.jinjuPhone, that.returnRealSize(20), lastHeight += that.returnRealSize(100)); } else if (this.shopId == '1834512626093264897') { ctx.fillText('店铺电话:13191998128', that.returnRealSize(20), lastHeight += that.returnRealSize(100)); } else { ctx.fillText('店铺电话:' + (uni.getStorageSync('shopOwnerPhone') ? uni.getStorageSync('shopOwnerPhone') : uni.getStorageSync('username')), that.returnRealSize(20), lastHeight += that.returnRealSize(100)); } if (this.sales.companyName != null) { ctx.fillText('发货方式:' + this.sales.companyName + ' ' + this.sales.companyPhone, that.returnRealSize(20), lastHeight += that.returnRealSize(100)); } if (this.shopRemark.length > 0) { for (var _i = 0; _i < this.shopRemark.length; _i++) { ctx.fillText(this.shopRemark[_i], that.returnRealSize(20), lastHeight += that.returnRealSize(100)); } } ctx.fillText('-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------', that.returnRealSize(20), lastHeight += that.returnRealSize(100)); ctx.draw(true); var begineidth = that.returnRealSize(20); var wenheight = lastHeight + that.returnRealSize(150); lastHeight += that.returnRealSize(200); var _loop = function _loop(_a2) { setTimeout(function (ress) { uni.downloadFile({ url: that.qrArr[_a2].imgUrl, success: function success(res2) { if (res2.statusCode === 200) { ctx.fillText(that.qrArr[_a2].name, begineidth, wenheight); ctx.drawImage(res2.tempFilePath, begineidth, lastHeight, that.returnRealSize(400), that.returnRealSize(400)); ctx.draw(true); begineidth += that.returnRealSize(640); } } }); }, 800 * (_a2 + 1) + moretime); }; for (var _a2 = 0; _a2 < that.qrArr.length; _a2++) { _loop(_a2); } setTimeout(function (ress) { uni.canvasToTempFilePath({ x: 0, y: 0, width: _this10.printWidth1, height: _this10.printHeight1, destWidth: _this10.printWidth1, destHeight: _this10.printHeight1, canvasId: 'myCanvas', success: function success(res3) { _this10.canvasshow = false; _this10.tempFilePath = res3.tempFilePath; uni.previewImage({ urls: [res3.tempFilePath] }); uni.hideLoading(); } }); }, 1000 * that.qrArr.length + moretime); }, isLetterOrDigit: function isLetterOrDigit(character) { if (/[a-zA-Z]/.test(character)) { return 'Letter'; } else if (/[0-9]/.test(character)) { return 'Digit'; } else { return 'Neither'; } }, //传入组件的方法 hideQrcode: function hideQrcode() { this.modal_qr = false; }, //打印小票二维码,分割二维码字符串 analysisQrCode: function analysisQrCode() { var _this11 = this; var that = this; that.tui.request("/app/shop/getShopInfoById", "post", { id: this.shopId }, false, true).then(function (res) { if (res.code == 200) { _this11.printingMethod = res.result.printingMethod == null ? '0' : res.result.printingMethod; _this11.shopName = res.result.shopName; _this11.shopRemark = res.result.remark.split('\n'); _this11.shopAddress = res.result.shopAddress; _this11.shopRemark1 = res.result.remark; _this11.jinjuPhone = res.result.contactPhone; var qrCode = res.result.shopIcon; if (qrCode != '') { var data = qrCode.split(','); for (var i = 0; i < data.length; i++) { if (qrCode.indexOf('@_@') != -1) { var obj = { name: data[i].split('@_@')[0], path: data[i].split('@_@')[1], imgUrl: data[i].split('@_@')[2], level: "M" }; _this11.qrArr.push(obj); } else { var weixin = data[i].indexOf("微信"); var dianpu = data[i].indexOf("店铺"); var zifubao = data[i].indexOf("支付"); var yinlian = data[i].indexOf("收款"); var duizhang = data[i].indexOf("对账"); if (duizhang != -1) { var result = data[i].substring(duizhang + 2); var _obj2 = { name: '查看对账单', path: result, level: "M" }; _this11.qrArr.push(_obj2); } if (dianpu != -1) { var result = data[i].substring(dianpu + 2); var _obj3 = { name: '店铺微信', path: result, level: "M" }; _this11.qrArr.push(_obj3); } if (weixin != -1) { var result = data[i].substring(weixin + 2); var _obj4 = { name: '微信收款码', path: result, level: "M" }; _this11.qrArr.push(_obj4); } if (zifubao != -1) { var result = data[i].substring(zifubao + 2); var _obj5 = { name: '支付宝收款码', path: result, level: "Q" }; _this11.qrArr.push(_obj5); } if (yinlian != -1) { var result = data[i].substring(yinlian + 2); var _obj6 = { name: '银行收款码', path: result, level: "M" }; _this11.qrArr.push(_obj6); } } } setTimeout(function (res) { if (_this11.qrArr.length > 0) { that.getQRCode(); } }, 1000); } } }).catch(function (res) {}); }, goToInfo: function goToInfo() { var pages = getCurrentPages(); if (pages.length > 1) { uni.navigateBack({ delta: 1 }); } else { uni.reLaunch({ url: '/pages/index/home' }); } }, deleteOrder: function deleteOrder() { var that = this; uni.showModal({ title: "提示", content: "确定删除此条挂单吗?", success: function success(res) { if (res.confirm) { that.tui.request("/app/sale/delById", "post", { id: that.saleId }, false, true).then(function (res) { if (res.code == 200) { setTimeout(function (res) { uni.showToast({ title: "删除成功", icon: 'none' }); }, 1000); uni.navigateBack(); } else { uni.showToast({ title: "删除失败", icon: 'none' }); } }).catch(function (res) {}); } } }); }, getPrintHeight: function getPrintHeight() { var that = this; this.printHeight = 960; this.printHeight1 = 1900; this.printWidth1 = 2500; if (this.printingMethod == '1') { if (that.shopId == '1822829636942434305' || that.shopId == '1818888277105709056') { for (var i = 0; i < that.newData.length; i++) { this.printHeight1 += 300; this.printHeight += 100; this.printHeight += that.newData[i].sizePrintList.size * 90; this.printHeight1 += that.newData[i].sizePrintList.size * 100; } } else { for (var _i2 = 0; _i2 < that.newData.length; _i2++) { this.printHeight1 += 300; this.printHeight += 90; this.printHeight += that.newData[_i2].sizePrintList.size * 40; this.printHeight1 += that.newData[_i2].sizePrintList.size * 100; } } } else { this.printHeight1 += 200; for (var _i3 = 0; _i3 < that.newData.length; _i3++) { this.printHeight += 40; for (var m = 0; m < that.newData[_i3].stockLogList1.length; m++) { this.printHeight1 += 200; this.printHeight += 40; } } } if (that.qrArr.length > 0) { if (uni.getStorageSync('shopId') == '1890655721893269507' || uni.getStorageSync('shopId') == '1844355592815251456') { //原创家二维码放大了 this.printHeight += 452; } else { this.printHeight += 360; } this.printHeight1 += 1000; } if (that.shopRemark.length > 0) { this.printHeight += that.shopRemark.length * 40; this.printHeight1 += that.shopRemark.length * 100; } if (that.sales.remark) { this.printHeight += 100; this.printHeight1 += 100; } var smailBegin = 4000; if (that.deviceType == 'ios') { smailBegin = 2500; } this.smailDcl = Number(Number(this.printHeight1 / smailBegin).toFixed(2)); this.printHeight1 = smailBegin; this.myCanvasHeight = this.printHeight1 + 'px'; if (this.smailDcl >= 1) { this.printWidth1 = Number(Number(this.printWidth1 / this.smailDcl).toFixed(0)); } this.myCanvasWidth = this.printWidth1 + 'px'; setTimeout(function (res) { that.picOk = true; }, 1000); }, //生成二维码 getQRCode: function getQRCode() { var _this12 = this; var that = this; var _loop2 = function _loop2(i) { setTimeout(function (res1) { that.QrUrl = that.qrArr[i].path; var data = { name: that.qrArr[i].name, path: "" }; setTimeout(function (res1) { _this12.$refs.uqrcode.toTempFilePath({ success: function success(res) { data.path = res.tempFilePath; that.newQRList1.push(data); that.newQRList.push(data); } }); }, 500 * i); }, 1000 * i); }; for (var i = 0; i < that.qrArr.length; i++) { _loop2(i); } }, splitTextIntoChunks: function splitTextIntoChunks(text, chunkSize) { var _this13 = this; var result = []; for (var i = 0; i < text.length; i += chunkSize) { result.push(text.slice(i, i + chunkSize)); } this.$nextTick(function () { _this13.addressArr = result; }); }, sizeHengFn: function sizeHengFn() { this.isSizeHeng = !this.isSizeHeng; }, //打印小票 onPrintSmall: function onPrintSmall() { var _this14 = this; var that = this; this.$refs.printPopup.close(); var strCmd = ''; var pageNum = 1; var Xindex = 0; if (this.printingMethod == '0') { that.yNum = 405; } else { that.yNum = 350; } strCmd = blesdk.CreatCPCLPage(1080, this.printHeight >= 1990 * pageNum ? 1990 : this.printHeight, 1, 0, 0); strCmd += blesdk.addCPCLSETMAG(4, 4); blesdk.addCPCLSETBOLD('bold'); strCmd += blesdk.addCPCLLocation(2); strCmd += blesdk.addCPCLText('0', '120', '24', '0', 0, this.shopName); strCmd += blesdk.addCPCLSETMAG(1, 1); strCmd += blesdk.addCPCLLocation(0); blesdk.addCPCLSETBOLD('bold'); if (this.shopId == '1865592366551928832' || this.shopId == '1818888277105709056') { var orderPayType = this.sales.payType == null ? '暂无' : this.sales.payType == 0 ? '现金收款' : this.sales.payType == 1 ? '微信收款' : this.sales.payType == 2 ? '支付宝收款' : this.sales.payType == 3 ? '银行卡转账' : this.sales.payType == 4 ? '收款码收款' : ''; strCmd += blesdk.addCPCLText('500', '250', '24', '0', 0, '收款方式:' + orderPayType); } if (this.shopName == '杰娜世家' || this.shopName == '老早测试') { strCmd += blesdk.addCPCLText('0', '250', '24', '0', 0, '客户地址:' + that.order.address); } strCmd += blesdk.addCPCLText('0', '300', '24', '0', 0, '客户:' + (this.shopId == '1863043415453863936' && that.order.name == '散客' ? '客户' : that.order.name ? that.order.name : '散客')); strCmd += blesdk.addCPCLSETMAG(1, 1); strCmd += blesdk.addCPCLLocation(0); strCmd += blesdk.addCPCLText('500', '300', '24', '0', 0, '单号:' + that.sales.id); strCmd += blesdk.addCPCLText('0', '350', '24', '0', 0, '销售员:' + that.sales.createByName); strCmd += blesdk.addCPCLText('500', '350', '24', '0', 0, '日期:' + that.sales.createTime); var guige = '420'; var shuliang = '600'; if (this.zhengtizhekou) { guige = '350'; shuliang = '530'; } var zhekou = '600'; var danjia = '660'; var zongjia = '730'; if (this.printingMethod == '0') { strCmd += blesdk.addCPCLText('0', '390', '24', '0', 0, '-----------------------------------------------------------------------------------'); strCmd += blesdk.addCPCLText('10', that.yNum += 40, '24', '0', 0, '货号(名称)'); strCmd += blesdk.addCPCLText(guige, that.yNum, '24', '0', 0, '规格'); strCmd += blesdk.addCPCLText(shuliang, that.yNum, '24', '0', 0, '数量'); if (this.zhengtizhekou) { strCmd += blesdk.addCPCLText(zhekou, that.yNum, '24', '0', 0, '折扣'); } strCmd += blesdk.addCPCLText(danjia, that.yNum, '24', '0', 0, '单价'); strCmd += blesdk.addCPCLText(zongjia, that.yNum, '24', '0', 0, '总价'); } else if (this.printingMethod == '2') { that.yNum = 370; strCmd += blesdk.addCPCLText('0', '370', '24', '0', 0, '-----------------------------------------------------------------------------------'); strCmd += blesdk.addCPCLText('10', that.yNum += 40, '24', '0', 0, '货号(名称)'); strCmd += blesdk.addCPCLText('420', that.yNum, '24', '0', 0, '数量'); if (that.zhengtizhekou) { strCmd += blesdk.addCPCLText('510', that.yNum, '24', '0', 0, '折扣'); strCmd += blesdk.addCPCLText('600', that.yNum, '24', '0', 0, '单价'); } else { strCmd += blesdk.addCPCLText('575', that.yNum, '24', '0', 0, '单价'); } strCmd += blesdk.addCPCLText('730', that.yNum, '24', '0', 0, '总价'); } var _loop3 = function _loop3() { var colorHeight = 25; if (that.shopId == '1822829636942434305' || that.shopId == '1818888277105709056') { colorHeight = 50; } if (that.yNum + colorHeight >= 1990) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); strCmd = blesdk.CreatCPCLPage(1080, _this14.printHeight - that.yNum + colorHeight >= 1990 ? 1990 : _this14.printHeight - that.yNum + colorHeight, 1, 0, 162); that.yNum = 0; pageNum++; if (_this14.printingMethod != '2') { strCmd += blesdk.addCPCLText('0', that.yNum += colorHeight, '24', '0', 0, '-----------------------------------------------------------------------------------'); } } else { if (_this14.printingMethod != '2') { strCmd += blesdk.addCPCLText('0', that.yNum += colorHeight, '24', '0', 0, '-----------------------------------------------------------------------------------'); } } if (_this14.printingMethod == '1') { if (that.yNum + 64 >= 1990) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); strCmd = blesdk.CreatCPCLPage(1080, _this14.printHeight - that.yNum + 64 >= 1990 ? 1990 : _this14.printHeight - that.yNum + 64, 1, 0, 162); that.yNum = 0; pageNum++; } var fountSize = '0'; if (that.shopId == '1822829636942434305' || that.shopId == '1818888277105709056') { fountSize = '1'; } if (that.newData[i].productName == that.newData[i].productSn) { strCmd += blesdk.addCPCLText('0', that.yNum += 40, '24', fountSize, 0, that.newData[i].productSn); } else { strCmd += blesdk.addCPCLText('0', that.yNum += 40, '24', fountSize, 0, that.newData[i].productSn + '(' + (that.newData[i].productName == null ? '' : that.newData[i].productName) + ')'); } colorHeight = 64; if (that.shopId == '1822829636942434305' || that.shopId == '1818888277105709056') { colorHeight = 80; } if (that.yNum + colorHeight >= 1990) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); strCmd = blesdk.CreatCPCLPage(1080, _this14.printHeight - that.yNum + colorHeight >= 1990 ? 1990 : _this14.printHeight - that.yNum + colorHeight, 1, 0, 180); that.yNum = 0; pageNum++; } colorHeight = 40; if (that.shopId == '1822829636942434305' || that.shopId == '1818888277105709056') { fountSize = '1'; colorHeight = 58; } strCmd += blesdk.addCPCLText('0', that.yNum += colorHeight, '24', fountSize, 0, '颜色'); var startWith = 180; for (var a = 0; a < that.newData[i].sizeList.length; a++) { if ((that.shopId == '1820269107191353344' || that.shopId == '1818888277105709056') && that.newData[i].sizeList[a] == '均') { that.newData[i].sizeList[a] = '分码'; } strCmd += blesdk.addCPCLSETBOLD('400'); var _fountSize = '0'; var widthSize = 420; if (that.shopId == '1822829636942434305' || that.shopId == '1818888277105709056') { _fountSize = '1'; widthSize = 470; } strCmd += blesdk.addCPCLText(startWith.toString(), that.yNum, '24', _fountSize, 0, that.newData[i].sizeList[a]); strCmd += blesdk.addCPCLSETBOLD('0'); startWith += Math.floor(widthSize / 8); } if (that.zhengtizhekou) { strCmd += blesdk.addCPCLText('562', that.yNum, '24', fountSize, 0, '数量'); strCmd += blesdk.addCPCLText('628', that.yNum, '24', fountSize, 0, '折扣'); strCmd += blesdk.addCPCLText('694', that.yNum, '24', fountSize, 0, '单价'); strCmd += blesdk.addCPCLText('770', that.yNum, '24', fountSize, 0, '总价'); } else { strCmd += blesdk.addCPCLText('578', that.yNum, '24', fountSize, 0, '数量'); strCmd += blesdk.addCPCLText('644', that.yNum, '24', fountSize, 0, '单价'); strCmd += blesdk.addCPCLText('720', that.yNum, '24', fountSize, 0, '总价'); } var begin = 0; that.newData[i].sizePrintList.forEach(function (value, key) { colorHeight = 64; if (that.shopId == '1822829636942434305' || that.shopId == '1818888277105709056') { colorHeight = 90; } if (that.yNum + colorHeight >= 1990) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); strCmd = blesdk.CreatCPCLPage(1080, that.printHeight - that.yNum + colorHeight >= 1990 ? 1990 : that.printHeight - that.yNum + colorHeight, 1, 0, 180); that.yNum = 0; pageNum++; } if ((that.shopId == '1820269107191353344' || that.shopId == '1818888277105709056') && key == '均色') { key = '分色'; } var beginHeight = 40; var widthSize = 420; var fountSize = '0'; if (that.shopId == '1822829636942434305' || that.shopId == '1818888277105709056') { beginHeight = 58; } begin++; if (that.shopId == '1822829636942434305' || that.shopId == '1818888277105709056') { fountSize = '1'; widthSize = 470; } strCmd += blesdk.addCPCLText('0', that.yNum += beginHeight, '24', fountSize, 0, key); var childStartWith = 180; var allCount = 0; var discountAmount = 0; for (var _a3 = 0; _a3 < that.newData[i].sizeList.length; _a3++) { var printSizeCount = []; if (that.newData[i].sizeList[_a3] == '分码') { that.newData[i].sizeList[_a3] = '均'; } if (value.has(that.newData[i].sizeList[_a3])) { printSizeCount = value.get(that.newData[i].sizeList[_a3]).split(':'); discountAmount = printSizeCount[1] == undefined ? '' : printSizeCount[1]; } allCount += printSizeCount[0] == undefined ? 0 : Number(printSizeCount[0]); that.newData[i].allCount = allCount; strCmd += blesdk.addCPCLText(childStartWith.toString(), that.yNum, '24', fountSize, 0, printSizeCount[0] == undefined ? '' : Number(printSizeCount[0])); childStartWith += Math.floor(widthSize / 8); } if (that.zhengtizhekou) { strCmd += blesdk.addCPCLText('562', that.yNum, '24', fountSize, 0, allCount); strCmd += blesdk.addCPCLText('628', that.yNum, '24', fountSize, 0, that.newData[i].printDiscount); strCmd += blesdk.addCPCLText('694', that.yNum, '24', fountSize, 0, discountAmount); strCmd += blesdk.addCPCLText('770', that.yNum, '24', fountSize, 0, allCount * discountAmount); } else { strCmd += blesdk.addCPCLText('578', that.yNum, '24', fountSize, 0, allCount); strCmd += blesdk.addCPCLText('644', that.yNum, '24', fountSize, 0, discountAmount); strCmd += blesdk.addCPCLText('720', that.yNum, '24', fountSize, 0, allCount * discountAmount); } }); } else if (_this14.printingMethod == '2') { var returnCount = 0; var buyCount = 0; var returnPrice = 0; var buyPrice = 0; for (m = 0; m < that.newData[i].stockLogList1.length; m++) { if (that.newData[i].stockLogList1[m].isReturn) { returnPrice = that.newData[i].stockLogList1[m].discountAmount; returnCount += that.newData[i].stockLogList1[m].productCount; } else { buyCount += that.newData[i].stockLogList1[m].productCount; } } if (that.yNum + 64 >= 1990) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); strCmd = blesdk.CreatCPCLPage(1080, _this14.printHeight - that.yNum + 64 >= 1990 ? 1990 : _this14.printHeight - that.yNum + 64, 1, 0, 162); that.yNum = 0; pageNum++; } if (buyCount > 0) { if (that.newData[i].productName == that.newData[i].productSn) { strCmd += blesdk.addCPCLText('0', that.yNum += 40, '24', '0', 0, (Xindex += 1) + '.' + '【销】' + that.newData[i].productSn); strCmd += blesdk.addCPCLText('420', that.yNum, '24', '0', 0, buyCount); if (that.zhengtizhekou) { strCmd += blesdk.addCPCLText('510', that.yNum, '24', '0', 0, that.newData[i].printDiscount); strCmd += blesdk.addCPCLText('600', that.yNum, '24', '0', 0, that.newData[i].discountAmount); } else { strCmd += blesdk.addCPCLText('575', that.yNum, '24', '0', 0, that.newData[i].discountAmount); } strCmd += blesdk.addCPCLText('730', that.yNum, '24', '0', 0, buyCount * that.newData[i].discountAmount); } else { strCmd += blesdk.addCPCLText('0', that.yNum += 40, '24', '0', 0, (Xindex += 1) + '.' + '【销】' + that.newData[i].productSn + '(' + (that.newData[i].productName == null ? '' : that.newData[i].productName) + ')'); strCmd += blesdk.addCPCLText('420', that.yNum, '24', '0', 0, buyCount); if (that.zhengtizhekou) { strCmd += blesdk.addCPCLText('510', that.yNum, '24', '0', 0, that.newData[i].printDiscount); strCmd += blesdk.addCPCLText('600', that.yNum, '24', '0', 0, that.newData[i].discountAmount); } else { strCmd += blesdk.addCPCLText('575', that.yNum, '24', '0', 0, that.newData[i].discountAmount); } strCmd += blesdk.addCPCLText('730', that.yNum, '24', '0', 0, buyCount * that.newData[i].discountAmount); } } if (returnCount > 0) { if (that.newData[i].productName == that.newData[i].productSn) { strCmd += blesdk.addCPCLText('0', that.yNum += 40, '24', '0', 0, (Xindex += 1) + '.' + '【退】' + that.newData[i].productSn); strCmd += blesdk.addCPCLText('420', that.yNum, '24', '0', 0, returnCount); if (that.zhengtizhekou) { strCmd += blesdk.addCPCLText('510', that.yNum, '24', '0', 0, ""); strCmd += blesdk.addCPCLText('600', that.yNum, '24', '0', 0, returnPrice); } else { strCmd += blesdk.addCPCLText('575', that.yNum, '24', '0', 0, returnPrice); } strCmd += blesdk.addCPCLText('730', that.yNum, '24', '0', 0, returnCount * returnPrice); } else { strCmd += blesdk.addCPCLText('0', that.yNum += 40, '24', '0', 0, (Xindex += 1) + '.' + '【退】' + that.newData[i].productSn + '(' + (that.newData[i].productName == null ? '' : that.newData[i].productName) + ')'); strCmd += blesdk.addCPCLText('420', that.yNum, '24', '0', 0, returnCount); if (that.zhengtizhekou) { strCmd += blesdk.addCPCLText('510', that.yNum, '24', '0', 0, ""); strCmd += blesdk.addCPCLText('600', that.yNum, '24', '0', 0, returnPrice); } else { strCmd += blesdk.addCPCLText('575', that.yNum, '24', '0', 0, returnPrice); } strCmd += blesdk.addCPCLText('730', that.yNum, '24', '0', 0, returnCount * returnPrice); } } } else { if (that.yNum + 64 >= 1990) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); strCmd = blesdk.CreatCPCLPage(1080, _this14.printHeight - that.yNum + 64 >= 1990 ? 1990 : _this14.printHeight - that.yNum + 64, 1, 0, 162); that.yNum = 0; pageNum++; for (m = 0; m < that.newData[i].stockLogList1.length; m++) { if (that.yNum + 64 >= 1990) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); strCmd = blesdk.CreatCPCLPage(1080, _this14.printHeight - that.yNum + 64 >= 1990 ? 1990 : _this14.printHeight - that.yNum + 64, 1, 0, 162); that.yNum = 0; pageNum++; if (that.newData[i].stockLogList1[m].isReturn) { if (that.newData[i].productName == that.newData[i].productSn) { strCmd += blesdk.addCPCLText('0', that.yNum += 40, '24', '0', 0, (Xindex += 1) + '.' + '【退】' + that.newData[i].productSn); } else { strCmd += blesdk.addCPCLText('0', that.yNum += 40, '24', '0', 0, (Xindex += 1) + '.' + '【退】' + that.newData[i].productSn + '(' + (that.newData[i].productName == null ? '' : that.newData[i].productName) + ')'); } } else { if (that.newData[i].productName == that.newData[i].productSn && that.order.name != '散客') { if (that.newData[i].stockLogList1[m].isPurchasedBefore == 1) { //买过 strCmd += blesdk.addCPCLText('0', that.yNum += 40, '24', '0', 0, (Xindex += 1) + '.' + '【补】' + that.newData[i].productSn); } else { // 0是没买过 strCmd += blesdk.addCPCLText('0', that.yNum += 40, '24', '0', 0, (Xindex += 1) + '.' + '【销】' + that.newData[i].productSn); } } else { if (that.newData[i].stockLogList1[m].isPurchasedBefore == 1 && that.order.name != '散客') { //买过 strCmd += blesdk.addCPCLText('0', that.yNum += 40, '24', '0', 0, (Xindex += 1) + '.' + '【补】' + that.newData[i].productSn + '(' + (that.newData[i].productName == null ? '' : that.newData[i].productName) + ')'); } else { // 0是没买过 strCmd += blesdk.addCPCLText('0', that.yNum += 40, '24', '0', 0, (Xindex += 1) + '.' + '【销】' + that.newData[i].productSn + '(' + (that.newData[i].productName == null ? '' : that.newData[i].productName) + ')'); } } } if (that.shopId == '1820269107191353344' || that.shopId == '1818888277105709056') { if (that.newData[i].stockLogList1[m].attributeList.indexOf('均色') != -1) { that.newData[i].stockLogList1[m].attributeList = that.newData[i].stockLogList1[m].attributeList.replace(/均色/g, '分色'); } if (that.newData[i].stockLogList1[m].attributeList.indexOf('均码') != -1) { that.newData[i].stockLogList1[m].attributeList = that.newData[i].stockLogList1[m].attributeList.replace(/均码/g, '分码'); } } strCmd += blesdk.addCPCLText(guige, that.yNum, '24', '0', 0, that.slicePrint(that.newData[i].stockLogList1[m].attributeList)); strCmd += blesdk.addCPCLText(shuliang, that.yNum, '24', '0', 0, that.newData[i].stockLogList1[m].productCount); if (that.zhengtizhekou) { strCmd += blesdk.addCPCLText(zhekou, that.yNum, '24', '0', 0, that.newData[i].printDiscount); } if (that.newData[i].stockLogList1[m].isReturn) { strCmd += blesdk.addCPCLText(danjia, that.yNum, '24', '0', 0, that.newData[i].stockLogList1[m].discountAmount); strCmd += blesdk.addCPCLText(zongjia, that.yNum, '24', '0', 0, that.newData[i].stockLogList1[m].discountAmount * that.newData[i].stockLogList1[m].productCount); } else { strCmd += blesdk.addCPCLText(danjia, that.yNum, '24', '0', 0, that.newData[i].discountAmount); strCmd += blesdk.addCPCLText(zongjia, that.yNum, '24', '0', 0, that.newData[i].discountAmount * that.newData[i].stockLogList1[m].productCount); } } else { if (that.newData[i].stockLogList1[m].isReturn) { if (that.newData[i].productName == that.newData[i].productSn) { strCmd += blesdk.addCPCLText('0', that.yNum += 40, '24', '0', 0, (Xindex += 1) + '.' + '【退】' + that.newData[i].productSn); } else { strCmd += blesdk.addCPCLText('0', that.yNum += 40, '24', '0', 0, (Xindex += 1) + '.' + '【退】' + that.newData[i].productSn + '(' + (that.newData[i].productName == null ? '' : that.newData[i].productName) + ')'); } } else { if (that.newData[i].productName == that.newData[i].productSn && that.order.name != '散客') { if (that.newData[i].stockLogList1[m].isPurchasedBefore == 1) { //买过 strCmd += blesdk.addCPCLText('0', that.yNum += 40, '24', '0', 0, (Xindex += 1) + '.' + '【补】' + that.newData[i].productSn); } else { // 0是没买过 strCmd += blesdk.addCPCLText('0', that.yNum += 40, '24', '0', 0, (Xindex += 1) + '.' + '【销】' + that.newData[i].productSn); } } else { if (that.newData[i].stockLogList1[m].isPurchasedBefore == 1 && that.order.name != '散客') { //买过 strCmd += blesdk.addCPCLText('0', that.yNum += 40, '24', '0', 0, (Xindex += 1) + '.' + '【补】' + that.newData[i].productSn + '(' + (that.newData[i].productName == null ? '' : that.newData[i].productName) + ')'); } else { // 0是没买过 strCmd += blesdk.addCPCLText('0', that.yNum += 40, '24', '0', 0, (Xindex += 1) + '.' + '【销】' + that.newData[i].productSn + '(' + (that.newData[i].productName == null ? '' : that.newData[i].productName) + ')'); } } } if (that.shopId == '1820269107191353344' || that.shopId == '1818888277105709056') { if (that.newData[i].stockLogList1[m].attributeList.indexOf('均色') != -1) { that.newData[i].stockLogList1[m].attributeList = that.newData[i].stockLogList1[m].attributeList.replace(/均色/g, '分色'); } if (that.newData[i].stockLogList1[m].attributeList.indexOf('均码') != -1) { that.newData[i].stockLogList1[m].attributeList = that.newData[i].stockLogList1[m].attributeList.replace(/均码/g, '分码'); } } strCmd += blesdk.addCPCLText(guige, that.yNum, '24', '0', 0, that.slicePrint(that.newData[i].stockLogList1[m].attributeList)); strCmd += blesdk.addCPCLText(shuliang, that.yNum, '24', '0', 0, that.newData[i].stockLogList1[m].productCount); if (that.zhengtizhekou) { strCmd += blesdk.addCPCLText(zhekou, that.yNum, '24', '0', 0, that.newData[i].printDiscount); } if (that.newData[i].stockLogList1[m].isReturn) { strCmd += blesdk.addCPCLText(danjia, that.yNum, '24', '0', 0, that.newData[i].stockLogList1[m].discountAmount); strCmd += blesdk.addCPCLText(zongjia, that.yNum, '24', '0', 0, that.newData[i].stockLogList1[m].discountAmount * that.newData[i].stockLogList1[m].productCount); } else { strCmd += blesdk.addCPCLText(danjia, that.yNum, '24', '0', 0, that.newData[i].discountAmount); strCmd += blesdk.addCPCLText(zongjia, that.yNum, '24', '0', 0, that.newData[i].discountAmount * that.newData[i].stockLogList1[m].productCount); } } } } else { for (m = 0; m < that.newData[i].stockLogList1.length; m++) { if (that.yNum + 64 >= 1990) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); strCmd = blesdk.CreatCPCLPage(1080, _this14.printHeight - that.yNum + 64 >= 1990 ? 1990 : _this14.printHeight - that.yNum + 64, 1, 0, 162); that.yNum = 0; pageNum++; if (that.newData[i].stockLogList1[m].isReturn) { if (that.newData[i].productName == that.newData[i].productSn) { strCmd += blesdk.addCPCLText('0', that.yNum += 40, '24', '0', 0, (Xindex += 1) + '.' + '【退】' + that.newData[i].productSn); } else { strCmd += blesdk.addCPCLText('0', that.yNum += 40, '24', '0', 0, (Xindex += 1) + '.' + '【退】' + that.newData[i].productSn + '(' + (that.newData[i].productName == null ? '' : that.newData[i].productName) + ')'); } } else { if (that.newData[i].productName == that.newData[i].productSn) { if (that.newData[i].stockLogList1[m].isPurchasedBefore == 1 && that.order.name != '散客') { //买过 strCmd += blesdk.addCPCLText('0', that.yNum += 40, '24', '0', 0, (Xindex += 1) + '.' + '【补】' + that.newData[i].productSn); } else { // 0是没买过 strCmd += blesdk.addCPCLText('0', that.yNum += 40, '24', '0', 0, (Xindex += 1) + '.' + '【销】' + that.newData[i].productSn); } } else { if (that.newData[i].stockLogList1[m].isPurchasedBefore == 1 && that.order.name != '散客') { //买过 strCmd += blesdk.addCPCLText('0', that.yNum += 40, '24', '0', 0, (Xindex += 1) + '.' + '【补】' + that.newData[i].productSn + '(' + (that.newData[i].productName == null ? '' : that.newData[i].productName) + ')'); } else { // 0是没买过 strCmd += blesdk.addCPCLText('0', that.yNum += 40, '24', '0', 0, (Xindex += 1) + '.' + '【销】' + that.newData[i].productSn + '(' + (that.newData[i].productName == null ? '' : that.newData[i].productName) + ')'); } } } if (that.shopId == '1820269107191353344' || that.shopId == '1818888277105709056') { if (that.newData[i].stockLogList1[m].attributeList.indexOf('均色') != -1) { that.newData[i].stockLogList1[m].attributeList = that.newData[i].stockLogList1[m].attributeList.replace(/均色/g, '分色'); } if (that.newData[i].stockLogList1[m].attributeList.indexOf('均码') != -1) { that.newData[i].stockLogList1[m].attributeList = that.newData[i].stockLogList1[m].attributeList.replace(/均码/g, '分码'); } } strCmd += blesdk.addCPCLText(guige, that.yNum, '24', '0', 0, that.slicePrint(that.newData[i].stockLogList1[m].attributeList)); strCmd += blesdk.addCPCLText(shuliang, that.yNum, '24', '0', 0, that.newData[i].stockLogList1[m].productCount); if (that.zhengtizhekou) { strCmd += blesdk.addCPCLText(zhekou, that.yNum, '24', '0', 0, that.newData[i].printDiscount); } if (that.newData[i].stockLogList1[m].isReturn) { strCmd += blesdk.addCPCLText(danjia, that.yNum, '24', '0', 0, that.newData[i].stockLogList1[m].discountAmount); strCmd += blesdk.addCPCLText(zongjia, that.yNum, '24', '0', 0, that.newData[i].stockLogList1[m].discountAmount * that.newData[i].stockLogList1[m].productCount); } else { strCmd += blesdk.addCPCLText(danjia, that.yNum, '24', '0', 0, that.newData[i].discountAmount); strCmd += blesdk.addCPCLText(zongjia, that.yNum, '24', '0', 0, that.newData[i].discountAmount * that.newData[i].stockLogList1[m].productCount); } } else { if (that.newData[i].stockLogList1[m].isReturn) { if (that.newData[i].productName == that.newData[i].productSn) { strCmd += blesdk.addCPCLText('0', that.yNum += 40, '24', '0', 0, (Xindex += 1) + '.' + '【退】' + that.newData[i].productSn); } else { strCmd += blesdk.addCPCLText('0', that.yNum += 40, '24', '0', 0, (Xindex += 1) + '.' + '【退】' + that.newData[i].productSn + '(' + (that.newData[i].productName == null ? '' : that.newData[i].productName) + ')'); } } else { if (that.newData[i].productName == that.newData[i].productSn) { if (that.newData[i].stockLogList1[m].isPurchasedBefore == 1 && that.order.name != '散客') { //买过 strCmd += blesdk.addCPCLText('0', that.yNum += 40, '24', '0', 0, (Xindex += 1) + '.' + '【补】' + that.newData[i].productSn); } else { // 0是没买过 strCmd += blesdk.addCPCLText('0', that.yNum += 40, '24', '0', 0, (Xindex += 1) + '.' + '【销】' + that.newData[i].productSn); } } else { if (that.newData[i].stockLogList1[m].isPurchasedBefore == 1 && that.order.name != '散客') { //买过 strCmd += blesdk.addCPCLText('0', that.yNum += 40, '24', '0', 0, (Xindex += 1) + '.' + '【补】' + that.newData[i].productSn + '(' + (that.newData[i].productName == null ? '' : that.newData[i].productName) + ')'); } else { // 0是没买过 strCmd += blesdk.addCPCLText('0', that.yNum += 40, '24', '0', 0, (Xindex += 1) + '.' + '【销】' + that.newData[i].productSn + '(' + (that.newData[i].productName == null ? '' : that.newData[i].productName) + ')'); } } } if (that.shopId == '1820269107191353344' || that.shopId == '1818888277105709056') { if (that.newData[i].stockLogList1[m].attributeList.indexOf('均色') != -1) { that.newData[i].stockLogList1[m].attributeList = that.newData[i].stockLogList1[m].attributeList.replace(/均色/g, '分色'); } if (that.newData[i].stockLogList1[m].attributeList.indexOf('均码') != -1) { that.newData[i].stockLogList1[m].attributeList = that.newData[i].stockLogList1[m].attributeList.replace(/均码/g, '分码'); } } strCmd += blesdk.addCPCLText(guige, that.yNum, '24', '0', 0, that.slicePrint(that.newData[i].stockLogList1[m].attributeList)); strCmd += blesdk.addCPCLText(shuliang, that.yNum, '24', '0', 0, that.newData[i].stockLogList1[m].productCount); if (that.zhengtizhekou) { strCmd += blesdk.addCPCLText(zhekou, that.yNum, '24', '0', 0, that.newData[i].printDiscount); } if (that.newData[i].stockLogList1[m].isReturn) { strCmd += blesdk.addCPCLText(danjia, that.yNum, '24', '0', 0, that.newData[i].stockLogList1[m].discountAmount); strCmd += blesdk.addCPCLText(zongjia, that.yNum, '24', '0', 0, that.newData[i].stockLogList1[m].discountAmount * that.newData[i].stockLogList1[m].productCount); } else { strCmd += blesdk.addCPCLText(danjia, that.yNum, '24', '0', 0, that.newData[i].discountAmount); strCmd += blesdk.addCPCLText(zongjia, that.yNum, '24', '0', 0, that.newData[i].discountAmount * that.newData[i].stockLogList1[m].productCount); } } } } } }; for (var i = 0; i < that.newData.length; i++) { var m; var m; var m; _loop3(); } // strCmd += blesdk.addCPCLPrint(); // that.bufferData.push(strCmd); // that.yNum = 0 // strCmd = blesdk.CreatCPCLPage(1080, 700, 1, 0); var lineSize = 25; if (that.shopId == '1822829636942434305' || that.shopId == '1818888277105709056') { lineSize = 40; } if (that.yNum + lineSize >= 1990) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); strCmd = blesdk.CreatCPCLPage(1080, this.printHeight - that.yNum + lineSize >= 1990 ? 1990 : this.printHeight - that.yNum + lineSize, 1, 0, 162); that.yNum = 0; pageNum++; strCmd += blesdk.addCPCLText('0', that.yNum += lineSize, '24', '0', 0, '-----------------------------------------------------------------------------------'); } else { strCmd += blesdk.addCPCLText('0', that.yNum += lineSize, '24', '0', 0, '-----------------------------------------------------------------------------------'); } strCmd += blesdk.addCPCLSETMAG(1, 1); strCmd += blesdk.addCPCLLocation(0); //金桔家金额区域显示 if (this.shopId == '1820391948796694529') { if (that.yNum + 54 >= 1990 * pageNum) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); strCmd = blesdk.CreatCPCLPage(1080, this.printHeight - that.yNum + 54 >= 1990 ? 1990 : this.printHeight - that.yNum + 54, 1, 0, 162); that.yNum = 0; pageNum++; strCmd += blesdk.addCPCLText('0', that.yNum += 30, '24', '0', 0, '销售数量:' + that.sales.productCount); strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '销售金额:' + that.sales.totalAmount); // strCmd += blesdk.addCPCLSETMAG(1, 2) strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '余额抵销售:' + that.sales.balanceDeductionAmount); // strCmd += blesdk.addCPCLText('600', (that.yNum - 20), '24', '0', 0, '本单实收:' + that.sales.alreadyEarn) } else { strCmd += blesdk.addCPCLText('0', that.yNum += 30, '24', '0', 0, '销售数量:' + that.sales.productCount); strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '销售金额:' + that.sales.totalAmount); // strCmd += blesdk.addCPCLSETMAG(1, 2) strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '余额抵销售:' + that.sales.balanceDeductionAmount); // strCmd += blesdk.addCPCLText('600', (that.yNum - 20), '24', '0', 0, '本单实收:' + that.sales.alreadyEarn) } strCmd += blesdk.addCPCLSETMAG(1, 1); if (that.yNum + 54 >= 1990) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); strCmd = blesdk.CreatCPCLPage(1080, this.printHeight - that.yNum + 54 >= 1990 ? 1990 : this.printHeight - that.yNum + 54, 1, 0, 162); that.yNum = 0; pageNum++; strCmd += blesdk.addCPCLText('0', that.yNum += 30, '24', '0', 0, '退货数量:' + that.returnNum); strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '退货金额:' + that.returnPrice); strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '其他费用:' + that.sales.otherExpense); } else { strCmd += blesdk.addCPCLText('0', that.yNum += 30, '24', '0', 0, '退货数量:' + that.returnNum); strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '退货金额:' + that.returnPrice); strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '其他费用:' + that.sales.otherExpense); } if (that.yNum + 54 >= 1990) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); strCmd = blesdk.CreatCPCLPage(1080, this.printHeight - that.yNum + 54 >= 1990 ? 1990 : this.printHeight - that.yNum + 54, 1, 0, 162); that.yNum = 0; pageNum++; strCmd += blesdk.addCPCLText('0', that.yNum += 30, '24', '0', 0, '欠款抵退货:' + that.sales.debtDeductionAmount); strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '销售抵退货:' + that.sales.saleDeductionAmount); strCmd += blesdk.addCPCLSETMAG(1, 2); if (that.dealingsRecord.lastDebtAmount >= 0) { strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '之前欠款:' + that.dealingsRecord.lastDebtAmount); } else if (that.dealingsRecord.lastDebtAmount < 0) { strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '之前余额:' + Math.abs(that.dealingsRecord.lastDebtAmount)); } else { strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '之前欠款:0'); } } else { strCmd += blesdk.addCPCLText('0', that.yNum += 30, '24', '0', 0, '欠款抵退货:' + that.sales.debtDeductionAmount); strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '销售抵退货:' + that.sales.saleDeductionAmount); // strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '余额抵销售:' + (that.sales // .balanceDeductionAmount)) strCmd += blesdk.addCPCLSETMAG(1, 1); if (that.dealingsRecord.lastDebtAmount >= 0) { strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '之前欠款:' + that.dealingsRecord.lastDebtAmount); } else if (that.dealingsRecord.lastDebtAmount < 0) { strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '之前余额:' + Math.abs(that.dealingsRecord.lastDebtAmount)); } else { strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '之前欠款:0'); } } strCmd += blesdk.addCPCLSETMAG(1, 1); if (that.yNum + 54 >= 1990) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); strCmd = blesdk.CreatCPCLPage(1080, this.printHeight - that.yNum + 54 >= 1990 ? 1990 : this.printHeight - that.yNum + 54, 1, 0, 162); that.yNum = 0; pageNum++; strCmd += blesdk.addCPCLText('0', that.yNum += 30, '24', '0', 0, '本单应收:' + that.sales.realAmount); if (that.sales.noEarn >= 0) { strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '本单欠款:' + that.sales.noEarn); } else { strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '本单余额:' + Math.abs(that.sales.noEarn)); } if (that.dealingsRecord.balanceDue >= 0) { strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '累计欠款:' + that.dealingsRecord.balanceDue); } else if (that.dealingsRecord.balanceDue < 0) { strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '累计余额:' + Math.abs(that.dealingsRecord.balanceDue)); } else { strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '累计欠款:0'); } } else { strCmd += blesdk.addCPCLText('0', that.yNum += 30, '24', '0', 0, '本单应收:' + that.sales.realAmount); if (that.sales.noEarn >= 0) { strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '本单欠款:' + that.sales.noEarn); } else { strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '本单余额:' + Math.abs(that.sales.noEarn)); } if (that.dealingsRecord.balanceDue >= 0) { strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '累计欠款:' + that.dealingsRecord.balanceDue); } else if (that.dealingsRecord.balanceDue < 0) { strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '累计余额:' + Math.abs(that.dealingsRecord.balanceDue)); } else { strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '累计欠款:0'); } } if (that.yNum + 54 >= 1990) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); strCmd = blesdk.CreatCPCLPage(1080, this.printHeight - that.yNum + 54 >= 1990 ? 1990 : this.printHeight - that.yNum + 54, 1, 0, 162); that.yNum = 0; pageNum++; strCmd += blesdk.addCPCLSETMAG(1, 2); strCmd += blesdk.addCPCLText('580', that.yNum += 60, '24', '0', 0, '本单实收:' + that.sales.alreadyEarn); } else { strCmd += blesdk.addCPCLSETMAG(1, 2); strCmd += blesdk.addCPCLText('580', that.yNum += 60, '24', '0', 0, '本单实收:' + that.sales.alreadyEarn); } } else if (this.shopId == '1821406205034237952') { //董大姐家金额单独显示 if (that.yNum + 64 >= 1990 * pageNum) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); strCmd = blesdk.CreatCPCLPage(1080, this.printHeight - that.yNum + 64 >= 1990 ? 1990 : this.printHeight - that.yNum + 64, 1, 0, 162); that.yNum = 0; pageNum++; strCmd += blesdk.addCPCLSETMAG(1, 1); strCmd += blesdk.addCPCLText('0', that.yNum += 40, '24', '0', 0, '合计:'); strCmd += blesdk.addCPCLText('520', that.yNum, '24', '0', 0, that.sales.productCount + '件'); strCmd += blesdk.addCPCLText('700', that.yNum, '24', '0', 0, '¥' + that.sales.totalAmount); } else { strCmd += blesdk.addCPCLSETMAG(1, 1); strCmd += blesdk.addCPCLText('0', that.yNum += 40, '24', '0', 0, '合计:'); strCmd += blesdk.addCPCLText('520', that.yNum, '24', '0', 0, that.sales.productCount + '件'); strCmd += blesdk.addCPCLText('700', that.yNum, '24', '0', 0, '¥' + that.sales.totalAmount); } if (that.yNum + 60 >= 1990 * pageNum) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); strCmd = blesdk.CreatCPCLPage(1080, this.printHeight - that.yNum + 60 >= 1990 ? 1990 : this.printHeight - that.yNum + 60, 1, 0, 162); that.yNum = 0; pageNum++; strCmd += blesdk.addCPCLSETMAG(1, 2); strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '本单应收:' + that.sales.realAmount + '(' + this.convertToChineseNumeral(that.sales.realAmount) + ')'); } else { strCmd += blesdk.addCPCLSETMAG(1, 2); strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '本单应收:' + that.sales.realAmount + '(' + this.convertToChineseNumeral(that.sales.realAmount) + ')'); } if (that.yNum + 60 >= 1990) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); strCmd = blesdk.CreatCPCLPage(1080, this.printHeight - that.yNum + 60 >= 1990 ? 1990 : this.printHeight - that.yNum + 60, 1, 0, 162); that.yNum = 0; pageNum++; strCmd += blesdk.addCPCLSETMAG(1, 2); strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '本单实收:' + that.sales.alreadyEarn + '(' + this.convertToChineseNumeral(that.sales.alreadyEarn) + ')'); } else { strCmd += blesdk.addCPCLSETMAG(1, 2); strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '本单实收:' + that.sales.alreadyEarn + '(' + this.convertToChineseNumeral(that.sales.alreadyEarn) + ')'); } if (that.yNum + 60 >= 1990) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); strCmd = blesdk.CreatCPCLPage(1080, this.printHeight - that.yNum + 60 >= 1990 ? 1990 : this.printHeight - that.yNum + 60, 1, 0, 162); that.yNum = 0; pageNum++; strCmd += blesdk.addCPCLSETMAG(1, 2); if (that.dealingsRecord.lastDebtAmount >= 0) { strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '之前欠款:' + that.dealingsRecord.lastDebtAmount); } else if (that.dealingsRecord.lastDebtAmount < 0) { strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '之前余额:' + Math.abs(that.dealingsRecord.lastDebtAmount)); } else { strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '之前欠款:0'); } if (that.dealingsRecord.balanceDue >= 0) { strCmd += blesdk.addCPCLText('540', that.yNum, '24', '0', 0, '累计欠款:' + that.dealingsRecord.balanceDue); } else if (that.dealingsRecord.balanceDue < 0) { strCmd += blesdk.addCPCLText('540', that.yNum, '24', '0', 0, '累计余额:' + Math.abs(that.dealingsRecord.balanceDue)); } else { strCmd += blesdk.addCPCLText('540', that.yNum, '24', '0', 0, '累计欠款:0'); } } else { strCmd += blesdk.addCPCLSETMAG(1, 2); if (that.dealingsRecord.lastDebtAmount >= 0) { strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '之前欠款:' + that.dealingsRecord.lastDebtAmount); } else if (that.dealingsRecord.lastDebtAmount < 0) { strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '之前余额:' + Math.abs(that.dealingsRecord.lastDebtAmount)); } else { strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '之前欠款:0'); } if (that.dealingsRecord.balanceDue >= 0) { strCmd += blesdk.addCPCLText('540', that.yNum, '24', '0', 0, '累计欠款:' + that.dealingsRecord.balanceDue); } else if (that.dealingsRecord.balanceDue < 0) { strCmd += blesdk.addCPCLText('540', that.yNum, '24', '0', 0, '累计余额:' + Math.abs(that.dealingsRecord.balanceDue)); } else { strCmd += blesdk.addCPCLText('540', that.yNum, '24', '0', 0, '累计欠款:0'); } } if (that.yNum + 60 >= 1990) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); strCmd = blesdk.CreatCPCLPage(1080, this.printHeight - that.yNum + 60 >= 1990 ? 1990 : this.printHeight - that.yNum + 60, 1, 0, 162); that.yNum = 0; pageNum++; strCmd += blesdk.addCPCLSETMAG(1, 1); strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '-----------------------------------------------------------------------------------'); } else { strCmd += blesdk.addCPCLSETMAG(1, 1); strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '-----------------------------------------------------------------------------------'); } strCmd += blesdk.addCPCLSETMAG(1, 1); if (that.yNum + 30 >= 1990) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); strCmd = blesdk.CreatCPCLPage(1080, this.printHeight - that.yNum + 30 >= 1990 ? 1990 : this.printHeight - that.yNum + 30, 1, 0, 162); that.yNum = 0; pageNum++; if (that.sales.noEarn >= 0) { strCmd += blesdk.addCPCLText('0', that.yNum += 30, '24', '0', 0, '本单欠款:' + that.sales.noEarn); } else { strCmd += blesdk.addCPCLText('0', that.yNum += 30, '24', '0', 0, '本单余额:' + Math.abs(that.sales.noEarn)); } if (that.returnPrice > 0) { strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '退货数量:' + that.returnNum); strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '退货金额:' + that.returnPrice); } } else { if (that.sales.noEarn >= 0) { strCmd += blesdk.addCPCLText('0', that.yNum += 30, '24', '0', 0, '本单欠款:' + that.sales.noEarn); } else { strCmd += blesdk.addCPCLText('0', that.yNum += 30, '24', '0', 0, '本单余额:' + Math.abs(that.sales.noEarn)); } if (that.returnPrice > 0) { strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '退货数量:' + that.returnNum); strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '退货金额:' + that.returnPrice); } } } else if (this.printingMethod == '2' || this.shopId == '1843114735801864192' || this.shopId == '1818888277105709056') { //华秀 if (this.printingMethod == '2') { if (that.yNum + 64 >= 1990 * pageNum) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); strCmd = blesdk.CreatCPCLPage(1080, this.printHeight - that.yNum + 64 >= 1990 ? 1990 : this.printHeight - that.yNum + 64, 1, 0, 162); that.yNum = 0; pageNum++; strCmd += blesdk.addCPCLSETMAG(1, 1); strCmd += blesdk.addCPCLText('0', that.yNum += 40, '24', '0', 0, '合计:'); strCmd += blesdk.addCPCLText('420', that.yNum, '24', '0', 0, that.sales.productCount + '件'); strCmd += blesdk.addCPCLText('730', that.yNum, '24', '0', 0, '¥' + that.sales.totalAmount); } else { strCmd += blesdk.addCPCLSETMAG(1, 1); strCmd += blesdk.addCPCLText('0', that.yNum += 40, '24', '0', 0, '合计:'); strCmd += blesdk.addCPCLText('420', that.yNum, '24', '0', 0, that.sales.productCount + '件'); strCmd += blesdk.addCPCLText('730', that.yNum, '24', '0', 0, '¥' + that.sales.totalAmount); } } else { if (that.yNum + 64 >= 1990 * pageNum) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); strCmd = blesdk.CreatCPCLPage(1080, this.printHeight - that.yNum + 64 >= 1990 ? 1990 : this.printHeight - that.yNum + 64, 1, 0, 162); that.yNum = 0; pageNum++; strCmd += blesdk.addCPCLSETMAG(1, 1); strCmd += blesdk.addCPCLText('0', that.yNum += 40, '24', '0', 0, '合计:'); strCmd += blesdk.addCPCLText('520', that.yNum, '24', '0', 0, that.sales.productCount + '件'); strCmd += blesdk.addCPCLText('700', that.yNum, '24', '0', 0, '¥' + that.sales.totalAmount); } else { strCmd += blesdk.addCPCLSETMAG(1, 1); strCmd += blesdk.addCPCLText('0', that.yNum += 40, '24', '0', 0, '合计:'); strCmd += blesdk.addCPCLText('520', that.yNum, '24', '0', 0, that.sales.productCount + '件'); strCmd += blesdk.addCPCLText('700', that.yNum, '24', '0', 0, '¥' + that.sales.totalAmount); } } if (that.yNum + 60 >= 1990 * pageNum) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); strCmd = blesdk.CreatCPCLPage(1080, this.printHeight - that.yNum + 60 >= 1990 ? 1990 : this.printHeight - that.yNum + 60, 1, 0, 162); that.yNum = 0; pageNum++; strCmd += blesdk.addCPCLSETMAG(1, 2); if (that.dealingsRecord.lastDebtAmount >= 0) { strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '之前欠款:' + that.dealingsRecord.lastDebtAmount); } else if (that.dealingsRecord.lastDebtAmount < 0) { strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '之前余额:' + Math.abs(that.dealingsRecord.lastDebtAmount)); } else { strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '之前欠款:0'); } strCmd += blesdk.addCPCLText('248', that.yNum, '24', '0', 0, '本单应收:' + that.sales.realAmount + '(' + this.convertToChineseNumeral(that.sales.realAmount) + ')'); } else { strCmd += blesdk.addCPCLSETMAG(1, 2); if (that.dealingsRecord.lastDebtAmount >= 0) { strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '之前欠款:' + that.dealingsRecord.lastDebtAmount); } else if (that.dealingsRecord.lastDebtAmount < 0) { strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '之前余额:' + Math.abs(that.dealingsRecord.lastDebtAmount)); } else { strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '之前欠款:0'); } strCmd += blesdk.addCPCLText('248', that.yNum, '24', '0', 0, '本单应收:' + that.sales.realAmount + '(' + this.convertToChineseNumeral(that.sales.realAmount) + ')'); } if (that.yNum + 60 >= 1990) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); strCmd = blesdk.CreatCPCLPage(1080, this.printHeight - that.yNum + 60 >= 1990 ? 1990 : this.printHeight - that.yNum + 60, 1, 0, 162); that.yNum = 0; pageNum++; strCmd += blesdk.addCPCLSETMAG(1, 2); if (that.dealingsRecord.balanceDue >= 0) { strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '累计欠款:' + that.dealingsRecord.balanceDue); } else if (that.dealingsRecord.balanceDue < 0) { strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '累计余额:' + Math.abs(that.dealingsRecord.balanceDue)); } else { strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '累计欠款:0'); } strCmd += blesdk.addCPCLText('248', that.yNum, '24', '0', 0, '本单实收:' + that.sales.alreadyEarn + '(' + this.convertToChineseNumeral(that.sales.alreadyEarn) + ')'); } else { strCmd += blesdk.addCPCLSETMAG(1, 2); if (that.dealingsRecord.balanceDue >= 0) { strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '累计欠款:' + that.dealingsRecord.balanceDue); } else if (that.dealingsRecord.balanceDue < 0) { strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '累计余额:' + Math.abs(that.dealingsRecord.balanceDue)); } else { strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '累计欠款:0'); } strCmd += blesdk.addCPCLText('248', that.yNum, '24', '0', 0, '本单实收:' + that.sales.alreadyEarn + '(' + this.convertToChineseNumeral(that.sales.alreadyEarn) + ')'); } if (that.yNum + 60 >= 1990) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); strCmd = blesdk.CreatCPCLPage(1080, this.printHeight - that.yNum + 60 >= 1990 ? 1990 : this.printHeight - that.yNum + 60, 1, 0, 162); that.yNum = 0; pageNum++; strCmd += blesdk.addCPCLSETMAG(1, 1); strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '-----------------------------------------------------------------------------------'); } else { strCmd += blesdk.addCPCLSETMAG(1, 1); strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '-----------------------------------------------------------------------------------'); } strCmd += blesdk.addCPCLSETMAG(1, 1); if (that.yNum + 30 >= 1990) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); strCmd = blesdk.CreatCPCLPage(1080, this.printHeight - that.yNum + 30 >= 1990 ? 1990 : this.printHeight - that.yNum + 30, 1, 0, 162); that.yNum = 0; pageNum++; if (that.sales.noEarn >= 0) { strCmd += blesdk.addCPCLText('0', that.yNum += 30, '24', '0', 0, '本单欠款:' + that.sales.noEarn); } else { strCmd += blesdk.addCPCLText('0', that.yNum += 30, '24', '0', 0, '本单余额:' + Math.abs(that.sales.noEarn)); } if (that.returnPrice > 0) { strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '退货数量:' + that.returnNum); strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '退货金额:' + that.returnPrice); } } else { if (that.sales.noEarn >= 0) { strCmd += blesdk.addCPCLText('0', that.yNum += 30, '24', '0', 0, '本单欠款:' + that.sales.noEarn); } else { strCmd += blesdk.addCPCLText('0', that.yNum += 30, '24', '0', 0, '本单余额:' + Math.abs(that.sales.noEarn)); } if (that.returnPrice > 0) { strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '退货数量:' + that.returnNum); strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '退货金额:' + that.returnPrice); } } } else { //正常的金额显示 if (that.yNum + 84 >= 1990 * pageNum) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); strCmd = blesdk.CreatCPCLPage(1080, this.printHeight - that.yNum + 84 >= 1990 ? 1990 : this.printHeight - that.yNum + 84, 1, 0, 162); that.yNum = 0; pageNum++; strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '销售数量:' + that.sales.productCount); strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '销售金额:' + that.sales.totalAmount); // strCmd += blesdk.addCPCLSETMAG(1, 2) strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '余额抵销售:' + that.sales.balanceDeductionAmount); // strCmd += blesdk.addCPCLText('600', (that.yNum - 20), '24', '0', 0, '本单实收:' + that.sales.alreadyEarn) } else { strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '销售数量:' + that.sales.productCount); strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '销售金额:' + that.sales.totalAmount); // strCmd += blesdk.addCPCLSETMAG(1, 2) strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '余额抵销售:' + that.sales.balanceDeductionAmount); // strCmd += blesdk.addCPCLText('600', (that.yNum - 20), '24', '0', 0, '本单实收:' + that.sales.alreadyEarn) } strCmd += blesdk.addCPCLSETMAG(1, 1); if (that.yNum + 84 >= 1990) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); strCmd = blesdk.CreatCPCLPage(1080, this.printHeight - that.yNum + 84 >= 1990 ? 1990 : this.printHeight - that.yNum + 84, 1, 0, 162); that.yNum = 0; pageNum++; strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '退货数量:' + that.returnNum); strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '退货金额:' + that.returnPrice); strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '其他费用:' + that.sales.otherExpense); } else { strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '退货数量:' + that.returnNum); strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '退货金额:' + that.returnPrice); strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '其他费用:' + that.sales.otherExpense); } if (that.yNum + 84 >= 1990) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); strCmd = blesdk.CreatCPCLPage(1080, this.printHeight - that.yNum + 84 >= 1990 ? 1990 : this.printHeight - that.yNum + 84, 1, 0, 162); that.yNum = 0; pageNum++; strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '欠款抵退货:' + that.sales.debtDeductionAmount); strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '销售抵退货:' + that.sales.saleDeductionAmount); strCmd += blesdk.addCPCLSETMAG(1, 2); if (that.dealingsRecord.lastDebtAmount >= 0) { strCmd += blesdk.addCPCLText('600', that.yNum, '24', '0', 0, '之前欠款:' + that.dealingsRecord.lastDebtAmount); } else if (that.dealingsRecord.lastDebtAmount < 0) { strCmd += blesdk.addCPCLText('600', that.yNum, '24', '0', 0, '之前余额:' + Math.abs(that.dealingsRecord.lastDebtAmount)); } else { strCmd += blesdk.addCPCLText('600', that.yNum, '24', '0', 0, '之前欠款:0'); } } else { strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '欠款抵退货:' + that.sales.debtDeductionAmount); strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '销售抵退货:' + that.sales.saleDeductionAmount); // strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '余额抵销售:' + (that.sales // .balanceDeductionAmount)) strCmd += blesdk.addCPCLSETMAG(1, 2); if (that.dealingsRecord.lastDebtAmount >= 0) { strCmd += blesdk.addCPCLText('610', that.yNum - 10, '24', '0', 0, '之前欠款:' + that.dealingsRecord.lastDebtAmount); } else if (that.dealingsRecord.lastDebtAmount < 0) { strCmd += blesdk.addCPCLText('610', that.yNum - 10, '24', '0', 0, '之前余额:' + Math.abs(that.dealingsRecord.lastDebtAmount)); } else { strCmd += blesdk.addCPCLText('610', that.yNum - 10, '24', '0', 0, '之前欠款:0'); } } if (that.yNum + 94 >= 1990) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); strCmd = blesdk.CreatCPCLPage(1080, this.printHeight - that.yNum + 94 >= 1990 ? 1990 : this.printHeight - that.yNum + 94, 1, 0, 162); that.yNum = 0; pageNum++; strCmd += blesdk.addCPCLSETMAG(1, 2); strCmd += blesdk.addCPCLText('0', that.yNum += 70, '24', '0', 0, '本单应收:' + that.sales.realAmount + '(' + that.convertToChineseNumeral(that.sales.realAmount) + ')'); strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '本单实收:' + that.sales.alreadyEarn); } else { strCmd += blesdk.addCPCLSETMAG(1, 2); strCmd += blesdk.addCPCLText('0', that.yNum += 70, '24', '0', 0, '本单应收:' + that.sales.realAmount + '(' + that.convertToChineseNumeral(that.sales.realAmount) + ')'); strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '本单实收:' + that.sales.alreadyEarn); } if (that.yNum + 114 >= 1990) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); strCmd = blesdk.CreatCPCLPage(1080, this.printHeight - that.yNum + 114 >= 1990 ? 1990 : this.printHeight - that.yNum + 114, 1, 0, 162); that.yNum = 0; pageNum++; strCmd += blesdk.addCPCLSETMAG(1, 2); if (that.sales.noEarn >= 0) { strCmd += blesdk.addCPCLText('0', that.yNum += 70, '24', '0', 0, '本单欠款:' + that.sales.noEarn + '(' + that.convertToChineseNumeral(that.sales.noEarn) + ')'); } else { strCmd += blesdk.addCPCLText('0', that.yNum += 70, '24', '0', 0, '本单余额:' + Math.abs(that.sales.noEarn) + '(' + that.convertToChineseNumeral(Math.abs(that.sales.noEarn)) + ')'); } if (that.dealingsRecord.balanceDue >= 0) { strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '累计欠款:' + that.dealingsRecord.balanceDue); } else if (that.dealingsRecord.balanceDue < 0) { strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '累计余额:' + Math.abs(that.dealingsRecord.balanceDue)); } else { strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '累计欠款:0'); } } else { strCmd += blesdk.addCPCLSETMAG(1, 2); if (that.sales.noEarn >= 0) { strCmd += blesdk.addCPCLText('0', that.yNum += 70, '24', '0', 0, '本单欠款:' + that.sales.noEarn + '(' + that.convertToChineseNumeral(that.sales.noEarn) + ')'); } else { strCmd += blesdk.addCPCLText('0', that.yNum += 70, '24', '0', 0, '本单余额:' + Math.abs(that.sales.noEarn) + '(' + that.convertToChineseNumeral(Math.abs(that.sales.noEarn)) + ')'); } if (that.dealingsRecord.balanceDue >= 0) { strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '累计欠款:' + that.dealingsRecord.balanceDue); } else if (that.dealingsRecord.balanceDue < 0) { strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '累计余额:' + Math.abs(that.dealingsRecord.balanceDue)); } else { strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '累计欠款:0'); } } } if (that.yNum + 40 >= 1990) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); strCmd = blesdk.CreatCPCLPage(1080, this.printHeight - that.yNum + 40 >= 1990 ? 1990 : this.printHeight - that.yNum + 40, 1, 0, 162); that.yNum = 0; pageNum++; strCmd += blesdk.addCPCLSETMAG(1, 1); strCmd += blesdk.addCPCLText('0', that.yNum += 40, '24', '0', 0, '-----------------------------------------------------------------------------------'); } else { strCmd += blesdk.addCPCLSETMAG(1, 1); strCmd += blesdk.addCPCLText('0', that.yNum += 40, '24', '0', 0, '-----------------------------------------------------------------------------------'); } if (that.yNum + 64 >= 1990) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); strCmd = blesdk.CreatCPCLPage(1080, this.printHeight - that.yNum + 64 >= 1990 ? 1990 : this.printHeight - that.yNum + 64, 1, 0, 162); that.yNum = 0; pageNum++; strCmd += blesdk.addCPCLSETMAG(1, 1); if (that.sales.remark) { strCmd += blesdk.addCPCLText('0', that.countPrint(), '24', '0', 0, '订单备注:' + that.sales.remark); strCmd += blesdk.addCPCLText('0', that.countPrint(), '24', '0', 0, '-----------------------------------------------------------------------------------'); } } else { strCmd += blesdk.addCPCLSETMAG(1, 1); if (that.sales.remark) { strCmd += blesdk.addCPCLText('0', that.countPrint(), '24', '0', 0, '订单备注:' + that.sales.remark); strCmd += blesdk.addCPCLText('0', that.countPrint(), '24', '0', 0, '-----------------------------------------------------------------------------------'); } } //店铺地址 strCmd += blesdk.addCPCLSETMAG(1, 1); if (that.yNum + 64 >= 1990) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); strCmd = blesdk.CreatCPCLPage(1080, this.printHeight - that.yNum + 64 >= 1990 ? 1990 : this.printHeight - that.yNum + 64, 1, 0, 162); that.yNum = 0; pageNum++; strCmd += blesdk.addCPCLSETMAG(1, 1); for (var _i4 = 0; _i4 < this.addressArr.length; _i4++) { // strCmd += blesdk.addCPCLText('50', yNum += 40, '24', '0', 0, this.addressArr[i]) if (_i4 == 0) { strCmd += blesdk.addCPCLText('0', that.yNum += 30, '24', '0', 0, '店铺地址:' + this.addressArr[_i4]); } else { strCmd += blesdk.addCPCLText('0', that.yNum += 30, '24', '0', 0, this.addressArr[_i4]); } } } else { for (var _i5 = 0; _i5 < this.addressArr.length; _i5++) { // strCmd += blesdk.addCPCLText('50', yNum += 40, '24', '0', 0, this.addressArr[i]) if (_i5 == 0) { strCmd += blesdk.addCPCLText('0', that.yNum += 30, '24', '0', 0, '店铺地址:' + this.addressArr[_i5]); } else { strCmd += blesdk.addCPCLText('0', that.yNum += 30, '24', '0', 0, this.addressArr[_i5]); } } } //店铺电话 strCmd += blesdk.addCPCLSETMAG(1, 1); if (this.shopId == '1820391948796694529' || this.shopId == '1848966744035692545' || this.shopId == '1850038419279974400') { if (that.yNum + 64 >= 1990) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); strCmd = blesdk.CreatCPCLPage(1080, this.printHeight - that.yNum + 64 >= 1990 ? 1990 : this.printHeight - that.yNum + 64, 1, 0, 162); that.yNum = 0; pageNum++; strCmd += blesdk.addCPCLSETMAG(1, 1); strCmd += blesdk.addCPCLText('0', that.countPrint(), '24', '0', 0, '店铺电话:' + this.jinjuPhone); } else { strCmd += blesdk.addCPCLText('0', that.countPrint(), '24', '0', 0, '店铺电话:' + this.jinjuPhone); } } else if (this.shopId == '1834512626093264897') { if (that.yNum + 64 >= 1990) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); strCmd = blesdk.CreatCPCLPage(1080, this.printHeight - that.yNum + 64 >= 1990 ? 1990 : this.printHeight - that.yNum + 64, 1, 0, 162); that.yNum = 0; pageNum++; strCmd += blesdk.addCPCLSETMAG(1, 1); strCmd += blesdk.addCPCLText('0', that.countPrint(), '24', '0', 0, '店铺电话:13191998128'); } else { strCmd += blesdk.addCPCLText('0', that.countPrint(), '24', '0', 0, '店铺电话:13191998128'); } } else { if (that.yNum + 64 >= 1990) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); strCmd = blesdk.CreatCPCLPage(1080, this.printHeight - that.yNum + 64 >= 1990 ? 1990 : this.printHeight - that.yNum + 64, 1, 0, 162); that.yNum = 0; pageNum++; strCmd += blesdk.addCPCLText('0', that.countPrint(), '24', '0', 0, '店铺电话:' + (uni.getStorageSync('shopOwnerPhone') ? uni.getStorageSync('shopOwnerPhone') : uni.getStorageSync('username'))); } else { strCmd += blesdk.addCPCLText('0', that.countPrint(), '24', '0', 0, '店铺电话:' + (uni.getStorageSync('shopOwnerPhone') ? uni.getStorageSync('shopOwnerPhone') : uni.getStorageSync('username'))); } } //物流 if (this.sales.companyName != null) { strCmd += blesdk.addCPCLSETMAG(1, 1); if (that.yNum + 64 >= 1990) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); strCmd = blesdk.CreatCPCLPage(1080, this.printHeight - that.yNum + 64 >= 1990 ? 1990 : this.printHeight - that.yNum + 64, 1, 0, 162); that.yNum = 0; pageNum++; strCmd += blesdk.addCPCLSETMAG(1, 1); strCmd += blesdk.addCPCLText('0', that.countPrint(), '24', '0', 0, '发货方式:' + this.sales.companyName + ' ' + this.sales.companyPhone); } else { strCmd += blesdk.addCPCLText('0', that.countPrint(), '24', '0', 0, '发货方式:' + this.sales.companyName + ' ' + this.sales.companyPhone); } } //店铺备注 if (this.shopRemark.length > 0) { for (var _i6 = 0; _i6 < this.shopRemark.length; _i6++) { if (that.yNum + 64 >= 1990) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); strCmd = blesdk.CreatCPCLPage(1080, this.printHeight - that.yNum + 64 >= 1990 ? 1990 : this.printHeight - that.yNum + 64, 1, 0, 162); that.yNum = 0; pageNum++; strCmd += blesdk.addCPCLSETMAG(1, 1); strCmd += blesdk.addCPCLText('0', that.countPrint(), '24', '0', 0, this.shopRemark[_i6]); } else { strCmd += blesdk.addCPCLText('0', that.countPrint(), '24', '0', 0, this.shopRemark[_i6]); } } } if (that.yNum + 64 >= 1990) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); strCmd = blesdk.CreatCPCLPage(1080, this.printHeight - that.yNum + 64 >= 1990 ? 1990 : this.printHeight - that.yNum + 64, 1, 0, 162); that.yNum = 0; pageNum++; strCmd += blesdk.addCPCLText('0', that.countPrint(), '24', '0', 0, '-----------------------------------------------------------------------------------'); } else { strCmd += blesdk.addCPCLText('0', that.countPrint(), '24', '0', 0, '-----------------------------------------------------------------------------------'); } var codeHeightPlus = 0; if (uni.getStorageSync('shopId') == '1890655721893269507' || uni.getStorageSync('shopId') == '1844355592815251456') { //原创家二维码放大了 codeHeightPlus = that.yNum + 372; } else { codeHeightPlus = that.yNum + 300; } if (codeHeightPlus >= 1990) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); var HeightPlus = 0; if (uni.getStorageSync('shopId') == '1890655721893269507' || uni.getStorageSync('shopId') == '1844355592815251456') { //原创家二维码放大了 HeightPlus = this.printHeight - that.yNum + 322; } else { HeightPlus = this.printHeight - that.yNum + 270; } strCmd = blesdk.CreatCPCLPage(1080, HeightPlus >= 1990 ? 1990 : HeightPlus, 1, 0, 162); that.yNum = 0; pageNum++; if (that.qrArr.length != 0) { //店铺微信/微信收款/支付宝收款/收款码收款(店铺,微信,支付,收款) for (var _i7 = 0; _i7 < that.qrArr.length; _i7++) { //店铺二维码 if (_i7 == 0) { strCmd += blesdk.addCPCLSETMAG(1, 1); strCmd += blesdk.addCPCLText(that.countWidth(_i7, 900 / that.qrArr.length), that.yNum += 40, '24', '0', 0, that.qrArr[_i7].name); if (uni.getStorageSync('shopId') == '1890655721893269507' || uni.getStorageSync('shopId') == '1844355592815251456') { strCmd += blesdk.addCPCLQRCode(that.countWidth(_i7, 900 / that.qrArr.length), that.yNum += 40, that.qrArr[_i7].level, '2', 6, that.qrArr[_i7].path); //二维码 } else { strCmd += blesdk.addCPCLQRCode(that.countWidth(_i7, 900 / that.qrArr.length), that.yNum += 40, that.qrArr[_i7].level, '2', 4, that.qrArr[_i7].path); //二维码 } } else { strCmd += blesdk.addCPCLSETMAG(1, 1); strCmd += blesdk.addCPCLText(that.countWidth(_i7, 900 / that.qrArr.length), that.yNum -= 40, '24', '0', 0, that.qrArr[_i7].name); if (uni.getStorageSync('shopId') == '1890655721893269507' || uni.getStorageSync('shopId') == '1844355592815251456') { strCmd += blesdk.addCPCLQRCode(that.countWidth(_i7, 900 / that.qrArr.length), that.yNum += 40, that.qrArr[_i7].level, '2', 6, that.qrArr[_i7].path); //二维码 } else { strCmd += blesdk.addCPCLQRCode(that.countWidth(_i7, 900 / that.qrArr.length), that.yNum += 40, that.qrArr[_i7].level, '2', 4, that.qrArr[_i7].path); //二维码 } } if (that.qrArr.length == _i7 + 1) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); } } } else { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); } } else { if (that.qrArr.length != 0) { //店铺微信/微信收款/支付宝收款/收款码收款(店铺,微信,支付,收款) for (var _i8 = 0; _i8 < that.qrArr.length; _i8++) { //店铺二维码 if (_i8 == 0) { strCmd += blesdk.addCPCLSETMAG(1, 1); strCmd += blesdk.addCPCLText(that.countWidth(_i8, 900 / that.qrArr.length), that.yNum += 40, '24', '0', 0, that.qrArr[_i8].name); if (uni.getStorageSync('shopId') == '1890655721893269507' || uni.getStorageSync('shopId') == '1844355592815251456') { strCmd += blesdk.addCPCLQRCode(that.countWidth(_i8, 900 / that.qrArr.length), that.yNum += 40, that.qrArr[_i8].level, '2', 6, that.qrArr[_i8].path); //二维码 } else { strCmd += blesdk.addCPCLQRCode(that.countWidth(_i8, 900 / that.qrArr.length), that.yNum += 40, that.qrArr[_i8].level, '2', 4, that.qrArr[_i8].path); //二维码 } } else { strCmd += blesdk.addCPCLSETMAG(1, 1); strCmd += blesdk.addCPCLText(that.countWidth(_i8, 900 / that.qrArr.length), that.yNum -= 40, '24', '0', 0, that.qrArr[_i8].name); if (uni.getStorageSync('shopId') == '1890655721893269507' || uni.getStorageSync('shopId') == '1844355592815251456') { strCmd += blesdk.addCPCLQRCode(that.countWidth(_i8, 900 / that.qrArr.length), that.yNum += 40, that.qrArr[_i8].level, '2', 6, that.qrArr[_i8].path); //二维码 } else { strCmd += blesdk.addCPCLQRCode(that.countWidth(_i8, 900 / that.qrArr.length), that.yNum += 40, that.qrArr[_i8].level, '2', 4, that.qrArr[_i8].path); //二维码 } } if (that.qrArr.length == _i8 + 1) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); } } } else { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); } } this.$nextTick(function () { that.changePrintCount(); that.bufferData = []; }); }, countWidth: function countWidth(num, len) { return num * len; }, //计算打印机当前行高度 countPrint: function countPrint() { return this.yNum += 40; }, //截取 slicePrint: function slicePrint(val) { var name = ''; if (typeof val == 'string') { var newObj = JSON.parse(val); for (var as in newObj) { name += newObj[as] + '/'; } } return name; }, //退款接口 getReturnOrder: function getReturnOrder(id) { var _this15 = this; return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() { var that; return _regenerator.default.wrap(function _callee5$(_context5) { while (1) { switch (_context5.prev = _context5.next) { case 0: that = _this15; _context5.next = 3; return _this15.tui.request("/app/return/list", "post", { remark: 3, saleId: id }, false, false).then(function (res) { if (res.code == 200 && res.result != null && res.result != undefined) { if (res.result != '') { _this15.inventoryReturnList = res.result; _this15.returnPrice = 0; _this15.returnNum = 0; _this15.inventoryReturnList.forEach(function (item) { _this15.returnPrice += item.totalAmount; _this15.returnNum += item.productCount; _this15.tui.request("/app/return/get/" + item.id, "GET", null, false, false).then(function (res) { if (res.code == 200 && res.result != null && res.result != undefined) { var _that$shopList; that.returnList1.push(res.result); (_that$shopList = that.shopList).push.apply(_that$shopList, (0, _toConsumableArray2.default)(res.result.saleDetailDTOList)); for (var j = 0; j < res.result.saleDetailDTOList.length; j++) { var isZiMu = false; var isNumber = false; var colorList = new Map(); var sizeNumList = []; if (res.result.saleDetailDTOList[j].stockLogList1.length > 0) { for (var m = 0; m < res.result.saleDetailDTOList[j].stockLogList1.length; m++) { var attr = res.result.saleDetailDTOList[j].stockLogList1[m].attributeList; var newObj = JSON.parse(attr); for (var as in newObj) { if (as == '尺码' && that.isLetterOrDigit(newObj[as].replace(/码/g, '')) == 'Letter') { isZiMu = true; } if (as == '尺码' && that.isLetterOrDigit(newObj[as].replace(/码/g, '')) == 'Digit') { isNumber = true; } if (as == '尺码' && sizeNumList.indexOf(newObj[as].replace(/码/g, '')) == -1) { sizeNumList.push(newObj[as].replace(/码/g, '')); } if (as == '颜色') { if (colorList.has(newObj[as])) { colorList.get(newObj[as]).push(res.result.saleDetailDTOList[j].stockLogList1[m]); } else { var listChild = []; listChild.push(res.result.saleDetailDTOList[j].stockLogList1[m]); colorList.set(newObj[as], listChild); } } } } } var newStockList = []; if (isNumber) { sizeNumList = sizeNumList.sort(function (a, b) { return a - b; }); colorList.forEach(function (value, key) { for (var j = 0; j < sizeNumList.length; j++) { for (var m = 0; m < value.length; m++) { var newObj = JSON.parse(value[m].attributeList); var size = ''; var color = ''; for (var as in newObj) { if (as == '尺码') { size = newObj[as].replace(/码/g, ''); } } if (size == sizeNumList[j]) { newStockList.push(value[m]); value.splice(m, 1); break; } } } if (value.length > 0) { newStockList = newStockList.concat(value); } }); res.result.saleDetailDTOList[j].stockLogList1 = newStockList; } if (isZiMu) { colorList.forEach(function (value, key) { for (var j = 0; j < that.lettrList.length; j++) { for (var m = 0; m < value.length; m++) { var newObj = JSON.parse(value[m].attributeList); var size = ''; var color = ''; for (var as in newObj) { if (as == '尺码') { size = newObj[as].replace(/码/g, ''); } } if (size == that.lettrList[j]) { newStockList.push(value[m]); value.splice(m, 1); break; } } } if (value.length > 0) { newStockList = newStockList.concat(value); } }); res.result.saleDetailDTOList[j].stockLogList1 = newStockList; } var isTure = true; res.result.saleDetailDTOList[j].productCount = 0; for (var _m = 0; _m < res.result.saleDetailDTOList[j].stockLogList1.length; _m++) { res.result.saleDetailDTOList[j].productCount += res.result.saleDetailDTOList[j].stockLogList1[_m].productCount; res.result.saleDetailDTOList[j].stockLogList1[_m].isReturn = true; res.result.saleDetailDTOList[j].stockLogList1[_m].discountAmount = res.result.saleDetailDTOList[j].discountAmount; var tableData = { productSn: '【退】' + res.result.saleDetailDTOList[j].productSn, productName: res.result.saleDetailDTOList[j].productName, productCount: res.result.saleDetailDTOList[j].stockLogList1[_m].productCount, attributeList: res.result.saleDetailDTOList[j].stockLogList1[_m].attributeList, discountAmount: res.result.saleDetailDTOList[j].discountAmount }; that.listHeng.push(tableData); } for (var i = 0; i < that.newData.length; i++) { if (that.newData[i].productId == res.result.saleDetailDTOList[j].productId) { var _that$newData$i$stock; isTure = false; (_that$newData$i$stock = that.newData[i].stockLogList1).push.apply(_that$newData$i$stock, (0, _toConsumableArray2.default)(res.result.saleDetailDTOList[j].stockLogList1)); } } if (isTure) { that.newData.push(res.result.saleDetailDTOList[j]); } } } }).catch(function (res) {}); }); } else { for (var i = 0; i < that.list.length; i++) { for (var z = 0; z < that.list[i].stockLogList1.length; z++) { that.list[i].stockLogList1[z].maxNum = that.list[i].stockLogList1[z].productCount; } } } } else { _this15.tui.toast(res.message); } }); case 3: setTimeout(function (res) { var that = _this15; for (var i = 0; i < _this15.newData.length; i++) { that.newData[i].sizeList = []; var isZiMu = false; var isNumber = false; var sizeNumList = []; var notNum = []; that.newData[i].sizePrintList = new Map(); for (var _j = 0; _j < that.newData[i].stockLogList1.length; _j++) { var discountAmount = that.newData[i].discountAmount; var newObj = JSON.parse(that.newData[i].stockLogList1[_j].attributeList); var printSize = new Map(); var color = ''; var statusAttr = '[销] '; if (that.newData[i].stockLogList1[_j].isReturn) { statusAttr = '[退] '; discountAmount = that.newData[i].stockLogList1[_j].discountAmount; } else if (that.newData[i].stockLogList1[_j].isPurchasedBefore == 1 && that.order.name != '散客') { statusAttr = '[补] '; } for (var as in newObj) { if (as == '颜色') { color = statusAttr + newObj[as]; if (that.newData[i].sizePrintList.has(color) == true) { printSize = that.newData[i].sizePrintList.get(color); } else { that.newData[i].sizePrintList.set(color, printSize); } } if (as == '尺码') { if (newObj[as].indexOf('码') != -1) { if (that.newData[i].sizeList.indexOf(newObj[as].substr(0, newObj[as].indexOf('码'))) == -1) { that.newData[i].sizeList.push(newObj[as].substr(0, newObj[as].indexOf('码'))); } that.newData[i].sizePrintList.get(color).set(newObj[as].substr(0, newObj[as].indexOf('码')), that.newData[i].stockLogList1[_j].productCount + ':' + discountAmount); } else { if (that.newData[i].sizeList.indexOf(newObj[as]) == -1) { that.newData[i].sizeList.push(newObj[as]); } that.newData[i].sizePrintList.get(color).set(newObj[as], that.newData[i].stockLogList1[_j].productCount + ':' + discountAmount); } } if (as == '尺码' && that.isLetterOrDigit(newObj[as].replace(/码/g, '')) == 'Letter') { isZiMu = true; } if (as == '尺码' && that.isLetterOrDigit(newObj[as].replace(/码/g, '')) == 'Digit') { isNumber = true; } if (as == '尺码' && sizeNumList.indexOf(newObj[as].replace(/码/g, '')) == -1) { if (as == '尺码' && that.isLetterOrDigit(newObj[as].replace(/码/g, '')) == 'Digit') { sizeNumList.push(newObj[as].replace(/码/g, '')); } else { if (notNum.indexOf(newObj[as].replace(/码/g, '')) == -1) { notNum.push(newObj[as].replace(/码/g, '')); } } } } } if (notNum.length > 0) { sizeNumList = sizeNumList.concat(notNum); } if (isZiMu) { var newStockList = []; for (var j = 0; j < that.lettrList.length; j++) { for (var m = 0; m < that.newData[i].sizeList.length; m++) { if (that.newData[i].sizeList[m] == that.lettrList[j]) { newStockList.push(that.newData[i].sizeList[m]); that.newData[i].sizeList.splice(m, 1); break; } } } if (that.newData[i].sizeList.length > 0) { newStockList = newStockList.concat(that.newData[i].sizeList); } that.newData[i].sizeList = newStockList; } if (isNumber) { var _newStockList = []; sizeNumList = sizeNumList.sort(function (a, b) { return a - b; }); for (var j = 0; j < sizeNumList.length; j++) { for (var m = 0; m < that.newData[i].sizeList.length; m++) { if (that.newData[i].sizeList[m] == sizeNumList[j]) { _newStockList.push(that.newData[i].sizeList[m]); that.newData[i].sizeList.splice(m, 1); break; } } } if (that.newData[i].sizeList.length > 0) { _newStockList = _newStockList.concat(that.newData[i].sizeList); } that.newData[i].sizeList = _newStockList; } //this.newData[i].sizeList = [...new Set(this.newData[i].sizeList)] } }, 500); _this15.$nextTick(function () { setTimeout(function (res) { _this15.getPrintHeight(); }, 1000); }); case 5: case "end": return _context5.stop(); } } }, _callee5); }))(); }, // 金额转大写 convertToChineseNumeral: function convertToChineseNumeral(money) { var fu = false; if (money == 0) { return '零元整'; } if (JSON.stringify(money).indexOf('-') != -1) { money = JSON.stringify(money).split('-')[1]; fu = true; } var cnNums = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖']; var cnIntRadice = ['', '拾', '佰', '仟']; var cnIntUnits = ['', '万', '亿', '兆']; var cnDecUnits = ['角', '分', '毫', '厘']; var cnInteger = '整'; var cnIntLast = '元'; var maxNum = 999999999999999.9999; var integerNum; var decimalNum; var chineseStr = ''; var parts; if (money == '') { return ''; } money = parseFloat(money); if (money >= maxNum) { return ''; } if (money == 0) { chineseStr = cnNums[0] + cnIntLast + cnInteger; return chineseStr; } money = money.toString(); if (money.indexOf('.') == -1) { integerNum = money; decimalNum = ''; } else { parts = money.split('.'); integerNum = parts[0]; decimalNum = parts[1].substr(0, 4); } if (parseInt(integerNum, 10) > 0) { var zeroCount = 0; var IntLen = integerNum.length; for (var i = 0; i < IntLen; i++) { var n = integerNum.substr(i, 1); var p = IntLen - i - 1; var q = p / 4; var m = p % 4; if (n == '0') { zeroCount++; } else { if (zeroCount > 0) { chineseStr += cnNums[0]; } zeroCount = 0; chineseStr += cnNums[parseInt(n)] + cnIntRadice[m]; } if (m == 0 && zeroCount < 4) { chineseStr += cnIntUnits[q]; } } chineseStr += cnIntLast; } if (decimalNum != '') { var decLen = decimalNum.length; for (var _i9 = 0; _i9 < decLen; _i9++) { var _n = decimalNum.substr(_i9, 1); if (_n != '0') { chineseStr += cnNums[Number(_n)] + cnDecUnits[_i9]; } } } if (chineseStr == '') { chineseStr += cnNums[0] + cnIntLast + cnInteger; } else if (decimalNum == '') { chineseStr += cnInteger; } if (fu == true) { chineseStr = '负' + chineseStr; } return chineseStr; }, // 重新开单订单 againOrder: function againOrder(item, type, index) { var _this16 = this; return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() { var that; return _regenerator.default.wrap(function _callee6$(_context6) { while (1) { switch (_context6.prev = _context6.next) { case 0: that = _this16; _context6.next = 3; return _this16.getReturnOrder1(item.id); case 3: _context6.next = 5; return _this16.tui.modal("提示", "您确定要重新开单吗?", true, function (res) { if (res) { that.goSaleGoods(item); } }); case 5: case "end": return _context6.stop(); } } }, _callee6); }))(); }, goDetail: function goDetail(id, userId, index) { this.inventoryList[index].isShowBtn = false; uni.setStorageSync('noReload', true); uni.navigateTo({ url: '/package1/index/orderDetail?id=' + id + '&userId=' + userId }); }, changeSignPopup: function changeSignPopup(e) { if (e.show == false) { this.signIndex = []; for (var m = 0; m < this.signList.length; m++) { this.signList[m].checked = false; } } }, sreachName: function sreachName(e) { this.faBookShow = true; this.customName = e.detail.value; this.getCustomList(e.detail.value); }, inputFocus: function inputFocus(e) { if (e.target.value != '') { this.getCustomList(e.target.value); } else { this.customList = []; } this.customId = ''; this.faBookShow = true; }, checkName: function checkName(item) { this.customName = item.name; this.faBookShow = false; this.$forceUpdate(); }, //获取客户列表 getCustomList: function getCustomList(name) { var _this17 = this; this.tui.request("/app/customer/list", "post", { searchStr: name, pageNum: 1, pageSize: 1000, sort: "", notBuyDays: "" }, false, false).then(function (res) { if (res.code == 200) { _this17.customList = res.result.records; } else { _this17.tui.toast(res.message); } }); }, //修改打印次数 changePrintCount: function changePrintCount() { var that = this; that.tui.request("/app/sale/updatePrintCount", "post", { saleId: this.printId }, false, true).then(function (res) { if (res.code == 200) { that.getOrderInfoList(); uni.showToast({ duration: 1000, title: "打印成功", mask: true }); } else { that.tui.toast(res.message); } }).catch(function (res) {}); }, // 订单查询 getOrderInfoList: function getOrderInfoList(type) { var _this18 = this; if (type == 'sreach') { this.page = 1; this.inventoryList = []; } var data = {}; if (this.listStatus == '2' || this.listStatus == '6' || this.listStatus == '7') { data = { pageVo: { pageSize: 15, pageNumber: this.page }, fromWhere: '2', timeOrder: this.timeOrder, startTime: this.range[0], endTime: this.range[1], searchStr: this.customName, status: this.listStatus, shopId: uni.getStorageSync('shopId') }; } else if (this.listStatus == '4') { data = { pageVo: { pageSize: 15, pageNumber: this.page }, fromWhere: '2', timeOrder: this.timeOrder, startTime: this.range[0], endTime: this.range[1], searchStr: this.customName, status: '4', shopId: uni.getStorageSync('shopId') }; } else if (this.listStatus == '0') { data = { pageVo: { pageSize: 15, pageNumber: this.page }, fromWhere: '0', timeOrder: this.timeOrder, startTime: this.range[0], endTime: this.range[1], searchStr: this.customName, distributionFlag: '0', shopId: uni.getStorageSync('shopId') }; } else if (this.listStatus == '1') { data = { pageVo: { pageSize: 15, pageNumber: this.page }, fromWhere: '0', timeOrder: this.timeOrder, startTime: this.range[0], endTime: this.range[1], searchStr: this.customName, distributionFlag: '1', shopId: uni.getStorageSync('shopId') }; } else { data = { pageVo: { pageSize: 15, pageNumber: this.page }, fromWhere: '2', timeOrder: this.timeOrder, startTime: this.range[0], endTime: this.range[1], searchStr: this.customName, shopId: uni.getStorageSync('shopId') }; } this.status = 'loading'; this.tui.request("/app/sale/listPages", "POST", data, false, false).then(function (res) { _this18.status = 'nomore'; if (res.code == 200) { if (_this18.page == 1) { _this18.inventoryList = res.result.records; } else { _this18.inventoryList = [].concat((0, _toConsumableArray2.default)(_this18.inventoryList), (0, _toConsumableArray2.default)(res.result.records)); } // this.customName = "" _this18.totalPages = res.result.pages; } else { _this18.tui.toast(res.message); } }).catch(function (res) {}); }, isEditOrDel: function isEditOrDel(item) { this.checkId = item; this.$refs.editLablePopup.open(); }, editLable: function editLable() { var that = this; that.isEdit = true; this.$refs.editLablePopup.close(); that.$refs.lablePopup.open(); that.lableText = that.checkId.lableContent; that.checkColor = that.checkId.lableColor; for (var i = 0; i < that.colorList.length; i++) { if (that.checkId.lableColor == that.colorList[i].name) { that.colorList[i].checked = true; } } }, delOrderLable: function delOrderLable(index, index1) { var that = this; uni.showModal({ title: "提示", content: '确定要删除该标签吗?', success: function success(res) { if (res.confirm) { that.orderIndex = index; for (var i = 0; i < that.inventoryList[index].lableList.length; i++) { if (i != index1) { that.signIndex.push(that.inventoryList[index].lableList[i].id); } } that.confirmLable(); } } }); }, clickLable: function clickLable(index) { if (this.isAddLableBtn) return; this.signList[index].checked = !this.signList[index].checked; if (this.signList[index].checked) { if (this.signList[index].checked && this.signIndex.length == 2) { uni.showToast({ duration: 1000, title: "标签最多只能选择2个", mask: true, icon: 'none' }); this.signList[index].checked = false; } else { this.signIndex.push(this.signList[index].id); } } else { this.signIndex.splice(this.signIndex.indexOf(this.signList[index].id), 1); } }, confirmLable: function confirmLable() { var _this19 = this; var that = this; uni.showLoading({ title: '加载中...', mask: true }); this.tui.request("/app/saleLable/batchSaveSaleLable", "post", { saleId: this.inventoryList[this.orderIndex].id, lableIds: this.signIndex == '' ? null : this.signIndex }, false, true).then(function (res) { if (res.code == 200) { _this19.inventoryList[_this19.orderIndex].lableList = []; var LinSiList = []; for (var m = 0; m < _this19.signList.length; m++) { _this19.signList[m].checked = false; for (var i = 0; i < _this19.signIndex.length; i++) { if (_this19.signIndex[i] == _this19.signList[m].id) { LinSiList.push(_this19.signList[m]); } } } setTimeout(function (res) { uni.hideLoading(); that.inventoryList[that.orderIndex].lableList = LinSiList; that.signIndex = []; that.$refs.signPopup.close(); }, 300); } else { uni.hideLoading(); _this19.tui.toast(res.message); } }).catch(function (res) { uni.hideLoading(); }); }, delLable: function delLable() { var that = this; this.$refs.editLablePopup.close(); uni.showModal({ title: "提示", content: '确定要删除该标签吗?', success: function success(res) { if (res.confirm) { that.tui.request("/app/lable/deleteLable", "post", { id: that.checkId.id }, false, true).then(function (res) { if (res.code == 200) { that.clearCheck(); that.getLableList(); uni.showToast({ duration: 1000, title: "删除成功", mask: true }); } else { that.clearCheck(); that.tui.toast(res.message); } }).catch(function (res) {}); } } }); }, getLableList: function getLableList() { var _this20 = this; this.tui.request("/app/lable/getLableListByShopId", "post", { shopId: uni.getStorageSync('shopId') }, false, true).then(function (res) { if (res.code == 200) { for (var i = 0; i < res.result.length; i++) { res.result[i].checked = false; } _this20.signList = res.result; } else { _this20.tui.toast(res.message); } }).catch(function (res) {}); }, changeAddLable: function changeAddLable(e) { if (e.show == false) { this.clearCheck(); this.clickNewLable(); } }, addLable: function addLable() { var _this21 = this; if (this.lableText == '' || this.checkColor == '') return; var data = {}; if (this.checkId == undefined || this.checkId == '') { data = { shopId: uni.getStorageSync('shopId'), shopName: uni.getStorageSync('shopName'), lableContent: this.lableText, lableColor: this.checkColor }; } else { data = { id: this.checkId.id, shopId: uni.getStorageSync('shopId'), shopName: uni.getStorageSync('shopName'), lableContent: this.lableText, lableColor: this.checkColor }; } this.tui.request("/app/lable/saveOrEditLable", "post", data, false, false).then(function (res2) { if (res2.code == 200) { _this21.clearCheck(); _this21.clickNewLable(); _this21.getLableList(); } else { _this21.clearCheck(); _this21.tui.toast(res.message); } }).catch(function (res) { _this21.clearCheck(); }); }, //清空新增标签的选中 clearCheck: function clearCheck() { this.lableText = ''; this.checkColor = ''; this.checkId = ''; this.isEdit = false; this.$refs.lablePopup.close(); }, //选择颜色 clickNewLable: function clickNewLable(index) { var that = this; for (var i = 0; i < this.colorList.length; i++) { this.colorList[i].checked = false; } if (typeof index == 'number') { that.colorList[index].checked = true; that.checkColor = that.colorList[index].name; } }, //跳转开单页 goKaiDan: function goKaiDan() { uni.navigateTo({ url: '/package2/inventory/goodsList1HENG' }); }, searchList: function searchList(e) { if (e.length < 1) { this.range = []; } }, openPopup: function openPopup(index) { if (typeof index == 'string') { this.isAddLableBtn = true; } else { this.isAddLableBtn = false; } if (typeof index == 'number') { if (this.inventoryList[index].lableList != null) { for (var i = 0; i < this.inventoryList[index].lableList.length; i++) { var id = this.inventoryList[index].lableList[i].id; this.signIndex.push(id); for (var m = 0; m < this.signList.length; m++) { if (id == this.signList[m].id) { this.signList[m].checked = true; } } } } this.orderIndex = index; } this.$refs.signPopup.open(); }, clearSearch: function clearSearch() { this.range = []; this.customName = ""; this.listStatus = ""; } } }; 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"])) /***/ }), /***/ 1008: /*!****************************************************************************************************!*\ !*** C:/文档/distribution-uni/package3/index/orderDetailTable.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_orderDetailTable_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!./orderDetailTable.vue?vue&type=style&index=0&lang=scss& */ 1009); /* 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_orderDetailTable_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_orderDetailTable_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_orderDetailTable_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_orderDetailTable_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_orderDetailTable_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), /***/ 1009: /*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ !*** ./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/package3/index/orderDetailTable.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; } /***/ }) },[[1002,"common/runtime","common/vendor"]]]); //# sourceMappingURL=../../../.sourcemap/mp-weixin/package3/index/orderDetailTable.js.map