new file: LICENSE new file: README.md new file: WMS_PDA.code-workspace new file: common/api.js new file: common/config.js new file: common/demo.scss new file: common/mixin.js new file: common/props.js new file: components/BluetoothDeviceSelector/BluetoothDeviceSelector.vue new file: components/BluetoothPrint/BluetoothPrint.vue new file: components/PrintPanel/PrintPanel.vue new file: components/WorkbenchPrint/WorkbenchPrint.vue new file: components/demo-com/demo-com.vue new file: components/inputAndSelect/inputAndSelect.vue new file: components/page-nav/page-nav.vue new file: components/pagination/pagination.vue new file: components/space-list/space-list.vue new file: components/uploadImgCos/uploadImgCos.vue new file: core/index.js new file: core/mixins/index.js new file: core/request/apis.js new file: core/request/index.js new file: core/request/request.js new file: core/router/index.js new file: core/router/uni-simple-router.js new file: core/store/index.js new file: core/store/modules/bluetoothPrint.js new file: core/store/modules/broadcast.js new file: core/store/modules/floatWindowManager.js new file: core/store/modules/print.js new file: core/store/modules/setting.js new file: core/store/modules/user.js new file: core/utils/auth.js new file: core/utils/base64.js new file: core/utils/broadcast.js new file: core/utils/dpi-converter.js new file: core/utils/encoding-indexes.js new file: core/utils/encoding.js new file: core/utils/floatWindowManager.js new file: core/utils/simpleFloat.js new file: core/utils/tool.js new file: core/utils/tsc.js new file: env.js new file: main.js new file: manifest.json new file: package.json new file: pages.json new file: pages/403.vue new file: pages/404.vue new file: pages/componentsA/backtop/backtop.nvue new file: pages/componentsA/button/button.nvue new file: pages/componentsA/cell/cell.nvue new file: pages/componentsA/checkbox/checkbox.nvue new file: pages/componentsA/divider/divider.nvue new file: pages/componentsA/empty/empty.nvue new file: pages/componentsA/gap/gap.nvue new file: pages/componentsA/grid/grid.nvue new file: pages/componentsA/icon/icon.nvue new file: pages/componentsA/image/image.nvue new file: pages/componentsA/line/line.nvue new file: pages/componentsA/link/link.nvue new file: pages/componentsA/loading-icon/loading-icon.nvue new file: pages/componentsA/loading-page/loading-page.nvue new file: pages/componentsA/overlay/overlay.nvue new file: pages/componentsA/popup/popup.nvue new file: pages/componentsA/radio/radio.nvue new file: pages/componentsA/rate/rate.nvue new file: pages/componentsA/sticky/sticky.nvue new file: pages/componentsA/swipeAction/swipeAction.nvue new file: pages/componentsA/test/test.vue new file: pages/componentsA/transition/transition.nvue new file: pages/componentsB/actionSheet/actionSheet.nvue new file: pages/componentsB/alert/alert.nvue new file: pages/componentsB/badge/badge.nvue new file: pages/componentsB/code/code.nvue new file: pages/componentsB/collapse/collapse.nvue new file: pages/componentsB/color/color.nvue new file: pages/componentsB/countDown/countDown.nvue new file: pages/componentsB/countTo/countTo.nvue new file: pages/componentsB/dropdown/dropdown.nvue new file: pages/componentsB/keyboard/keyboard.nvue new file: pages/componentsB/noticeBar/noticeBar.nvue new file: pages/componentsB/notify/notify.nvue new file: pages/componentsB/numberBox/numberBox.nvue new file: pages/componentsB/parse/content.js new file: pages/componentsB/parse/jump.vue new file: pages/componentsB/parse/parse.nvue new file: pages/componentsB/progress/progress.nvue new file: pages/componentsB/search/search.nvue new file: pages/componentsB/slider/slider.nvue new file: pages/componentsB/switch/switch.nvue new file: pages/componentsB/tabbar/tabbar.nvue new file: pages/componentsB/tag/tag.nvue new file: pages/componentsB/toast/toast.nvue new file: pages/componentsB/upload/upload.nvue new file: pages/componentsC/album/album.nvue new file: pages/componentsC/avatar/avatar.nvue new file: pages/componentsC/calendar/calendar.nvue new file: pages/componentsC/codeInput/codeInput.nvue new file: pages/componentsC/datetimePicker/datetimePicker.nvue new file: pages/componentsC/form/form.nvue new file: pages/componentsC/indexList/indexList.nvue new file: pages/componentsC/input/input.nvue new file: pages/componentsC/layout/layout.nvue new file: pages/componentsC/list/list.nvue new file: pages/componentsC/loadmore/loadmore.nvue new file: pages/componentsC/modal/modal.nvue new file: pages/componentsC/navbar/navbar.nvue new file: pages/componentsC/noNetwork/noNetwork.nvue new file: pages/componentsC/picker/picker.nvue new file: pages/componentsC/readMore/readMore.nvue new file: pages/componentsC/scrollList/scrollList.nvue new file: pages/componentsC/skeleton/skeleton.nvue new file: pages/componentsC/steps/steps.vue new file: pages/componentsC/subsection/subsection.nvue new file: pages/componentsC/swiper/swiper.nvue new file: pages/componentsC/table/table.nvue new file: pages/componentsC/tabs/tabs.nvue new file: pages/componentsC/text/text.nvue new file: pages/componentsC/textarea/textarea.nvue new file: pages/componentsC/tooltip/tooltip.vue new file: pages/index/index.vue new file: pages/login/index.vue new file: pages/message/index.vue new file: pages/oa/index.vue new file: pages/settings/broadcastSettings.vue new file: pages/settings/index.vue new file: pages/settings/networkTest.vue new file: pages/user/index.vue new file: pages/work/index.vue new file: pages/work/storage/receiving/components/ProductInfoEditor.vue new file: pages/work/storage/receiving/components/detail-container.vue new file: pages/work/storage/receiving/components/info-container.vue new file: pages/work/storage/receiving/components/stockList.vue new file: pages/work/storage/receiving/receiving.vue new file: pages/work/storage/receiving/receivingCreate.vue new file: pages/work/storage/receiving/receivingDetail.vue new file: pages/work/storage/receiving/receivingList.vue new file: pages/work/storage/relocation.vue new file: static/app-plus/mp-html/js/handler.js new file: static/app-plus/mp-html/js/uni.webview.min.js new file: static/app-plus/mp-html/local.html new file: static/common/js/touch-emulator.js new file: static/icon/index.png new file: static/icon/index_a.png new file: static/icon/mime.png new file: static/icon/mime_a.png new file: static/icon/oa.png new file: static/icon/oa_a.png new file: static/loginbg.jpg new file: template.h5.html new file: tree.md new file: uni.scss new file: uni_modules/uni-read-pages/README.md new file: uni_modules/uni-read-pages/index.js new file: uni_modules/uni-read-pages/package.json new file: uni_modules/uni-simple-router/.eslintignore new file: uni_modules/uni-simple-router/.eslintrc.js new file: uni_modules/uni-simple-router/.github/ISSUE_TEMPLATE/bug_report.md new file: uni_modules/uni-simple-router/.github/ISSUE_TEMPLATE/feature_request.md new file: uni_modules/uni-simple-router/CODE_OF_CONDUCT.md new file: uni_modules/uni-simple-router/LICENSE new file: uni_modules/uni-simple-router/README.md new file: uni_modules/uni-simple-router/RFC.md new file: uni_modules/uni-simple-router/api-extractor.json new file: uni_modules/uni-simple-router/dist/link.vue new file: uni_modules/uni-simple-router/dist/uni-simple-router.d.ts new file: uni_modules/uni-simple-router/dist/uni-simple-router.js new file: uni_modules/uni-simple-router/github.sh new file: uni_modules/uni-simple-router/jest.config.js new file: uni_modules/uni-simple-router/package.json new file: uni_modules/uni-simple-router/progress.md new file: uni_modules/uni-simple-router/src/H5/buildRouter.ts new file: uni_modules/uni-simple-router/src/H5/proxyHook.ts new file: uni_modules/uni-simple-router/src/app/appPatch.ts new file: uni_modules/uni-simple-router/src/applets/appletPatch.ts new file: uni_modules/uni-simple-router/src/component/link.vue new file: uni_modules/uni-simple-router/src/global.d.ts new file: uni_modules/uni-simple-router/src/helpers/config.ts new file: uni_modules/uni-simple-router/src/helpers/createRouteMap.ts new file: uni_modules/uni-simple-router/src/helpers/lifeCycle.ts new file: uni_modules/uni-simple-router/src/helpers/mixins.ts new file: uni_modules/uni-simple-router/src/helpers/utils.ts new file: uni_modules/uni-simple-router/src/helpers/warn.ts new file: uni_modules/uni-simple-router/src/index.ts new file: uni_modules/uni-simple-router/src/options/base.ts new file: uni_modules/uni-simple-router/src/options/config.ts new file: uni_modules/uni-simple-router/src/public/hooks.ts new file: uni_modules/uni-simple-router/src/public/methods.ts new file: uni_modules/uni-simple-router/src/public/page.ts new file: uni_modules/uni-simple-router/src/public/query.ts new file: uni_modules/uni-simple-router/src/public/rewrite.ts new file: uni_modules/uni-simple-router/src/public/router.ts new file: uni_modules/uni-simple-router/src/public/uniOrigin.ts new file: uni_modules/uni-simple-router/test/path-to-regexp.spec.ts new file: uni_modules/uni-simple-router/test/query-toggle.spec.ts new file: uni_modules/uni-simple-router/tsconfig.json new file: uni_modules/uni-simple-router/webpack/webpack.common.js new file: uni_modules/uni-simple-router/webpack/webpack.dev.js new file: uni_modules/uni-simple-router/webpack/webpack.prod.js new file: uni_modules/uview-ui/LICENSE new file: uni_modules/uview-ui/README.md new file: uni_modules/uview-ui/changelog.md new file: uni_modules/uview-ui/components/u--form/u--form.vue new file: uni_modules/uview-ui/components/u--image/u--image.vue new file: uni_modules/uview-ui/components/u--input/u--input.vue new file: uni_modules/uview-ui/components/u--text/u--text.vue new file: uni_modules/uview-ui/components/u--textarea/u--textarea.vue new file: uni_modules/uview-ui/components/u-action-sheet/props.js new file: uni_modules/uview-ui/components/u-action-sheet/u-action-sheet.vue new file: uni_modules/uview-ui/components/u-album/props.js new file: uni_modules/uview-ui/components/u-album/u-album.vue new file: uni_modules/uview-ui/components/u-alert/props.js new file: uni_modules/uview-ui/components/u-alert/u-alert.vue new file: uni_modules/uview-ui/components/u-avatar-group/props.js new file: uni_modules/uview-ui/components/u-avatar-group/u-avatar-group.vue new file: uni_modules/uview-ui/components/u-avatar/props.js new file: uni_modules/uview-ui/components/u-avatar/u-avatar.vue new file: uni_modules/uview-ui/components/u-back-top/props.js new file: uni_modules/uview-ui/components/u-back-top/u-back-top.vue new file: uni_modules/uview-ui/components/u-badge/props.js new file: uni_modules/uview-ui/components/u-badge/u-badge.vue new file: uni_modules/uview-ui/components/u-button/nvue.scss new file: uni_modules/uview-ui/components/u-button/props.js new file: uni_modules/uview-ui/components/u-button/u-button.vue new file: uni_modules/uview-ui/components/u-button/vue.scss new file: uni_modules/uview-ui/components/u-calendar/header.vue new file: uni_modules/uview-ui/components/u-calendar/month.vue new file: uni_modules/uview-ui/components/u-calendar/props.js new file: uni_modules/uview-ui/components/u-calendar/u-calendar.vue new file: uni_modules/uview-ui/components/u-calendar/util.js new file: uni_modules/uview-ui/components/u-car-keyboard/props.js new file: uni_modules/uview-ui/components/u-car-keyboard/u-car-keyboard.vue new file: uni_modules/uview-ui/components/u-cell-group/props.js new file: uni_modules/uview-ui/components/u-cell-group/u-cell-group.vue new file: uni_modules/uview-ui/components/u-cell/props.js new file: uni_modules/uview-ui/components/u-cell/u-cell.vue new file: uni_modules/uview-ui/components/u-checkbox-group/props.js new file: uni_modules/uview-ui/components/u-checkbox-group/u-checkbox-group.vue new file: uni_modules/uview-ui/components/u-checkbox/props.js new file: uni_modules/uview-ui/components/u-checkbox/u-checkbox.vue new file: uni_modules/uview-ui/components/u-circle-progress/props.js new file: uni_modules/uview-ui/components/u-circle-progress/u-circle-progress.vue new file: uni_modules/uview-ui/components/u-code-input/props.js new file: uni_modules/uview-ui/components/u-code-input/u-code-input.vue new file: uni_modules/uview-ui/components/u-code/props.js new file: uni_modules/uview-ui/components/u-code/u-code.vue new file: uni_modules/uview-ui/components/u-col/props.js new file: uni_modules/uview-ui/components/u-col/u-col.vue new file: uni_modules/uview-ui/components/u-collapse-item/props.js new file: uni_modules/uview-ui/components/u-collapse-item/u-collapse-item.vue new file: uni_modules/uview-ui/components/u-collapse/props.js new file: uni_modules/uview-ui/components/u-collapse/u-collapse.vue new file: uni_modules/uview-ui/components/u-column-notice/props.js new file: uni_modules/uview-ui/components/u-column-notice/u-column-notice.vue new file: uni_modules/uview-ui/components/u-count-down/props.js new file: uni_modules/uview-ui/components/u-count-down/u-count-down.vue new file: uni_modules/uview-ui/components/u-count-down/utils.js new file: uni_modules/uview-ui/components/u-count-to/props.js new file: uni_modules/uview-ui/components/u-count-to/u-count-to.vue new file: uni_modules/uview-ui/components/u-datetime-picker/props.js new file: uni_modules/uview-ui/components/u-datetime-picker/u-datetime-picker.vue new file: uni_modules/uview-ui/components/u-divider/props.js new file: uni_modules/uview-ui/components/u-divider/u-divider.vue new file: uni_modules/uview-ui/components/u-dropdown-item/props.js new file: uni_modules/uview-ui/components/u-dropdown-item/u-dropdown-item.vue new file: uni_modules/uview-ui/components/u-dropdown/props.js new file: uni_modules/uview-ui/components/u-dropdown/u-dropdown.vue new file: uni_modules/uview-ui/components/u-empty/props.js new file: uni_modules/uview-ui/components/u-empty/u-empty.vue new file: uni_modules/uview-ui/components/u-form-item/props.js new file: uni_modules/uview-ui/components/u-form-item/u-form-item.vue new file: uni_modules/uview-ui/components/u-form/props.js new file: uni_modules/uview-ui/components/u-form/u-form.vue new file: uni_modules/uview-ui/components/u-gap/props.js new file: uni_modules/uview-ui/components/u-gap/u-gap.vue new file: uni_modules/uview-ui/components/u-grid-item/props.js new file: uni_modules/uview-ui/components/u-grid-item/u-grid-item.vue new file: uni_modules/uview-ui/components/u-grid/props.js new file: uni_modules/uview-ui/components/u-grid/u-grid.vue new file: uni_modules/uview-ui/components/u-icon/icons.js new file: uni_modules/uview-ui/components/u-icon/props.js new file: uni_modules/uview-ui/components/u-icon/u-icon.vue new file: uni_modules/uview-ui/components/u-image/props.js new file: uni_modules/uview-ui/components/u-image/u-image.vue new file: uni_modules/uview-ui/components/u-index-anchor/props.js new file: uni_modules/uview-ui/components/u-index-anchor/u-index-anchor.vue new file: uni_modules/uview-ui/components/u-index-item/props.js new file: uni_modules/uview-ui/components/u-index-item/u-index-item.vue new file: uni_modules/uview-ui/components/u-index-list/props.js new file: uni_modules/uview-ui/components/u-index-list/u-index-list.vue new file: uni_modules/uview-ui/components/u-input/props.js new file: uni_modules/uview-ui/components/u-input/u-input.vue new file: uni_modules/uview-ui/components/u-keyboard/props.js new file: uni_modules/uview-ui/components/u-keyboard/u-keyboard.vue new file: uni_modules/uview-ui/components/u-line-progress/props.js new file: uni_modules/uview-ui/components/u-line-progress/u-line-progress.vue new file: uni_modules/uview-ui/components/u-line/props.js new file: uni_modules/uview-ui/components/u-line/u-line.vue new file: uni_modules/uview-ui/components/u-link/props.js new file: uni_modules/uview-ui/components/u-link/u-link.vue new file: uni_modules/uview-ui/components/u-list-item/props.js new file: uni_modules/uview-ui/components/u-list-item/u-list-item.vue new file: uni_modules/uview-ui/components/u-list/props.js new file: uni_modules/uview-ui/components/u-list/u-list.vue new file: uni_modules/uview-ui/components/u-loading-icon/props.js new file: uni_modules/uview-ui/components/u-loading-icon/u-loading-icon.vue new file: uni_modules/uview-ui/components/u-loading-page/props.js new file: uni_modules/uview-ui/components/u-loading-page/u-loading-page.vue new file: uni_modules/uview-ui/components/u-loadmore/props.js new file: uni_modules/uview-ui/components/u-loadmore/u-loadmore.vue new file: uni_modules/uview-ui/components/u-modal/props.js new file: uni_modules/uview-ui/components/u-modal/u-modal.vue new file: uni_modules/uview-ui/components/u-navbar/props.js new file: uni_modules/uview-ui/components/u-navbar/u-navbar.vue new file: uni_modules/uview-ui/components/u-no-network/props.js new file: uni_modules/uview-ui/components/u-no-network/u-no-network.vue new file: uni_modules/uview-ui/components/u-notice-bar/props.js new file: uni_modules/uview-ui/components/u-notice-bar/u-notice-bar.vue new file: uni_modules/uview-ui/components/u-notify/props.js new file: uni_modules/uview-ui/components/u-notify/u-notify.vue new file: uni_modules/uview-ui/components/u-number-box/props.js new file: uni_modules/uview-ui/components/u-number-box/u-number-box.vue new file: uni_modules/uview-ui/components/u-number-keyboard/props.js new file: uni_modules/uview-ui/components/u-number-keyboard/u-number-keyboard.vue new file: uni_modules/uview-ui/components/u-overlay/props.js new file: uni_modules/uview-ui/components/u-overlay/u-overlay.vue new file: uni_modules/uview-ui/components/u-parse/node/node.vue new file: uni_modules/uview-ui/components/u-parse/parser.js new file: uni_modules/uview-ui/components/u-parse/props.js new file: uni_modules/uview-ui/components/u-parse/u-parse.vue new file: uni_modules/uview-ui/components/u-picker-column/props.js new file: uni_modules/uview-ui/components/u-picker-column/u-picker-column.vue new file: uni_modules/uview-ui/components/u-picker/props.js new file: uni_modules/uview-ui/components/u-picker/u-picker.vue new file: uni_modules/uview-ui/components/u-popup/props.js new file: uni_modules/uview-ui/components/u-popup/u-popup.vue new file: uni_modules/uview-ui/components/u-radio-group/props.js new file: uni_modules/uview-ui/components/u-radio-group/u-radio-group.vue new file: uni_modules/uview-ui/components/u-radio/props.js new file: uni_modules/uview-ui/components/u-radio/u-radio.vue new file: uni_modules/uview-ui/components/u-rate/props.js new file: uni_modules/uview-ui/components/u-rate/u-rate.vue new file: uni_modules/uview-ui/components/u-read-more/props.js new file: uni_modules/uview-ui/components/u-read-more/u-read-more.vue new file: uni_modules/uview-ui/components/u-row-notice/props.js new file: uni_modules/uview-ui/components/u-row-notice/u-row-notice.vue new file: uni_modules/uview-ui/components/u-row/props.js new file: uni_modules/uview-ui/components/u-row/u-row.vue new file: uni_modules/uview-ui/components/u-safe-bottom/props.js new file: uni_modules/uview-ui/components/u-safe-bottom/u-safe-bottom.vue new file: uni_modules/uview-ui/components/u-scroll-list/nvue.js new file: uni_modules/uview-ui/components/u-scroll-list/other.js new file: uni_modules/uview-ui/components/u-scroll-list/props.js new file: uni_modules/uview-ui/components/u-scroll-list/scrollWxs.wxs new file: uni_modules/uview-ui/components/u-scroll-list/u-scroll-list.vue new file: uni_modules/uview-ui/components/u-search/props.js new file: uni_modules/uview-ui/components/u-search/u-search.vue new file: uni_modules/uview-ui/components/u-skeleton/props.js new file: uni_modules/uview-ui/components/u-skeleton/u-skeleton.vue new file: uni_modules/uview-ui/components/u-slider/mpother.js new file: uni_modules/uview-ui/components/u-slider/mpwxs.js new file: uni_modules/uview-ui/components/u-slider/mpwxs.wxs new file: "uni_modules/uview-ui/components/u-slider/nvue - \345\211\257\346\234\254.js" new file: uni_modules/uview-ui/components/u-slider/nvue.js new file: uni_modules/uview-ui/components/u-slider/props.js new file: uni_modules/uview-ui/components/u-slider/u-slider.vue new file: uni_modules/uview-ui/components/u-status-bar/props.js new file: uni_modules/uview-ui/components/u-status-bar/u-status-bar.vue new file: uni_modules/uview-ui/components/u-steps-item/props.js new file: uni_modules/uview-ui/components/u-steps-item/u-steps-item.vue new file: uni_modules/uview-ui/components/u-steps/props.js new file: uni_modules/uview-ui/components/u-steps/u-steps.vue new file: uni_modules/uview-ui/components/u-sticky/props.js new file: uni_modules/uview-ui/components/u-sticky/u-sticky.vue new file: uni_modules/uview-ui/components/u-subsection/props.js new file: uni_modules/uview-ui/components/u-subsection/u-subsection.vue new file: uni_modules/uview-ui/components/u-swipe-action-item/index - backup.wxs new file: uni_modules/uview-ui/components/u-swipe-action-item/index.wxs new file: uni_modules/uview-ui/components/u-swipe-action-item/nvue - backup.js new file: uni_modules/uview-ui/components/u-swipe-action-item/nvue.js new file: uni_modules/uview-ui/components/u-swipe-action-item/props.js new file: uni_modules/uview-ui/components/u-swipe-action-item/u-swipe-action-item.vue new file: uni_modules/uview-ui/components/u-swipe-action-item/wxs.js new file: uni_modules/uview-ui/components/u-swipe-action/props.js new file: uni_modules/uview-ui/components/u-swipe-action/u-swipe-action.vue new file: uni_modules/uview-ui/components/u-swiper-indicator/props.js new file: uni_modules/uview-ui/components/u-swiper-indicator/u-swiper-indicator.vue new file: uni_modules/uview-ui/components/u-swiper/props.js new file: uni_modules/uview-ui/components/u-swiper/u-swiper.vue new file: uni_modules/uview-ui/components/u-switch/props.js new file: uni_modules/uview-ui/components/u-switch/u-switch.vue new file: uni_modules/uview-ui/components/u-tabbar-item/props.js new file: uni_modules/uview-ui/components/u-tabbar-item/u-tabbar-item.vue new file: uni_modules/uview-ui/components/u-tabbar/props.js new file: uni_modules/uview-ui/components/u-tabbar/u-tabbar.vue new file: uni_modules/uview-ui/components/u-table/props.js new file: uni_modules/uview-ui/components/u-table/u-table.vue new file: uni_modules/uview-ui/components/u-tabs-item/props.js new file: uni_modules/uview-ui/components/u-tabs-item/u-tabs-item.vue new file: uni_modules/uview-ui/components/u-tabs/props.js new file: uni_modules/uview-ui/components/u-tabs/u-tabs.vue new file: uni_modules/uview-ui/components/u-tag/props.js new file: uni_modules/uview-ui/components/u-tag/u-tag.vue new file: uni_modules/uview-ui/components/u-td/props.js new file: uni_modules/uview-ui/components/u-td/u-td.vue new file: uni_modules/uview-ui/components/u-text/props.js new file: uni_modules/uview-ui/components/u-text/u-text.vue new file: uni_modules/uview-ui/components/u-text/value.js new file: uni_modules/uview-ui/components/u-textarea/props.js new file: uni_modules/uview-ui/components/u-textarea/u-textarea.vue new file: uni_modules/uview-ui/components/u-toast/u-toast.vue new file: uni_modules/uview-ui/components/u-toolbar/props.js new file: uni_modules/uview-ui/components/u-toolbar/u-toolbar.vue new file: uni_modules/uview-ui/components/u-tooltip/clipboard.min.js new file: uni_modules/uview-ui/components/u-tooltip/props.js new file: uni_modules/uview-ui/components/u-tooltip/u-tooltip.vue new file: uni_modules/uview-ui/components/u-tr/props.js new file: uni_modules/uview-ui/components/u-tr/u-tr.vue new file: uni_modules/uview-ui/components/u-transition/nvue.ani-map.js new file: uni_modules/uview-ui/components/u-transition/props.js new file: uni_modules/uview-ui/components/u-transition/transition.js new file: uni_modules/uview-ui/components/u-transition/u-transition.vue new file: uni_modules/uview-ui/components/u-transition/vue.ani-style.scss new file: uni_modules/uview-ui/components/u-upload/mixin.js new file: uni_modules/uview-ui/components/u-upload/props.js new file: uni_modules/uview-ui/components/u-upload/u-upload.vue new file: uni_modules/uview-ui/components/u-upload/utils.js new file: uni_modules/uview-ui/components/uview-ui/uview-ui.vue new file: uni_modules/uview-ui/index.js new file: uni_modules/uview-ui/index.scss new file: uni_modules/uview-ui/libs/config/color.js new file: uni_modules/uview-ui/libs/config/config.js new file: uni_modules/uview-ui/libs/config/props.js new file: uni_modules/uview-ui/libs/config/props/actionSheet.js new file: uni_modules/uview-ui/libs/config/props/album.js new file: uni_modules/uview-ui/libs/config/props/alert.js new file: uni_modules/uview-ui/libs/config/props/avatar.js new file: uni_modules/uview-ui/libs/config/props/avatarGroup.js new file: uni_modules/uview-ui/libs/config/props/backtop.js new file: uni_modules/uview-ui/libs/config/props/badge.js new file: uni_modules/uview-ui/libs/config/props/button.js new file: uni_modules/uview-ui/libs/config/props/calendar.js new file: uni_modules/uview-ui/libs/config/props/carKeyboard.js new file: uni_modules/uview-ui/libs/config/props/cell.js new file: uni_modules/uview-ui/libs/config/props/cellGroup.js new file: uni_modules/uview-ui/libs/config/props/checkbox.js new file: uni_modules/uview-ui/libs/config/props/checkboxGroup.js new file: uni_modules/uview-ui/libs/config/props/circleProgress.js new file: uni_modules/uview-ui/libs/config/props/code.js new file: uni_modules/uview-ui/libs/config/props/codeInput.js new file: uni_modules/uview-ui/libs/config/props/col.js new file: uni_modules/uview-ui/libs/config/props/collapse.js new file: uni_modules/uview-ui/libs/config/props/collapseItem.js new file: uni_modules/uview-ui/libs/config/props/columnNotice.js new file: uni_modules/uview-ui/libs/config/props/countDown.js new file: uni_modules/uview-ui/libs/config/props/countTo.js new file: uni_modules/uview-ui/libs/config/props/datetimePicker.js new file: uni_modules/uview-ui/libs/config/props/divider.js new file: uni_modules/uview-ui/libs/config/props/empty.js new file: uni_modules/uview-ui/libs/config/props/form.js new file: uni_modules/uview-ui/libs/config/props/formItem.js new file: uni_modules/uview-ui/libs/config/props/gap.js new file: uni_modules/uview-ui/libs/config/props/grid.js new file: uni_modules/uview-ui/libs/config/props/gridItem.js new file: uni_modules/uview-ui/libs/config/props/icon.js new file: uni_modules/uview-ui/libs/config/props/image.js new file: uni_modules/uview-ui/libs/config/props/indexAnchor.js new file: uni_modules/uview-ui/libs/config/props/indexList.js new file: uni_modules/uview-ui/libs/config/props/input.js new file: uni_modules/uview-ui/libs/config/props/keyboard.js new file: uni_modules/uview-ui/libs/config/props/line.js new file: uni_modules/uview-ui/libs/config/props/lineProgress.js new file: uni_modules/uview-ui/libs/config/props/link.js new file: uni_modules/uview-ui/libs/config/props/list.js new file: uni_modules/uview-ui/libs/config/props/listItem.js new file: uni_modules/uview-ui/libs/config/props/loadingIcon.js new file: uni_modules/uview-ui/libs/config/props/loadingPage.js new file: uni_modules/uview-ui/libs/config/props/loadmore.js new file: uni_modules/uview-ui/libs/config/props/modal.js new file: uni_modules/uview-ui/libs/config/props/navbar.js new file: uni_modules/uview-ui/libs/config/props/noNetwork.js new file: uni_modules/uview-ui/libs/config/props/noticeBar.js new file: uni_modules/uview-ui/libs/config/props/notify.js new file: uni_modules/uview-ui/libs/config/props/numberBox.js new file: uni_modules/uview-ui/libs/config/props/numberKeyboard.js new file: uni_modules/uview-ui/libs/config/props/overlay.js new file: uni_modules/uview-ui/libs/config/props/parse.js new file: uni_modules/uview-ui/libs/config/props/picker.js new file: uni_modules/uview-ui/libs/config/props/popup.js new file: uni_modules/uview-ui/libs/config/props/radio.js new file: uni_modules/uview-ui/libs/config/props/radioGroup.js new file: uni_modules/uview-ui/libs/config/props/rate.js new file: uni_modules/uview-ui/libs/config/props/readMore.js new file: uni_modules/uview-ui/libs/config/props/row.js new file: uni_modules/uview-ui/libs/config/props/rowNotice.js new file: uni_modules/uview-ui/libs/config/props/scrollList.js new file: uni_modules/uview-ui/libs/config/props/search.js new file: uni_modules/uview-ui/libs/config/props/section.js new file: uni_modules/uview-ui/libs/config/props/skeleton.js new file: uni_modules/uview-ui/libs/config/props/slider.js new file: uni_modules/uview-ui/libs/config/props/statusBar.js new file: uni_modules/uview-ui/libs/config/props/steps.js new file: uni_modules/uview-ui/libs/config/props/stepsItem.js new file: uni_modules/uview-ui/libs/config/props/sticky.js new file: uni_modules/uview-ui/libs/config/props/subsection.js new file: uni_modules/uview-ui/libs/config/props/swipeAction.js new file: uni_modules/uview-ui/libs/config/props/swipeActionItem.js new file: uni_modules/uview-ui/libs/config/props/swiper.js new file: uni_modules/uview-ui/libs/config/props/swipterIndicator.js new file: uni_modules/uview-ui/libs/config/props/switch.js new file: uni_modules/uview-ui/libs/config/props/tabbar.js new file: uni_modules/uview-ui/libs/config/props/tabbarItem.js new file: uni_modules/uview-ui/libs/config/props/tabs.js new file: uni_modules/uview-ui/libs/config/props/tag.js new file: uni_modules/uview-ui/libs/config/props/text.js new file: uni_modules/uview-ui/libs/config/props/textarea.js new file: uni_modules/uview-ui/libs/config/props/toast.js new file: uni_modules/uview-ui/libs/config/props/toolbar.js new file: uni_modules/uview-ui/libs/config/props/tooltip.js new file: uni_modules/uview-ui/libs/config/props/transition.js new file: uni_modules/uview-ui/libs/config/props/upload.js new file: uni_modules/uview-ui/libs/config/zIndex.js new file: uni_modules/uview-ui/libs/css/color.scss new file: uni_modules/uview-ui/libs/css/common.scss new file: uni_modules/uview-ui/libs/css/components.scss new file: uni_modules/uview-ui/libs/css/flex.scss new file: uni_modules/uview-ui/libs/css/h5.scss new file: uni_modules/uview-ui/libs/css/mixin.scss new file: uni_modules/uview-ui/libs/css/mp.scss new file: uni_modules/uview-ui/libs/css/nvue.scss new file: uni_modules/uview-ui/libs/css/vue.scss new file: uni_modules/uview-ui/libs/function/colorGradient.js new file: uni_modules/uview-ui/libs/function/debounce.js new file: uni_modules/uview-ui/libs/function/digit.js new file: uni_modules/uview-ui/libs/function/index.js new file: uni_modules/uview-ui/libs/function/platform.js new file: uni_modules/uview-ui/libs/function/test.js new file: uni_modules/uview-ui/libs/function/throttle.js new file: uni_modules/uview-ui/libs/luch-request/adapters/index.js new file: uni_modules/uview-ui/libs/luch-request/core/InterceptorManager.js new file: uni_modules/uview-ui/libs/luch-request/core/Request.js new file: uni_modules/uview-ui/libs/luch-request/core/buildFullPath.js new file: uni_modules/uview-ui/libs/luch-request/core/defaults.js new file: uni_modules/uview-ui/libs/luch-request/core/dispatchRequest.js new file: uni_modules/uview-ui/libs/luch-request/core/mergeConfig.js new file: uni_modules/uview-ui/libs/luch-request/core/settle.js new file: uni_modules/uview-ui/libs/luch-request/helpers/buildURL.js new file: uni_modules/uview-ui/libs/luch-request/helpers/combineURLs.js new file: uni_modules/uview-ui/libs/luch-request/helpers/isAbsoluteURL.js new file: uni_modules/uview-ui/libs/luch-request/index.d.ts new file: uni_modules/uview-ui/libs/luch-request/index.js new file: uni_modules/uview-ui/libs/luch-request/utils.js new file: uni_modules/uview-ui/libs/luch-request/utils/clone.js new file: uni_modules/uview-ui/libs/mixin/button.js new file: uni_modules/uview-ui/libs/mixin/mixin.js new file: uni_modules/uview-ui/libs/mixin/mpMixin.js new file: uni_modules/uview-ui/libs/mixin/mpShare.js new file: uni_modules/uview-ui/libs/mixin/openType.js new file: uni_modules/uview-ui/libs/mixin/style.js new file: uni_modules/uview-ui/libs/mixin/touch.js new file: uni_modules/uview-ui/libs/util/async-validator.js new file: uni_modules/uview-ui/libs/util/calendar.js new file: uni_modules/uview-ui/libs/util/dayjs.js new file: uni_modules/uview-ui/libs/util/emitter.js new file: uni_modules/uview-ui/libs/util/route.js new file: uni_modules/uview-ui/package.json new file: uni_modules/uview-ui/theme.scss new file: vue.config.js
534 lines
17 KiB
JavaScript
534 lines
17 KiB
JavaScript
//utils/tsc.js
|
||
var encode = require("./encoding.js");
|
||
var jpPrinter = {
|
||
createNew: function() {
|
||
var jpPrinter = {};
|
||
var data = "";
|
||
var command = []
|
||
|
||
|
||
jpPrinter.name = "蓝牙打印机";
|
||
|
||
jpPrinter.init = function() {};
|
||
|
||
jpPrinter.addCommand = function(content) { //将指令转成数组装起
|
||
var code = new encode.TextEncoder(
|
||
'gb18030', {
|
||
NONSTANDARD_allowLegacyEncoding: true
|
||
}).encode(content)
|
||
for (var i = 0; i < code.length; ++i) {
|
||
command.push(code[i])
|
||
}
|
||
};
|
||
jpPrinter.clear = function() {
|
||
command = [];
|
||
};
|
||
/**
|
||
* 该指令用于设定卷标纸的宽度和长度
|
||
* 传入参数说明
|
||
* pageWidght:标签宽度 单位mm
|
||
* pageHeight:标签高度 单位mm
|
||
*/
|
||
jpPrinter.setSize = function(pageWidght, pageHeight) {
|
||
data = "SIZE " + pageWidght.toString() + " mm" + "," + pageHeight.toString() + " mm" + "\r\n";
|
||
jpPrinter.addCommand(data)
|
||
};
|
||
/**
|
||
* 该指令用于定义两张卷标纸间的垂直间距距离
|
||
* 传入参数说明
|
||
* 标签间隙 单位mm
|
||
*/
|
||
jpPrinter.setGap = function(printGap) {
|
||
data = "GAP " + printGap.toString() + " mm,0 mm\r\n";
|
||
jpPrinter.addCommand(data)
|
||
};
|
||
/**
|
||
* 该指令用于设定黑标高度及定义标签印完后标签额外送出的长度
|
||
* 传入参数说明
|
||
* 黑标高度 单位mm
|
||
*/
|
||
jpPrinter.setBline = function(printBline) {
|
||
data = "BLINE " + printBline.toString() + " mm,0 mm\r\n";
|
||
jpPrinter.addCommand(data)
|
||
};
|
||
/**
|
||
* 该指令用于控制在剥离模式时(peel-off mode)每张卷标停止的位置,在打印
|
||
* 下一张时打印机会将原先多推出或少推出的部分以回拉方式补偿回来。该指令仅
|
||
* 适用于剥离模式。
|
||
* 传入参数说明
|
||
* 纸张停止的距离 单位mm
|
||
*/
|
||
jpPrinter.setOffset = function(offset) {
|
||
data = "OFFSET " + offset.toString() + " mm,0 mm\r\n";
|
||
jpPrinter.addCommand(data)
|
||
};
|
||
/**
|
||
* 该指令用于控制打印速度
|
||
* 传入参数说明
|
||
* 1<=printSpeed<=6
|
||
* 实际支持速度以自检页为准
|
||
*/
|
||
jpPrinter.setSpeed = function(printSpeed) {
|
||
data = "SPEED " + printSpeed.toString() + "\r\n";
|
||
jpPrinter.addCommand(data)
|
||
};
|
||
/**
|
||
* 该指令用于控制打印时的浓度
|
||
传入参数说明
|
||
* 1<=printDensity<=15
|
||
*/
|
||
jpPrinter.setDensity = function(printDensity) {
|
||
data = "DENSITY " + printDensity.toString() + "\r\n";
|
||
jpPrinter.addCommand(data)
|
||
}
|
||
|
||
/**
|
||
* 该指令用于定义打印时出纸和打印字体的方向
|
||
* 传入参数说明
|
||
* direction=0或direction=1
|
||
*/
|
||
jpPrinter.setDirection = function(direction) {
|
||
data = "DIRECTION " + direction + "\r\n";
|
||
jpPrinter.addCommand(data)
|
||
};
|
||
/**
|
||
* 该指令用于定义卷标的参考坐标原点。坐标原点位置和打印方向有关
|
||
* 传入参数说明
|
||
* x 水平方向的坐标位置,单位dots
|
||
* y 垂直方向的坐标位置,单位dots
|
||
* 打印机分辨率200 DPI: 1 mm = 8 dots
|
||
* 打印机分辨率300 DPI: 1 mm = 12 dots
|
||
*/
|
||
jpPrinter.setReference = function(x, y) {
|
||
data = "REFERENCE " + x + "," + y + "\r\n";
|
||
jpPrinter.addCommand(data)
|
||
};
|
||
/**
|
||
* 该指令表示标签打印偏移量多少设置
|
||
* 传入参数说明 点数dot
|
||
* n 偏移量 ,单位dot 1mm=8 dots
|
||
* 打印机分辨率200 DPI: 1 mm = 8 dots
|
||
* 打印机分辨率300 DPI: 1 mm = 12 dots
|
||
*/
|
||
jpPrinter.setShift = function(n) {
|
||
data = "SHIFT " + n + "\r\n";
|
||
jpPrinter.addCommand(data)
|
||
};
|
||
/**
|
||
* 该指令用于选择对应的国际字符集
|
||
* 传入参数说明
|
||
* 001:USA
|
||
* 002:French
|
||
* 003:Latin America
|
||
* 034:Spanish
|
||
* 039:Italian
|
||
* 044:United Kingdom
|
||
* 046:Swedish
|
||
* 047:Norwegian
|
||
* 049:German
|
||
*/
|
||
jpPrinter.setCountry = function(country) {
|
||
data = "COUNTRY " + country + "\r\n";
|
||
jpPrinter.addCommand(data)
|
||
};
|
||
/**
|
||
* 该指令用于选择对应的国际代码页
|
||
* 传入参数说明
|
||
* 8-bit codepage 字符集代表
|
||
* 437:United States
|
||
* 850:Multilingual
|
||
* 852:Slavic
|
||
* 860:Portuguese
|
||
* 863:Canadian/French
|
||
* 865:Nordic
|
||
*
|
||
* Windows code page
|
||
* 1250:Central Europe
|
||
* 1252:Latin I
|
||
* 1253:Greek
|
||
* 1254:Turkish
|
||
*
|
||
* 以下代码页仅限于12×24 dot 英数字体
|
||
* WestEurope:WestEurope
|
||
* Greek:Greek
|
||
* Hebrew:Hebrew
|
||
* EastEurope:EastEurope
|
||
* Iran:Iran
|
||
* IranII:IranII
|
||
* Latvian:Latvian
|
||
* Arabic:Arabic
|
||
* Vietnam:Vietnam
|
||
* Uygur:Uygur
|
||
* Thai:Thai
|
||
* 1252:Latin I
|
||
* 1257:WPC1257
|
||
* 1251:WPC1251
|
||
* 866:Cyrillic
|
||
* 858:PC858
|
||
* 747:PC747
|
||
* 864:PC864
|
||
* 1001:PC1001
|
||
*/
|
||
jpPrinter.setCodepage = function(codepage) {
|
||
data = "CODEPAGE " + codepage + "\r\n";
|
||
jpPrinter.addCommand(data)
|
||
}
|
||
/**
|
||
* 该指令用于清除图像缓冲区(image buffer)的数据
|
||
*/
|
||
jpPrinter.setCls = function() {
|
||
data = "CLS\r\n";
|
||
jpPrinter.addCommand(data)
|
||
};
|
||
/**
|
||
* 该指令用于将标签纸向前推送指定的长度
|
||
* 传入参数说明 点数dots
|
||
* 打印机分辨率200 DPI:1 mm = 8 dots
|
||
* 打印机分辨率300 DPI:1 mm = 12 dots
|
||
*/
|
||
jpPrinter.setFeed = function(feed) {
|
||
data = "FEED " + feed + "\r\n";
|
||
jpPrinter.addCommand(data)
|
||
};
|
||
/**
|
||
* 该指令用于将标签纸向后回拉指定的长度
|
||
* 传入参数说明 点数dots
|
||
* 打印机分辨率200 DPI:1 mm = 8 dots
|
||
* 打印机分辨率300 DPI:1 mm = 12 dots
|
||
*/
|
||
jpPrinter.setBackFeed = function(backup) {
|
||
data = "BACKFEED " + backup + "\r\n";
|
||
jpPrinter.addCommand(data)
|
||
}
|
||
/**
|
||
* 该指令用于控制打印机进一张标签纸
|
||
*/
|
||
jpPrinter.setFromfeed = function() {
|
||
data = "FORMFEED\r\n";
|
||
jpPrinter.addCommand(data)
|
||
};
|
||
/**
|
||
* 在使用含有间隙或黑标的标签纸时,若不能确定第一张标签纸是否在正确打印位
|
||
* 置时,此指令可将标签纸向前推送至下一张标签纸的起点开始打印。标签尺寸和
|
||
* 间隙需要在本条指令前设置
|
||
* 注:使用该指令时,纸张高度大于或等于30 mm
|
||
*/
|
||
jpPrinter.setHome = function() { //根据Size找到下一张标签纸的位置
|
||
data = "HOME\r\n";
|
||
jpPrinter.addCommand(data)
|
||
};
|
||
/**
|
||
* 该指令用于打印出存储于影像缓冲区内的数据
|
||
*/
|
||
jpPrinter.setPagePrint = function() {
|
||
data = "PRINT 1,1\r\n"
|
||
jpPrinter.addCommand(data)
|
||
};
|
||
/**
|
||
* 该指令用于打印出存储于影像缓冲区内的数据
|
||
* 传入参数说明 打印份数
|
||
* 1≤n≤65535
|
||
*/
|
||
jpPrinter.setPrint = function(n) {
|
||
data = "PRINT " + n + ",1\r\n"
|
||
jpPrinter.addCommand(data)
|
||
};
|
||
/**
|
||
* 该指令用于控制蜂鸣器的频率,可设定10 阶的声音,每阶声音的长短由第二个参数控制
|
||
* 传入参数说明
|
||
* level 音阶:0-9
|
||
* interval 间隔时间:1-4095
|
||
*/
|
||
jpPrinter.setSound = function(level, interval) { //控制蜂鸣器
|
||
data = "SOUND " + level + "," + interval + "\r\n";
|
||
jpPrinter.addCommand(data)
|
||
};
|
||
/**
|
||
* 该指令用于设定打印机进纸时,若经过所设定的长度仍无法侦测到垂直间距,则打印机在连续纸模式工作
|
||
* 传入参数说明 点数dots
|
||
*/
|
||
jpPrinter.setLimitfeed = function(limit) { // 检测垂直间距
|
||
data = "LIMITFEED " + limit + "mm\r\n";
|
||
jpPrinter.addCommand(data)
|
||
};
|
||
/**
|
||
* 打印自检页
|
||
*/
|
||
jpPrinter.setSelfTest = function() {
|
||
data = "SELFTEST\r\n";
|
||
jpPrinter.addCommand(data)
|
||
}
|
||
/**
|
||
* 该指令用于在标签上画线
|
||
* 传入参数说明
|
||
* x 线条左上角X 坐标,单位dots
|
||
* y 线条左上角Y 坐标,单位dots
|
||
* width 线宽,单位dots
|
||
* height 线高,单位dots
|
||
*/
|
||
jpPrinter.setBar = function(x, y, width, height) { //绘制线条
|
||
data = "BAR " + x + "," + y + "," + width + "," + height + "\r\n"
|
||
jpPrinter.addCommand(data)
|
||
};
|
||
/**
|
||
* 该指令用于在卷标上绘制矩形方框
|
||
* x_start 方框左上角X 坐标,单位dots
|
||
* y_start 方框左上角Y 坐标,单位dots
|
||
* x_end 方框右下角X 坐标,单位dots
|
||
* y_end 方框右下角Y 坐标,单位dots
|
||
* thickness 方框线宽,单位dots
|
||
*/
|
||
jpPrinter.setBox = function(x_start, y_start, x_end, y_end, thickness) {
|
||
data = "BOX " + x_start + "," + y_start + "," + x_end + "," + y_end + "," + thickness + "\r\n";
|
||
jpPrinter.addCommand(data)
|
||
};
|
||
/**
|
||
* 该指令用来画一维条码
|
||
* 传入参数说明
|
||
* x 左上角水平坐标起点,以点(dot)表示
|
||
* y 左上角垂直坐标起点,以点(dot)表示
|
||
* height 条形码高度,以点(dot)表示
|
||
*readable 0 表示人眼不可识,1 表示人眼可识
|
||
*rotation 条形码旋转角度,顺时针方向 0,90,180,270
|
||
* narrow 窄bar 宽度,以点(dots)表示
|
||
* wide 宽bar 宽度,以点(dot)表示
|
||
* content 打印内容
|
||
*/
|
||
jpPrinter.setBarCode = function(x, y, codetype, height, readable, rotation, narrow, wide, content) {
|
||
data = "BARCODE " + x + "," + y + ",\"" + codetype + "\"," + height + "," + readable + "," +
|
||
rotation + "," + narrow + "," + wide + ",\"" + content + "\"\r\n"
|
||
jpPrinter.addCommand(data)
|
||
};
|
||
jpPrinter.drawBitmap = function(a, b, c, d, e, f) {
|
||
var g = "BITMAP ".concat(a, ",").concat(b, ",").concat(c / 8, ",").concat(d, ",").concat(e,
|
||
",");
|
||
jpPrinter.addCommand(cmd);
|
||
for (y = 0; y < d; y++) {
|
||
for (x = 0; x < c; x++) {
|
||
var color = res.data[(y * c + x) * 4 + 1];
|
||
if (color <= 128) {
|
||
bits[parseInt(y * pitch + x / 8)] |= (0x80 >> (x % 8));
|
||
}
|
||
}
|
||
}
|
||
for (var i = 0; i < bits.length; i++) {
|
||
command.push((~bits[i]) & 0xFF);
|
||
}
|
||
};
|
||
/**
|
||
* 打印图片(单色图片)
|
||
* res为画布参数
|
||
*/
|
||
jpPrinter.setBitmap = function(x, y, mode, res) {
|
||
console.log("res.width,res.height", res.width, res.height);
|
||
var w = res.width;
|
||
var h = res.height;
|
||
var bitw = parseInt((w + 7) / 8) * 8;
|
||
// var bitw = (parseInt(w) % 8) == 0 ? (parseInt(w) / 8) :( parseInt(w) / 8+1);
|
||
var pitch = parseInt(bitw / 8);
|
||
var bits = new Uint8Array(h * pitch);
|
||
console.log("w=" + w + ", h=" + h + ", bitw=" + bitw / 8 + ", pitch=" + pitch + ", bits=" + bits.length);
|
||
var cmd = "BITMAP " + x + "," + y + "," + pitch + "," + h + "," + mode + ",";
|
||
console.log("add cmd: " + cmd);
|
||
jpPrinter.addCommand(cmd);
|
||
// for (var i=0; i<bits.length; i++) {
|
||
// bits[i] = 0;
|
||
// }
|
||
for (y = 0; y < h; y++) {
|
||
for (x = 0; x < w; x++) {
|
||
|
||
var color = res.data.data[(y * w + x) * 4 + 1];
|
||
if (color <= 128) {
|
||
bits[parseInt(y * pitch + x / 8)] |= (0x80 >> (x % 8));
|
||
}
|
||
}
|
||
}
|
||
for (var i = 0; i < bits.length; i++) {
|
||
command.push((~bits[i]) & 0xFF);
|
||
}
|
||
console.log(command);
|
||
};
|
||
|
||
/**
|
||
* 将指定的区域反相打印
|
||
* 传入参数说明
|
||
* x_start 反相区域左上角X 坐标,单位dot
|
||
* y_start 反相区域左上角Y 坐标,单位dot
|
||
* x_width 反相区域宽度,单位dot
|
||
* y_height 反相区域高度,单位dot
|
||
*/
|
||
jpPrinter.setErase = function(x_start, y_start, x_width, y_height) {
|
||
data = "ERASE " + x_start + "," + y_start + "," + x_width + "," + y_height + "\r\n";
|
||
jpPrinter.addCommand(data)
|
||
};
|
||
/**
|
||
* 将指定的区域反相打印
|
||
* 传入参数说明
|
||
* x_start 反相区域左上角X 坐标,单位dot
|
||
* y_start 反相区域左上角Y 坐标,单位dot
|
||
* x_width 反相区域宽度,单位dot
|
||
* y_height 反相区域高度,单位dot
|
||
*/
|
||
jpPrinter.setReverse = function(x_start, y_start, x_width, y_height) {
|
||
data = "REVERSE " + x_start + "," + y_start + "," + x_width + "," + y_height + "\r\n";
|
||
jpPrinter.addCommand(data)
|
||
};
|
||
/**
|
||
* 该指令用于打印字符串
|
||
* 传入参数说明
|
||
* x 文字X 方向起始点坐标
|
||
* y 文字Y 方向起始点坐标
|
||
* font 字体名称
|
||
* 1 8×12 dot 英数字体
|
||
* 2 12×20 dot 英数字体
|
||
* 3 16×24 dot 英数字体
|
||
* 4 24×32 dot 英数字体
|
||
* 5 32×48 dot 英数字体
|
||
* 6 14×19 dot 英数字体OCR-B
|
||
* 7 21×27 dot 英数字体OCR-B
|
||
* 8 14×25 dot 英数字体OCR-A
|
||
* 9 9×17 dot 英数字体
|
||
* 10 12×24 dot 英数字体
|
||
* TSS16.BF2 简体中文16×16(GB 码)
|
||
* TSS20.BF2 简体中文20×20(GB 码)
|
||
* TST24.BF2 繁体中文24×24(大五码)
|
||
* TSS24.BF2 简体中文24×24(GB 码)
|
||
* K 韩文24×24Font(KS 码)
|
||
* TSS32.BF2 简体中文32×32(GB 码)
|
||
* rotation 文字旋转角度(顺时针方向) 0, 90, 180, 270
|
||
*/
|
||
jpPrinter.setText = function(x, y, font, rotation, x_, y_, str) {
|
||
data = "TEXT " + x + "," + y + ",\"" + font + "\"," + rotation + "," + x_ + "," + y_ + "," +
|
||
"\"" + str +
|
||
"\"\r\n"
|
||
jpPrinter.addCommand(data)
|
||
};
|
||
/**
|
||
* 该指令用来打印二维码
|
||
* x 二维码水平方向起始点坐标
|
||
* y 二维码垂直方向起始点坐标
|
||
* ECC level 选择QRCODE 纠错等级
|
||
* L 7%
|
||
* M 15%
|
||
* Q 25%
|
||
* H 30%
|
||
* cell width 二维码宽度1-10
|
||
* mode 手动/自动编码
|
||
* A Auto
|
||
* M Manual
|
||
* rotation 旋转角度(顺时针方向) 0,90,180,270
|
||
* content 内容
|
||
*/
|
||
jpPrinter.setQrcode = function(x, y, level, width, mode, rotation, model, mask, content) {
|
||
data = "QRCODE " + x + "," + y + "," + level + "," + width + "," + mode + "," + rotation + "," +
|
||
model +
|
||
"," +
|
||
mask + ",\"" + content + "\"\r\n"
|
||
jpPrinter.addCommand(data)
|
||
};
|
||
/**
|
||
* 该指令用来起动Key1 的预设功能
|
||
* 传入参数说明
|
||
* ON 开启按键
|
||
* OFF 关闭按键
|
||
*/
|
||
jpPrinter.setKey1 = function(n) {
|
||
data = "SET KYE1 " + n.toString + "\r\n"
|
||
jpPrinter.addCommand(data)
|
||
};
|
||
/**
|
||
* 该指令用来起动Key2 的预设功能
|
||
* 传入参数说明
|
||
* ON 开启按键
|
||
* OFF 关闭按键
|
||
*/
|
||
jpPrinter.setKey2 = function(n) {
|
||
data = "SET KYE2 " + n.toString + "\r\n"
|
||
jpPrinter.addCommand(data)
|
||
};
|
||
/**
|
||
* 该指令用来启动/关闭剥离模式,默认值为关闭
|
||
* 传入参数说明
|
||
* ON 起动剥离模式
|
||
* OFF 关闭剥离模式
|
||
*/
|
||
jpPrinter.setPeel = function(n) {
|
||
data = "SET PEEL " + n.toString + "\r\n"
|
||
jpPrinter.addCommand(data)
|
||
};
|
||
/**
|
||
* 此命令是用来启用/禁用撕纸位置走到撕纸处,此设置关掉电源后将保存在打印机内
|
||
* 传入参数说明
|
||
* ON 启用撕纸位置走到撕纸处
|
||
* OFF 禁用撕纸位置走到撕纸处,命令在起始位置有效
|
||
*/
|
||
jpPrinter.setTear = function(n) {
|
||
data = "SET TEAR " + n.toString + "\r\n"
|
||
jpPrinter.addCommand(data)
|
||
};
|
||
/**
|
||
* 此命令是用来启用/禁用撕纸位置走到撕纸处,此设置关掉电源后将保存在打印机内
|
||
* 传入参数说明
|
||
* ON 启用撕纸位置走到撕纸处
|
||
* OFF 禁用撕纸位置走到撕纸处,命令在起始位置有效
|
||
*/
|
||
jpPrinter.setStripper = function(n) {
|
||
data = "SET STRIPPER " + n.toString + "\r\n"
|
||
jpPrinter.addCommand(data)
|
||
};
|
||
/**
|
||
* 此设置用于启用/禁用打印头合盖传感器。如果禁用合盖传感器,打印机头被打开时,将不会传回错误信息。
|
||
* 此设置将保存在打印机内存。
|
||
* 传入参数说明
|
||
* ON 启用打印头合盖传感器
|
||
* OFF 禁用打印头合盖传感器
|
||
*/
|
||
jpPrinter.setHead = function(n) {
|
||
data = "SET HEAD " + n.toString + "\r\n"
|
||
jpPrinter.addCommand(data)
|
||
};
|
||
/**
|
||
* 此命令将禁用/启用标签机在无纸或开盖错误发生后,上纸或合盖后重新打印一次标签内容
|
||
* 传入参数说明
|
||
* OFF 禁止此功能
|
||
* ON 启用此功能
|
||
*/
|
||
jpPrinter.setReprint = function(n) {
|
||
data = "SET REPRINT " + n.toString + "\r\n"
|
||
jpPrinter.addCommand(data)
|
||
};
|
||
|
||
/**
|
||
* 设定开启/关闭碳带感应器,即切换热转式/热感印式打印。通常打印机于开启电
|
||
*源时,碳带感应器即会自动检测打印机是否已装上碳带,并藉此决定使用热感式
|
||
*或热转式打印。此项设定并不会存于打印机中。此方法仅适用于热转式机器。
|
||
* 传入参数说明
|
||
* OFF 禁止此功能
|
||
* ON 启用此功能
|
||
*/
|
||
jpPrinter.setRibbon = function(n) {
|
||
data = "SET RIBBON " + n.toString + "\r\n"
|
||
jpPrinter.addCommand(data)
|
||
};
|
||
/**
|
||
* 此命令用于设置切刀状态,关闭打印机电源后,该设置将会被存储在打印机内存中。
|
||
* 传入参数说明
|
||
* OFF 关闭切刀功能
|
||
* BATCH 在PRINT 命令结束后切纸
|
||
* pieces 0-65535,用于设置每几个标签进行切纸
|
||
*/
|
||
jpPrinter.setCut = function(n) {
|
||
data = "SET CUTTER " + n.toString + "\r\n"
|
||
jpPrinter.addCommand(data)
|
||
};
|
||
//获取打印数据
|
||
jpPrinter.getData = function() {
|
||
const text1 = command.map(code => String.fromCharCode(code)).join('');
|
||
console.log("输出命令", text1);
|
||
return command;
|
||
};
|
||
return jpPrinter;
|
||
}
|
||
};
|
||
|
||
module.exports.jpPrinter = jpPrinter; |