diff --git a/src/components/invoice/order/InvoiceOrderList.tsx b/src/components/invoice/order/InvoiceOrderList.tsx index 95aa765..9bac0fc 100644 --- a/src/components/invoice/order/InvoiceOrderList.tsx +++ b/src/components/invoice/order/InvoiceOrderList.tsx @@ -4,19 +4,19 @@ import {useEffect, useRef, useState} from "react"; import {get} from "../../../util/AjaxUtils.ts"; import {IListPage} from "../../../interfaces/listpage/IListPage.ts"; -type DetailDataType = { +type DetailDataType = [{ productType: string; quantity: number; unitPrice: number; notes: string; productDescription: string; -} +}] type DataType = { orderId: string; orderNo: string; totalAmount: number; - detail: DetailDataType; + orderDetails: DetailDataType; orderStatus: string; gmtCreate: string; } @@ -75,17 +75,17 @@ export default function InvoiceInfoList(props: ListProps) { }, { title: '产品类型', - dataIndex: 'detail.productType', + dataIndex: 'orderDetails.productType', align: 'center', width: 100, render: (_value, record) => { - if(record.detail.productType === 'PROJ') { + if(record.orderDetails[0].productType === 'PROJ') { return '项目创建' } - if(record.detail.productType === 'AGENT') { + if(record.orderDetails[0].productType === 'AGENT') { return '项目代理' } - return record.detail.productType + return record.orderDetails[0].productType } }, { @@ -94,7 +94,7 @@ export default function InvoiceInfoList(props: ListProps) { align: 'center', width: 100, render: (_value, record) => { - return record.detail.quantity + return record.orderDetails[0].quantity } }, { @@ -103,28 +103,28 @@ export default function InvoiceInfoList(props: ListProps) { align: 'center', width: 100, render: (_value, record) => { - return (record.detail.unitPrice / 100).toFixed(2) + return (record.orderDetails[0].unitPrice / 100).toFixed(2) } }, { title: '订单备注', dataIndex: 'detail.notes', align: 'center', - width: 120, + width: 300, render: (_value, record) => { - return record.detail.notes + return record.orderDetails[0].notes } }, { title: '描述', dataIndex: 'detail.productDescription', align: 'center', - width: 200, + width: 300, ellipsis: { showTitle: false, }, render: (_value, record) => { - return {record.detail.productDescription} + return {record.orderDetails[0].productDescription} } }, ] @@ -140,6 +140,8 @@ export default function InvoiceInfoList(props: ListProps) { } }, onSuccess({data}) { + console.log('数据',data.rows); + setPage(data.page); setTotal(data.total); setDataArray(data.rows);