调整接单工单金额展示
This commit is contained in:
@@ -101,6 +101,7 @@ import {
|
||||
renderDetailFieldValues,
|
||||
renderMaterialSummary,
|
||||
renderRequirementFieldValues,
|
||||
asRecord,
|
||||
formatMoney,
|
||||
formatSharingShareStatus,
|
||||
formatStatus,
|
||||
@@ -426,7 +427,12 @@ export default function WorkOrdersPanel() {
|
||||
),
|
||||
},
|
||||
{
|
||||
title: '金额',
|
||||
title: '用户付款金额',
|
||||
width: 130,
|
||||
render: (_, row) => formatUserPaymentAmount(row),
|
||||
},
|
||||
{
|
||||
title: '发单金额',
|
||||
width: 110,
|
||||
render: (_, row) => formatMoney(row.rewardAmount),
|
||||
},
|
||||
@@ -1270,6 +1276,14 @@ export default function WorkOrdersPanel() {
|
||||
)
|
||||
}
|
||||
|
||||
function formatUserPaymentAmount(order: WorkOrder): string {
|
||||
const material = asRecord(order.material)
|
||||
const source = asRecord(material.source)
|
||||
const sendCode = asRecord(source.kuaishouSendCode)
|
||||
const paymentFen = Number(sendCode.paymentFen ?? source.orderAmountFen)
|
||||
return Number.isFinite(paymentFen) ? formatMoney(paymentFen) : '-'
|
||||
}
|
||||
|
||||
function formatRequirementFieldsText(fields: CollectField[]): string {
|
||||
return fields
|
||||
.map((field) => {
|
||||
@@ -1343,4 +1357,3 @@ function MockWorkOrderForm({ onCreated }: { onCreated: () => Promise<void> }) {
|
||||
</Form>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user