2.3 KiB
2.3 KiB
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=4,barcodeType=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()
用户登录失败日志表
apiUsers.go新增TabUserLoginFailLog表结构:记录username、userID、IP、userAgent、reason(password_error / user_not_found)、count(连续失败次数)、created_at、updated_atInitUsersRouter中新增AutoMigrate(&TabUserLoginFailLog{})- 登录成功时清除该用户失败记录;密码错误和用户不存在时调用
recordLoginFail()记录/更新失败日志(24小时内累计次数) recordLoginFail()在TabUserLoginFailLog结构体后定义