Files
ops2/.workbuddy/memory/2026-04-28.md
T
2026-04-28 12:59:08 +08:00

32 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 2026-04-28 工作记录
## 搜索页面条码识别 bug 修复
- 修复搜索页面 `res.data.orders``res.data.all_orders`(工单和采购订单列表API返回字段名均为 `all_orders`
- 搜索页添加条码格式识别:`wo:ID`→工单、`item:ID`→物品、`warehouse:ID`→容器、`po:ID`→采购订单
- 容器跳转用 `uni.$emit('barcode-navigate-container')` + `switchTab`tabBar页面不能 navigateTo
- 搜索页添加扫码按钮(📷)
- App端扫码:`uni.getSetting` 仅小程序支持,App端需用 `plus.android` 检查权限
- 条件编译:`#ifdef APP-PLUS``#ifdef MP-WEIXIN``#ifdef H5` 分平台处理
## download_app 改造
- `download.php`:改为扫描 `__DIR__/../` 根目录下的所有 `.apk`,用 `filemtime()` 取最新,不再依赖文件名格式
- `index.php`:版本信息同时显示文件名和修改时间
## 订单详情页打印功能
- `order-detail.vue` 右上角添加打印按钮 🖨
- 点击后用 LcPrinter 插件打印:标题(加粗大字)/ 备注 / 状态 / 创建日期 / 条形码 `po:ID`height=4barcodeType=73
- 条件编译 `#ifdef APP-PLUS`,非 App 端 toast 提示不支持
- 订单详情页补充 `order.Styles`(样式)字段显示,插在"链接"和"备注"之间,与 web 端对齐
- 同步修正打印函数第三行:原打印"状态"→改为打印 `Styles`(样式)
## 打印初始化代码补全
- 在以下四个页面的打印函数中统一加入初始化代码(`initPrinter` + `setConcentration` + `setLineSpacing`),参照 `printer-test.vue` 写法:
- `order-detail.vue``printOrder()`
- `show-workorder.vue``printWorkOrder()`
- `item-detail.vue``printItem()`
- `warehouse.vue``printContainer()`