完善订单交接结账流程留痕
This commit is contained in:
@@ -7,11 +7,13 @@ import { useRoute } from 'vue-router'
|
||||
import {
|
||||
fetchAdminPickup,
|
||||
fetchAdminPickupFinancialAdjustments,
|
||||
fetchAdminPickupProcessEvents,
|
||||
createAdminPickupFinancialAdjustment,
|
||||
settleAdminPickupFinancialAdjustment,
|
||||
updateAdminPickupProfit,
|
||||
type AdminPickup,
|
||||
type AdminPickupFinancialAdjustment,
|
||||
type AdminPickupProcessEvent,
|
||||
} from '@/features/admin/api/adminPickup'
|
||||
import { quantity, readNumber, readUnitPrice } from '@/features/orders/composables/useOrderSnapshot'
|
||||
import { adminPath } from '@/shared/utils/adminPath'
|
||||
@@ -24,6 +26,7 @@ import {
|
||||
} from '@/shared/utils/money'
|
||||
import { pickupStatusLabel } from '@/shared/utils/statusLabels'
|
||||
import { formatDateTime } from '@/shared/utils/time'
|
||||
import ProcessTimeline from '../components/ProcessTimeline.vue'
|
||||
|
||||
interface SnapshotResource {
|
||||
key: string
|
||||
@@ -38,6 +41,7 @@ const route = useRoute()
|
||||
const loading = ref(false)
|
||||
const pickup = ref<AdminPickup | null>(null)
|
||||
const financialAdjustments = ref<AdminPickupFinancialAdjustment[]>([])
|
||||
const processEvents = ref<AdminPickupProcessEvent[]>([])
|
||||
const profitDialogVisible = ref(false)
|
||||
const financialAdjustmentDialogVisible = ref(false)
|
||||
const profitSaving = ref(false)
|
||||
@@ -117,12 +121,14 @@ onMounted(loadPickup)
|
||||
async function loadPickup() {
|
||||
loading.value = true
|
||||
try {
|
||||
const [item, adjustments] = await Promise.all([
|
||||
const [item, adjustments, events] = await Promise.all([
|
||||
fetchAdminPickup(String(route.params.id)),
|
||||
fetchAdminPickupFinancialAdjustments(String(route.params.id)),
|
||||
fetchAdminPickupProcessEvents(String(route.params.id)),
|
||||
])
|
||||
pickup.value = item
|
||||
financialAdjustments.value = adjustments
|
||||
processEvents.value = events
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
@@ -467,6 +473,17 @@ function readSnapshotResources(summary: Record<string, unknown> | null): Snapsho
|
||||
</dl>
|
||||
</section>
|
||||
|
||||
<section class="dashboard-panel detail-panel pickup-wide-panel">
|
||||
<div class="panel-heading">
|
||||
<h2>提号全流程</h2>
|
||||
<span class="panel-subtitle">创建、完成、调整及线下结算均单独留痕</span>
|
||||
</div>
|
||||
<ProcessTimeline
|
||||
:events="processEvents"
|
||||
empty-text="暂无新版过程记录;可先查看下方备注和财务调整记录"
|
||||
/>
|
||||
</section>
|
||||
|
||||
<section
|
||||
v-if="financialAdjustments.length"
|
||||
class="dashboard-panel detail-panel pickup-wide-panel"
|
||||
|
||||
Reference in New Issue
Block a user