发票订单修改
This commit is contained in:
parent
aa778a985e
commit
f44996f355
@ -4,19 +4,19 @@ import {useEffect, useRef, useState} from "react";
|
|||||||
import {get} from "../../../util/AjaxUtils.ts";
|
import {get} from "../../../util/AjaxUtils.ts";
|
||||||
import {IListPage} from "../../../interfaces/listpage/IListPage.ts";
|
import {IListPage} from "../../../interfaces/listpage/IListPage.ts";
|
||||||
|
|
||||||
type DetailDataType = {
|
type DetailDataType = [{
|
||||||
productType: string;
|
productType: string;
|
||||||
quantity: number;
|
quantity: number;
|
||||||
unitPrice: number;
|
unitPrice: number;
|
||||||
notes: string;
|
notes: string;
|
||||||
productDescription: string;
|
productDescription: string;
|
||||||
}
|
}]
|
||||||
|
|
||||||
type DataType = {
|
type DataType = {
|
||||||
orderId: string;
|
orderId: string;
|
||||||
orderNo: string;
|
orderNo: string;
|
||||||
totalAmount: number;
|
totalAmount: number;
|
||||||
detail: DetailDataType;
|
orderDetails: DetailDataType;
|
||||||
orderStatus: string;
|
orderStatus: string;
|
||||||
gmtCreate: string;
|
gmtCreate: string;
|
||||||
}
|
}
|
||||||
@ -75,17 +75,17 @@ export default function InvoiceInfoList(props: ListProps) {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '产品类型',
|
title: '产品类型',
|
||||||
dataIndex: 'detail.productType',
|
dataIndex: 'orderDetails.productType',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 100,
|
width: 100,
|
||||||
render: (_value, record) => {
|
render: (_value, record) => {
|
||||||
if(record.detail.productType === 'PROJ') {
|
if(record.orderDetails[0].productType === 'PROJ') {
|
||||||
return '项目创建'
|
return '项目创建'
|
||||||
}
|
}
|
||||||
if(record.detail.productType === 'AGENT') {
|
if(record.orderDetails[0].productType === 'AGENT') {
|
||||||
return '项目代理'
|
return '项目代理'
|
||||||
}
|
}
|
||||||
return record.detail.productType
|
return record.orderDetails[0].productType
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -94,7 +94,7 @@ export default function InvoiceInfoList(props: ListProps) {
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
width: 100,
|
width: 100,
|
||||||
render: (_value, record) => {
|
render: (_value, record) => {
|
||||||
return record.detail.quantity
|
return record.orderDetails[0].quantity
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -103,28 +103,28 @@ export default function InvoiceInfoList(props: ListProps) {
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
width: 100,
|
width: 100,
|
||||||
render: (_value, record) => {
|
render: (_value, record) => {
|
||||||
return (record.detail.unitPrice / 100).toFixed(2)
|
return (record.orderDetails[0].unitPrice / 100).toFixed(2)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '订单备注',
|
title: '订单备注',
|
||||||
dataIndex: 'detail.notes',
|
dataIndex: 'detail.notes',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 120,
|
width: 300,
|
||||||
render: (_value, record) => {
|
render: (_value, record) => {
|
||||||
return record.detail.notes
|
return record.orderDetails[0].notes
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '描述',
|
title: '描述',
|
||||||
dataIndex: 'detail.productDescription',
|
dataIndex: 'detail.productDescription',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 200,
|
width: 300,
|
||||||
ellipsis: {
|
ellipsis: {
|
||||||
showTitle: false,
|
showTitle: false,
|
||||||
},
|
},
|
||||||
render: (_value, record) => {
|
render: (_value, record) => {
|
||||||
return <Tooltip placement="top" title={record.detail.productDescription}>{record.detail.productDescription}</Tooltip>
|
return <Tooltip placement="top" title={record.orderDetails[0].productDescription}>{record.orderDetails[0].productDescription}</Tooltip>
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
@ -140,6 +140,8 @@ export default function InvoiceInfoList(props: ListProps) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onSuccess({data}) {
|
onSuccess({data}) {
|
||||||
|
console.log('数据',data.rows);
|
||||||
|
|
||||||
setPage(data.page);
|
setPage(data.page);
|
||||||
setTotal(data.total);
|
setTotal(data.total);
|
||||||
setDataArray(data.rows);
|
setDataArray(data.rows);
|
||||||
|
Loading…
Reference in New Issue
Block a user