feat: 更新收货相关页面与信息容器

This commit is contained in:
zm2000 2026-04-27 18:25:19 +08:00
parent 42fee4319d
commit 8852fcc839
5 changed files with 19 additions and 37 deletions

View File

@ -680,6 +680,19 @@
title: '已移出常用功能',
icon: 'success'
});
const tools = this.$tools;
if (tools && typeof tools.speakText === 'function') {
try {
const task = tools.speakText('已移出常用功能');
if (task && typeof task.catch === 'function') {
task.catch(error => {
console.warn('[HomeIndex] 语音播报失败:', error);
});
}
} catch (error) {
console.warn('[HomeIndex] 语音播报异常:', error);
}
}
},
handleWrapperTouchStart(event) {
if (this.dragState.active) {

View File

@ -227,7 +227,6 @@
}
},
openStorePicker() {
this.speakMessage('选择货主');
this.showStorePicker = true;
},
async loadStoreList() {
@ -254,7 +253,6 @@
content: `是否将当前收货单绑定到货主【${option.label}】?绑定后不可更改。`,
success: async ({ confirm }) => {
if (!confirm) {
this.speakMessage('已取消');
return;
}

View File

@ -428,15 +428,6 @@
// 设置日期范围
setDateRange(type) {
const quickDateVoiceMap = {
today: '今日',
yesterday: '昨日',
beforeYesterday: '前日',
last3days: '3天内',
week: '本周',
month: '本月'
};
this.speakReceivingMessage(quickDateVoiceMap[type] || '筛选日期');
this.dateModel = type;
const dateRange = this.getDateRange(type);
this.where.startDate = dateRange.startDate;
@ -614,16 +605,7 @@
this.updateStatusCount(summary);
}
if (!silentVoice) {
const resultVoiceText = this.getReceivingListVoiceText();
if (voiceDelay > 0) {
setTimeout(() => {
this.speakReceivingMessage(resultVoiceText);
}, voiceDelay);
} else {
this.speakReceivingMessage(resultVoiceText);
}
}
}
} catch (error) {
console.error('加载收货列表失败:', error);
@ -675,7 +657,6 @@
return typeMap[status] || 'info';
},
handleShowStore(){
this.speakReceivingMessage('选择货主');
this.showStore = true;
console.log("显示选择货主")
},
@ -719,17 +700,14 @@
// 显示筛选弹窗
showFilterPopup() {
this.speakReceivingMessage('筛选');
this.filterVisible = true;
},
openDateFilter() {
this.speakReceivingMessage('筛选日期');
this.showSelectDate = true;
},
// 重置筛选
resetFilter() {
this.speakReceivingMessage('重置');
this.where = {
store: 0,
startDate: this.formatDate(new Date()),
@ -743,7 +721,6 @@
// 应用筛选
applyFilter() {
this.speakReceivingMessage('确定');
this.filterVisible = false;
this.nextListVoiceDelay = 700;
if (this.currentPage !== 1) {
@ -759,7 +736,6 @@
// 新建收货
createReceiving() {
this.speakReceivingMessage('新建收货');
this.$store.dispatch('broadcast/stop');
uni.navigateTo({
url: './receivingCreate',
@ -810,12 +786,6 @@
},
handlePageChange(page) {
const previousPage = Number(this.currentPage || 1);
if (page < previousPage) {
this.speakReceivingMessage('上一页');
} else if (page > previousPage) {
this.speakReceivingMessage('下一页');
}
this.pageChangeSilentVoice = true;
this.currentPage = page;
}

View File

@ -656,7 +656,6 @@
},
openStorePicker() {
this.speakMessage('选择货主');
this.showStorePicker = true;
},

View File

@ -531,7 +531,7 @@
}
} else {
this.showToastMessage('已取消', 'none', {
speakText: '已取消'
speak: false
});
}
}
@ -546,7 +546,7 @@
if (result.code === 200) {
this.showToastMessage('添加成功', 'success', {
speakText: '添加成功'
speak: false
});
if (result.data.selectId) {
@ -972,13 +972,15 @@
const spaceInfo = await this.$http("common.searchSpace",{keyword:data});
if(spaceInfo.code==200){
if (spaceInfo.total == 1 && this.selectedDetail.space_id!=spaceInfo.data[0].id) {
const matchedSpace = spaceInfo.data[0] || {};
const spaceLabel = matchedSpace.space_code || matchedSpace.custom_name || matchedSpace.custom_barcode || String(data || '').trim();
const updateData = {
...this.selectedDetail, // 保留原有的所有属性
space_id: spaceInfo.data[0].id
};
console.log("更新仓位",updateData);
await this.handleSelectDetailChange(updateData);
this.speakMessage('库位条码扫描成功');
this.speakMessage(`扫描成功,库位:${spaceLabel}`);
} else if (spaceInfo.total > 1) {
console.log("多个仓位",spaceInfo.data);
this.showSpaceList = true;