feat: 修改包码列表详情

This commit is contained in:
zhangds 2024-02-21 09:47:10 +08:00
parent ed1fa18055
commit f0d12dacd9
1 changed files with 79 additions and 25 deletions

View File

@ -4,8 +4,33 @@ import TabPage from "@/components/tabPage/main.js"
import moment from "moment"
import React from "react"
import { Notify } from "zent"
import Grid from "@/components/gird/main.js"
import "./more.less"
const Column = [
{
title: "创建时间",
name: "time",
prop: "time",
type: "slot",
width: "20%"
},
{
title: "操作描述",
name: "message",
prop: "message",
type: "normal",
width: "20%"
},
{
title: "详情",
name: "opearo",
type: "slot",
prop: "opearo",
width: "50%"
}
]
export default class order extends React.Component {
constructor(props) {
super(props)
@ -75,31 +100,60 @@ export default class order extends React.Component {
return (
<div id="more2" className="maincenter">
<TabPage tabs={this.state.tabList} tabChange={this.tabFn.bind(this)}>
<ul className="main-body">
<li>
<span>结算订单号:</span>
<span>{orderDetail_data.settlement_no}</span>
</li>
<li>
<span>创建时间:</span>
<span>{orderDetail_data.create_time}</span>
</li>
<li>
<span>兑换数量:</span>
<span>{orderDetail_data.order_rows ? orderDetail_data.order_rows.length : "0"}</span>
</li>
{orderDetail_data.order_rows
? orderDetail_data.order_rows.map((item) => {
return (
<li>
<span>关联订单号:</span>
<span>{item.order_number}</span>
<span>{item.create_time}</span>
</li>
)
})
: null}
</ul>
{this.state.tabactive == 0 ? (
<ul className="main-body">
<li>
<span>结算订单号:</span>
<span>{orderDetail_data.settlement_no}</span>
</li>
<li>
<span>创建时间:</span>
<span>{orderDetail_data.create_time}</span>
</li>
<li>
<span>兑换数量:</span>
<span>
{orderDetail_data.order_rows ? orderDetail_data.order_rows.length : "0"}
</span>
</li>
{orderDetail_data.order_rows
? orderDetail_data.order_rows.map((item) => {
return (
<li key={item.order_number}>
<span>关联订单号:</span>
<span>{item.order_number}</span>
<span>{item.create_time}</span>
</li>
)
})
: null}
</ul>
) : (
<div className="main-body">
<Grid
spliteColor={"#fff"}
tableData={this.state.orderDetailLog_data}
Column={Column}
isMultiple={false}
maxheight={this.state.tableHeight}
dataCount={this.state.total}
countChange={(e) => {
this.countChange(e)
}}
countbarVisible={false}
isSwitch={false}
pageChange={(e) => {
this.pageChange(e)
}}
checkChange={this.selection.bind(this)}
ComponentHandler={(com, rowData) => {
if (com == "time") {
return <div>{moment.unix(rowData.time).format("YYYY-MM-DD HH:mm:ss")}</div>
}
}}
/>
</div>
)}
</TabPage>
</div>
)