add product
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
<template>
|
||||
<div class="finance-panel">
|
||||
<t-cell-group title="资金摘要" theme="card">
|
||||
<t-cell title="成交金额" :note="formatPackageAmount(props.order.saleAmount)" />
|
||||
<t-cell title="已生效收款" :note="formatPackageAmount(props.order.paidAmount)" />
|
||||
<t-cell title="待核销收款" :note="formatPackageAmount(props.order.pendingPaidAmount)" />
|
||||
<t-cell title="剩余待收款" :note="formatPackageAmount(props.order.unpaidAmount)" />
|
||||
<t-cell title="有效退款" :note="formatPackageAmount(props.order.refundedAmount)" />
|
||||
<t-cell title="收款状态" :note="getSalesPaymentStatusText(props.order.paymentStatus)" />
|
||||
<t-cell title="退款状态" :note="getSalesRefundStatusText(props.order.refundStatus)" />
|
||||
<t-cell v-if="props.canReadFund" title="查看全部资金流水" arrow @click="emit('fund')" />
|
||||
</t-cell-group>
|
||||
<t-cell-group title="本单资金操作" theme="card">
|
||||
<t-cell
|
||||
v-for="item in props.order.fundRecordList || []"
|
||||
:key="item.id"
|
||||
:title="getFundOperationText(item.operationType)"
|
||||
:note="`${getFundStatusText(item.status)} · ${item.id || ''}`"
|
||||
arrow
|
||||
@click="item.id && emit('record', item.id)"
|
||||
>
|
||||
<template #note>
|
||||
<span class="record-note">
|
||||
<t-tag :content="getFundStatusText(item.status)" variant="light-outline" :theme="getStatusTheme(item.status)" />
|
||||
<span class="amount" v-text="formatPackageAmount(item.amount)" />
|
||||
</span>
|
||||
</template>
|
||||
</t-cell>
|
||||
<t-cell v-if="!props.order.fundRecordList?.length" title="暂无资金流水" />
|
||||
</t-cell-group>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import type { SalesOrder } from "@/types/SalesOrder";
|
||||
import { formatPackageAmount } from "@/utils/package";
|
||||
import { getFundOperationText, getFundStatusText, getSalesPaymentStatusText, getSalesRefundStatusText, getStatusTheme } from "@/utils/salesOrder";
|
||||
|
||||
const props = defineProps<{ order: SalesOrder; canReadFund: boolean }>();
|
||||
const emit = defineEmits<{ fund: []; record: [id: string] }>();
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.finance-panel { display: grid; gap: 1rem;
|
||||
.record-note { gap: .5rem; display: flex; align-items: center; }
|
||||
.amount { color: var(--td-brand-color); font-weight: 700; }
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user