Compare commits

...

2 Commits

Author SHA1 Message Date
e785a99b7d chore(env): 更新为周商环境接口配置
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-04 09:45:49 +08:00
470a474d70 fix(storegoods): 修复重扫仓位时旧码拼接问题
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-04 09:44:48 +08:00
4 changed files with 44 additions and 17 deletions

10
.env
View File

@ -1,5 +1,5 @@
NODE_ENV = development
VUE_APP_ENV_NAME = 默认环境
VUE_APP_UPGRADE_NAME = erp_pda
VUE_APP_PRODUCTION_API_URL = https://www.haotopai.com/hcscm_weave/mes/server/pda/v1
VUE_APP_DEV_API_URL = https://www.haotopai.com/hcscm_weave/mes/server/pda/v1
NODE_ENV = production
VUE_APP_ENV_NAME = zhoushang环境
VUE_APP_UPGRADE_NAME = erp_pda_zhoushang
VUE_APP_PRODUCTION_API_URL = https://hcscmtest.zzfzyc.com/hcscm_weave/pda/v1
VUE_APP_DEV_API_URL = https://hcscmtest.zzfzyc.com/hcscm_weave/pda/v1

View File

@ -132,6 +132,16 @@ export default {
this.warehouseBinName = '';
this.phoneContinuousScan = false;
},
/** 重扫仓位:先清空输入框再填入,避免残留旧码拼接 */
applyWarehouseBinScan(scanResult) {
const code = String(scanResult || '').trim().replace(/[\r\n]/g, '');
if (!code) return;
this.warehouseBinCode = '';
this.$nextTick(() => {
this.warehouseBinCode = code;
this.$nextTick(() => this.resolveWarehouseBin());
});
},
handleBinPhoneScan() {
if (!this.canScan || !this.orderId) {
this.showError('请先提交保存后再扫码');
@ -141,8 +151,7 @@ export default {
this.phoneScanTarget = 'bin';
this.openPhoneScan({
callback: (scanResult) => {
this.warehouseBinCode = String(scanResult || '').trim().replace(/[\r\n]/g, '');
this.$nextTick(() => this.resolveWarehouseBin());
this.applyWarehouseBinScan(scanResult);
},
fail: () => {},
});
@ -191,8 +200,7 @@ export default {
if (!code) return;
// 删除模式:直接按布匹码删除;未扫仓位时枪扫优先解析为仓位
if (!this.BarCodeDelStatus && !this.warehouseBinId) {
this.warehouseBinCode = code;
this.$nextTick(() => this.resolveWarehouseBin());
this.applyWarehouseBinScan(code);
return;
}
this.QRBarCode = code;
@ -239,6 +247,7 @@ export default {
.catch((e) => {
uni.hideLoading();
this.warehouseBinId = 0;
this.warehouseBinCode = '';
this.warehouseBinName = '';
this.showError(e.message || '仓位识别失败');
});

View File

@ -121,6 +121,16 @@ export default {
this.warehouseBinName = '';
this.phoneContinuousScan = false;
},
/** 重扫仓位:先清空输入框再填入,避免残留旧码拼接 */
applyWarehouseBinScan(scanResult) {
const code = String(scanResult || '').trim().replace(/[\r\n]/g, '');
if (!code) return;
this.warehouseBinCode = '';
this.$nextTick(() => {
this.warehouseBinCode = code;
this.$nextTick(() => this.resolveWarehouseBin());
});
},
handleBinPhoneScan() {
if (!this.canScan || !this.orderId) {
this.showError('请先提交保存后再扫码');
@ -130,8 +140,7 @@ export default {
this.phoneScanTarget = 'bin';
this.openPhoneScan({
callback: (scanResult) => {
this.warehouseBinCode = String(scanResult || '').trim().replace(/[\r\n]/g, '');
this.$nextTick(() => this.resolveWarehouseBin());
this.applyWarehouseBinScan(scanResult);
},
fail: () => {},
});
@ -180,8 +189,7 @@ export default {
if (!code) return;
// 删除模式:直接按布匹码删除;未扫仓位时枪扫优先解析为仓位
if (!this.BarCodeDelStatus && !this.warehouseBinId) {
this.warehouseBinCode = code;
this.$nextTick(() => this.resolveWarehouseBin());
this.applyWarehouseBinScan(code);
return;
}
this.QRBarCode = code;
@ -228,6 +236,7 @@ export default {
.catch((e) => {
uni.hideLoading();
this.warehouseBinId = 0;
this.warehouseBinCode = '';
this.warehouseBinName = '';
this.showError(e.message || '仓位识别失败');
});

View File

@ -134,6 +134,16 @@ export default {
this.warehouseBinName = '';
this.phoneContinuousScan = false;
},
/** 重扫仓位:先清空输入框再填入,避免残留旧码拼接 */
applyWarehouseBinScan(scanResult) {
const code = String(scanResult || '').trim().replace(/[\r\n]/g, '');
if (!code) return;
this.warehouseBinCode = '';
this.$nextTick(() => {
this.warehouseBinCode = code;
this.$nextTick(() => this.resolveWarehouseBin());
});
},
handleBinPhoneScan() {
if (!this.canScan || !this.orderId) {
this.showError('请先提交保存后再扫码');
@ -143,8 +153,7 @@ export default {
this.phoneScanTarget = 'bin';
this.openPhoneScan({
callback: (scanResult) => {
this.warehouseBinCode = String(scanResult || '').trim().replace(/[\r\n]/g, '');
this.$nextTick(() => this.resolveWarehouseBin());
this.applyWarehouseBinScan(scanResult);
},
fail: () => {},
});
@ -193,8 +202,7 @@ export default {
if (!code) return;
// 删除模式:直接按布匹码删除;未扫仓位时枪扫优先解析为仓位
if (!this.BarCodeDelStatus && !this.warehouseBinId) {
this.warehouseBinCode = code;
this.$nextTick(() => this.resolveWarehouseBin());
this.applyWarehouseBinScan(code);
return;
}
this.QRBarCode = code;
@ -241,6 +249,7 @@ export default {
.catch((e) => {
uni.hideLoading();
this.warehouseBinId = 0;
this.warehouseBinCode = '';
this.warehouseBinName = '';
this.showError(e.message || '仓位识别失败');
});