修复结算单管理问题
This commit is contained in:
parent
79bd6b57dd
commit
b5b1d4ce5b
@ -232,6 +232,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 映射任务列表数据
|
// 映射任务列表数据
|
||||||
|
if (res.orderTaskDetailList && res.orderTaskDetailList.length > 0) {
|
||||||
this.flightTaskData = res.orderTaskDetailList.map(task => ({
|
this.flightTaskData = res.orderTaskDetailList.map(task => ({
|
||||||
operator: task.operatorName,
|
operator: task.operatorName,
|
||||||
device: task.deviceName,
|
device: task.deviceName,
|
||||||
@ -242,9 +243,9 @@ export default {
|
|||||||
status: task.orderItemStatus,
|
status: task.orderItemStatus,
|
||||||
videoUrl: ''
|
videoUrl: ''
|
||||||
}))
|
}))
|
||||||
|
|
||||||
// 更新分页数据
|
// 更新分页数据
|
||||||
this.taskPage.total = res.orderTaskDetailList.length
|
this.taskPage.total = res.orderTaskDetailList.length
|
||||||
|
}
|
||||||
this.taskPage.page = 1
|
this.taskPage.page = 1
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -346,13 +346,27 @@ export default {
|
|||||||
}))
|
}))
|
||||||
|
|
||||||
// 调用接口获取结算确认列表
|
// 调用接口获取结算确认列表
|
||||||
getGenerateSettleOrderConfirmList({
|
getGenerateSettleOrderConfirmList(this.selection.map(order => order.id))
|
||||||
orders: this.selection.map(order => order.id)
|
|
||||||
})
|
|
||||||
.then(response => {
|
.then(response => {
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
// 成功获取结算确认列表
|
// 成功获取结算确认列表
|
||||||
this.settlementList = response.data || []
|
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 {
|
} else {
|
||||||
this.$message.error('获取结算确认列表失败: ' + response.message)
|
this.$message.error('获取结算确认列表失败: ' + response.message)
|
||||||
}
|
}
|
||||||
@ -367,10 +381,11 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
handleConfirm() {
|
handleConfirm() {
|
||||||
|
console.log('确认生成结算单:', this.selection.map(order => order.id))
|
||||||
// 调用生成结算单接口
|
// 调用生成结算单接口
|
||||||
generateSettlementOrder({
|
generateSettlementOrder(
|
||||||
orders: this.selection.map(order => order.id)
|
this.selection.map(order => order.id)
|
||||||
})
|
)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
this.$message.success('结算单生成成功')
|
this.$message.success('结算单生成成功')
|
||||||
|
Loading…
Reference in New Issue
Block a user