feat: 更新收货相关页面与信息容器
This commit is contained in:
parent
42fee4319d
commit
8852fcc839
@ -680,6 +680,19 @@
|
|||||||
title: '已移出常用功能',
|
title: '已移出常用功能',
|
||||||
icon: 'success'
|
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) {
|
handleWrapperTouchStart(event) {
|
||||||
if (this.dragState.active) {
|
if (this.dragState.active) {
|
||||||
|
|||||||
@ -227,7 +227,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
openStorePicker() {
|
openStorePicker() {
|
||||||
this.speakMessage('选择货主');
|
|
||||||
this.showStorePicker = true;
|
this.showStorePicker = true;
|
||||||
},
|
},
|
||||||
async loadStoreList() {
|
async loadStoreList() {
|
||||||
@ -254,7 +253,6 @@
|
|||||||
content: `是否将当前收货单绑定到货主【${option.label}】?绑定后不可更改。`,
|
content: `是否将当前收货单绑定到货主【${option.label}】?绑定后不可更改。`,
|
||||||
success: async ({ confirm }) => {
|
success: async ({ confirm }) => {
|
||||||
if (!confirm) {
|
if (!confirm) {
|
||||||
this.speakMessage('已取消');
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -428,15 +428,6 @@
|
|||||||
|
|
||||||
// 设置日期范围
|
// 设置日期范围
|
||||||
setDateRange(type) {
|
setDateRange(type) {
|
||||||
const quickDateVoiceMap = {
|
|
||||||
today: '今日',
|
|
||||||
yesterday: '昨日',
|
|
||||||
beforeYesterday: '前日',
|
|
||||||
last3days: '3天内',
|
|
||||||
week: '本周',
|
|
||||||
month: '本月'
|
|
||||||
};
|
|
||||||
this.speakReceivingMessage(quickDateVoiceMap[type] || '筛选日期');
|
|
||||||
this.dateModel = type;
|
this.dateModel = type;
|
||||||
const dateRange = this.getDateRange(type);
|
const dateRange = this.getDateRange(type);
|
||||||
this.where.startDate = dateRange.startDate;
|
this.where.startDate = dateRange.startDate;
|
||||||
@ -614,16 +605,7 @@
|
|||||||
this.updateStatusCount(summary);
|
this.updateStatusCount(summary);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!silentVoice) {
|
|
||||||
const resultVoiceText = this.getReceivingListVoiceText();
|
|
||||||
if (voiceDelay > 0) {
|
|
||||||
setTimeout(() => {
|
|
||||||
this.speakReceivingMessage(resultVoiceText);
|
|
||||||
}, voiceDelay);
|
|
||||||
} else {
|
|
||||||
this.speakReceivingMessage(resultVoiceText);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('加载收货列表失败:', error);
|
console.error('加载收货列表失败:', error);
|
||||||
@ -675,7 +657,6 @@
|
|||||||
return typeMap[status] || 'info';
|
return typeMap[status] || 'info';
|
||||||
},
|
},
|
||||||
handleShowStore(){
|
handleShowStore(){
|
||||||
this.speakReceivingMessage('选择货主');
|
|
||||||
this.showStore = true;
|
this.showStore = true;
|
||||||
console.log("显示选择货主")
|
console.log("显示选择货主")
|
||||||
},
|
},
|
||||||
@ -719,17 +700,14 @@
|
|||||||
|
|
||||||
// 显示筛选弹窗
|
// 显示筛选弹窗
|
||||||
showFilterPopup() {
|
showFilterPopup() {
|
||||||
this.speakReceivingMessage('筛选');
|
|
||||||
this.filterVisible = true;
|
this.filterVisible = true;
|
||||||
},
|
},
|
||||||
openDateFilter() {
|
openDateFilter() {
|
||||||
this.speakReceivingMessage('筛选日期');
|
|
||||||
this.showSelectDate = true;
|
this.showSelectDate = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
// 重置筛选
|
// 重置筛选
|
||||||
resetFilter() {
|
resetFilter() {
|
||||||
this.speakReceivingMessage('重置');
|
|
||||||
this.where = {
|
this.where = {
|
||||||
store: 0,
|
store: 0,
|
||||||
startDate: this.formatDate(new Date()),
|
startDate: this.formatDate(new Date()),
|
||||||
@ -743,7 +721,6 @@
|
|||||||
|
|
||||||
// 应用筛选
|
// 应用筛选
|
||||||
applyFilter() {
|
applyFilter() {
|
||||||
this.speakReceivingMessage('确定');
|
|
||||||
this.filterVisible = false;
|
this.filterVisible = false;
|
||||||
this.nextListVoiceDelay = 700;
|
this.nextListVoiceDelay = 700;
|
||||||
if (this.currentPage !== 1) {
|
if (this.currentPage !== 1) {
|
||||||
@ -759,7 +736,6 @@
|
|||||||
|
|
||||||
// 新建收货
|
// 新建收货
|
||||||
createReceiving() {
|
createReceiving() {
|
||||||
this.speakReceivingMessage('新建收货');
|
|
||||||
this.$store.dispatch('broadcast/stop');
|
this.$store.dispatch('broadcast/stop');
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: './receivingCreate',
|
url: './receivingCreate',
|
||||||
@ -810,12 +786,6 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
handlePageChange(page) {
|
handlePageChange(page) {
|
||||||
const previousPage = Number(this.currentPage || 1);
|
|
||||||
if (page < previousPage) {
|
|
||||||
this.speakReceivingMessage('上一页');
|
|
||||||
} else if (page > previousPage) {
|
|
||||||
this.speakReceivingMessage('下一页');
|
|
||||||
}
|
|
||||||
this.pageChangeSilentVoice = true;
|
this.pageChangeSilentVoice = true;
|
||||||
this.currentPage = page;
|
this.currentPage = page;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -656,7 +656,6 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
openStorePicker() {
|
openStorePicker() {
|
||||||
this.speakMessage('选择货主');
|
|
||||||
this.showStorePicker = true;
|
this.showStorePicker = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@ -531,7 +531,7 @@
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.showToastMessage('已取消', 'none', {
|
this.showToastMessage('已取消', 'none', {
|
||||||
speakText: '已取消'
|
speak: false
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -546,7 +546,7 @@
|
|||||||
|
|
||||||
if (result.code === 200) {
|
if (result.code === 200) {
|
||||||
this.showToastMessage('添加成功', 'success', {
|
this.showToastMessage('添加成功', 'success', {
|
||||||
speakText: '添加成功'
|
speak: false
|
||||||
});
|
});
|
||||||
|
|
||||||
if (result.data.selectId) {
|
if (result.data.selectId) {
|
||||||
@ -972,13 +972,15 @@
|
|||||||
const spaceInfo = await this.$http("common.searchSpace",{keyword:data});
|
const spaceInfo = await this.$http("common.searchSpace",{keyword:data});
|
||||||
if(spaceInfo.code==200){
|
if(spaceInfo.code==200){
|
||||||
if (spaceInfo.total == 1 && this.selectedDetail.space_id!=spaceInfo.data[0].id) {
|
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 = {
|
const updateData = {
|
||||||
...this.selectedDetail, // 保留原有的所有属性
|
...this.selectedDetail, // 保留原有的所有属性
|
||||||
space_id: spaceInfo.data[0].id
|
space_id: spaceInfo.data[0].id
|
||||||
};
|
};
|
||||||
console.log("更新仓位",updateData);
|
console.log("更新仓位",updateData);
|
||||||
await this.handleSelectDetailChange(updateData);
|
await this.handleSelectDetailChange(updateData);
|
||||||
this.speakMessage('库位条码扫描成功');
|
this.speakMessage(`扫描成功,库位:${spaceLabel}`);
|
||||||
} else if (spaceInfo.total > 1) {
|
} else if (spaceInfo.total > 1) {
|
||||||
console.log("多个仓位",spaceInfo.data);
|
console.log("多个仓位",spaceInfo.data);
|
||||||
this.showSpaceList = true;
|
this.showSpaceList = true;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user