feat(scan): 添加手机扫码功能支持

- 在 FabricOutScanBar 组件中添加手机扫码图标和事件处理
- 更新工作台页面的扫码逻辑以支持手机扫码回退
- 在销售拣货详情页添加手机扫码按钮和处理方法
- 重构扫码设置页面以支持扫码方式选择
- 添加手机扫码配置和判断逻辑到扫码配置模块
- 扩展扫码混入模块以支持手机扫码模式和设备检测
- 在多个业务页面中集成手机扫码功能和界面元素
- 更新扫码配置存储和读取逻辑以兼容新配置结构
This commit is contained in:
2026-06-23 17:08:17 +08:00
parent 084bb235f8
commit 36c0f9a3a0
12 changed files with 277 additions and 103 deletions
+12 -6
View File
@@ -17,6 +17,14 @@
</u-form-item>
<u-form-item label-width="130" label="条码资料:">
<input type="text" v-model="QRBarCode" maxlength="-1" style="width: 170px" @confirm="SalePickBillDetailScan" />
<u-icon
v-if="usePhoneScanFallback"
name="scan"
size="44"
color="#2979ff"
style="margin-left: 8px;"
@click="handlePhoneScan"
/>
<checkbox-group @change="handleAllCrockNoChange">
<checkbox :checked="AllCrockNoScanStatus">整缸</checkbox>
</checkbox-group>
@@ -182,21 +190,16 @@ export default {
onUnload() {
this.isPageActive = false;
// #ifdef APP-PLUS
this.unregisterScanBroadcast();
// #endif
},
onHide() {
this.isPageActive = false;
// #ifdef APP-PLUS
this.unregisterScanBroadcast();
// #endif
},
onShow() {
this.isPageActive = true;
// #ifdef APP-PLUS
this.registerScanBroadcast((scanResult) => {
console.log("配布单详情-扫码结果:", scanResult);
this.QRBarCode = scanResult;
@@ -204,10 +207,13 @@ export default {
this.handleScans();
});
});
// #endif
},
methods: {
handlePhoneScan() {
this.openPhoneScan();
},
playSuccess() {
util.playSuccessAudio();
},