修复结算单管理问题
This commit is contained in:
parent
79bd6b57dd
commit
b5b1d4ce5b
@ -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
|
||||
})
|
||||
},
|
||||
|
@ -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('结算单生成成功')
|
||||
|
Loading…
Reference in New Issue
Block a user