修复结算单管理问题

This commit is contained in:
hr121 2025-08-01 14:04:34 +08:00
parent 79bd6b57dd
commit b5b1d4ce5b
2 changed files with 35 additions and 19 deletions

View File

@ -232,19 +232,20 @@ export default {
}
//
this.flightTaskData = res.orderTaskDetailList.map(task => ({
operator: task.operatorName,
device: task.deviceName,
cargoImage: task.attachmentMaterialList && task.attachmentMaterialList.length > 0
? task.attachmentMaterialList[0].fileFullPath
: '',
weight: task.cargoWeight + 'kg',
status: task.orderItemStatus,
videoUrl: ''
}))
//
this.taskPage.total = res.orderTaskDetailList.length
if (res.orderTaskDetailList && res.orderTaskDetailList.length > 0) {
this.flightTaskData = res.orderTaskDetailList.map(task => ({
operator: task.operatorName,
device: task.deviceName,
cargoImage: task.attachmentMaterialList && task.attachmentMaterialList.length > 0
? task.attachmentMaterialList[0].fileFullPath
: '',
weight: task.cargoWeight + 'kg',
status: task.orderItemStatus,
videoUrl: ''
}))
//
this.taskPage.total = res.orderTaskDetailList.length
}
this.taskPage.page = 1
})
},

View File

@ -346,13 +346,27 @@ export default {
}))
//
getGenerateSettleOrderConfirmList({
orders: this.selection.map(order => order.id)
})
getGenerateSettleOrderConfirmList(this.selection.map(order => order.id))
.then(response => {
if (response.success) {
//
this.settlementList = response.data || []
// attractionId,cargoWeight,totalAmount,
// attractionId
this.settlementList = this.settlementList.map(item => {
const scenic = this.scenicAreaOptions.find(s => s.id === item.attractionId)
return {
scenicArea: scenic ? scenic.name : '未知景区',
weight: item.cargoWeight,
amount: item.totalAmount
}
})
//
if (this.settlementList.length === 0) {
this.$message.warning('没有可生成结算单的订单')
this.dialogVisible = false
return
}
} else {
this.$message.error('获取结算确认列表失败: ' + response.message)
}
@ -367,10 +381,11 @@ export default {
},
handleConfirm() {
console.log('确认生成结算单:', this.selection.map(order => order.id))
//
generateSettlementOrder({
orders: this.selection.map(order => order.id)
})
generateSettlementOrder(
this.selection.map(order => order.id)
)
.then(response => {
if (response.success) {
this.$message.success('结算单生成成功')