fix: 增加包码结算详情
This commit is contained in:
parent
ed25376de9
commit
c478568594
|
@ -100,7 +100,8 @@ export default class topNav extends React.Component {
|
|||
"product-edit",
|
||||
"distributor-merchant",
|
||||
"callback-message",
|
||||
"coupon-commodity"
|
||||
"coupon-commodity",
|
||||
"packageDetail"
|
||||
]
|
||||
const backShowRoutes = [
|
||||
"account-add",
|
||||
|
|
|
@ -0,0 +1,155 @@
|
|||
import { getOrderDetails, getOrderLog, handelResponse } from "@/assets/api.js"
|
||||
import "@/assets/comm.css"
|
||||
import Grid from "@/components/gird/main.js"
|
||||
import TabPage from "@/components/tabPage/main.js"
|
||||
import moment from "moment"
|
||||
import React from "react"
|
||||
import ReactJson from "react-json-view"
|
||||
import { Notify } from "zent"
|
||||
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)
|
||||
this.state = {
|
||||
tabList: [{ title: "详情" }],
|
||||
tabactive: 0,
|
||||
orderDetailLog_data: [],
|
||||
orderDetail_data: {},
|
||||
tableHeight: 500,
|
||||
page: 1,
|
||||
orderNo: "",
|
||||
limit: 10,
|
||||
total: 0
|
||||
}
|
||||
}
|
||||
tabFn(index) {
|
||||
this.setState({ tabactive: index })
|
||||
let activerou = []
|
||||
if (index == 0) {
|
||||
activerou = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
path: "/settlementList",
|
||||
name: "包码结算列表"
|
||||
},
|
||||
{
|
||||
path: "/packageDetail",
|
||||
name: "包码详情"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
sessionStorage.setItem("breaknav", JSON.stringify(activerou))
|
||||
this.getOrderLogFn()
|
||||
}
|
||||
selection() {}
|
||||
//获取订单日志
|
||||
getOrderLogFn() {
|
||||
let _self = this
|
||||
let { page, limit, orderNo } = this.state
|
||||
let data = {
|
||||
page,
|
||||
limit
|
||||
}
|
||||
getOrderLog(orderNo, data)
|
||||
.then((res) => {
|
||||
handelResponse(
|
||||
res,
|
||||
(response, msg) => {
|
||||
const orderDetailLog_data = response.data
|
||||
_self.setState({ orderDetailLog_data, total: response.total })
|
||||
},
|
||||
(err) => {
|
||||
Notify.error(err)
|
||||
}
|
||||
)
|
||||
})
|
||||
.catch((err) => {})
|
||||
}
|
||||
//获取详情信息
|
||||
getDetails(data) {
|
||||
let _self = this
|
||||
getOrderDetails(data)
|
||||
.then((res) => {
|
||||
handelResponse(
|
||||
res,
|
||||
(response, msg) => {
|
||||
console.log(response)
|
||||
_self.setState({ orderDetail_data: response })
|
||||
},
|
||||
(err) => {
|
||||
Notify.error(err)
|
||||
}
|
||||
)
|
||||
})
|
||||
.catch((err) => {})
|
||||
}
|
||||
//page
|
||||
pageChange(e) {
|
||||
this.setState({ page: e })
|
||||
setTimeout(() => {
|
||||
this.getOrderLogFn()
|
||||
}, 0)
|
||||
}
|
||||
//limit
|
||||
countChange(e) {
|
||||
this.setState({ page: 1, limit: e })
|
||||
setTimeout(() => {
|
||||
this.getOrderLogFn()
|
||||
}, 0)
|
||||
}
|
||||
componentWillMount() {
|
||||
let href = window.location.href
|
||||
let strindex = href.lastIndexOf("=")
|
||||
let orderNo = href.substr(strindex + 1, href.length)
|
||||
this.setState({ orderNo })
|
||||
this.getDetails(orderNo)
|
||||
this.setState({ tableHeight: window.innerHeight - 430 })
|
||||
}
|
||||
|
||||
render() {
|
||||
let orderDetail_data = this.state.orderDetail_data
|
||||
return (
|
||||
<div id="more" className="maincenter">
|
||||
<TabPage tabs={this.state.tabList} tabChange={this.tabFn.bind(this)}>
|
||||
<ul className="main-body">
|
||||
<li>
|
||||
<span>订单号</span>
|
||||
<font>{orderDetail_data.order_number}</font>
|
||||
</li>
|
||||
<li>
|
||||
<span>创建时间</span>
|
||||
<font>{orderDetail_data.create_time}</font>
|
||||
</li>
|
||||
</ul>
|
||||
</TabPage>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
#more{
|
||||
|
||||
.main-body{
|
||||
padding: 24px;
|
||||
box-sizing: border-box;
|
||||
|
||||
li{
|
||||
width: 40%;
|
||||
list-style-type: none;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
line-height: 42px;
|
||||
font-size: 14px;
|
||||
span{
|
||||
color:#626366;
|
||||
// font-size: 14px;
|
||||
}
|
||||
font{
|
||||
color:#313233;
|
||||
}
|
||||
|
||||
}
|
||||
.num{
|
||||
span,font{
|
||||
color:#ccc!important;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
.logOrder{
|
||||
ul{
|
||||
li{
|
||||
padding: 8px 0;
|
||||
font{
|
||||
color: #313233;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -136,18 +136,18 @@ export default class settlementList extends React.Component {
|
|||
|
||||
//详情
|
||||
moreFn(e, row) {
|
||||
this.props.history.push("/home/order-addetails?oid=" + row.order_number)
|
||||
sessionStorage.setItem("pathname2", "/home/order-addetails")
|
||||
this.props.history.push("/home/packageDetail?id=" + row.id)
|
||||
sessionStorage.setItem("pathname2", "/home/packageDetail")
|
||||
let activerou = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
path: "/home/order-list",
|
||||
name: "订单管理"
|
||||
path: "/home/settlementList",
|
||||
name: "包码列表"
|
||||
},
|
||||
{
|
||||
path: "/home/order-addetails",
|
||||
name: "订单详情"
|
||||
path: "/home/packageDetail",
|
||||
name: "包码详情"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@ import downloadList from "@/pages/order/downloadList/list"
|
|||
import OrderList from "@/pages/order/list/list"
|
||||
import OrderDetails from "@/pages/order/more/more"
|
||||
import SettlementList from "@/pages/order/settlementList/list"
|
||||
import PackageDetail from "@/pages/order/packageDetail"
|
||||
import PlanAdd from "@/pages/plan/add/add"
|
||||
import PlanEdit from "@/pages/plan/add/edit"
|
||||
import PlanEditCopy from "@/pages/plan/add/plan-copy"
|
||||
|
@ -91,6 +92,10 @@ const router = [
|
|||
path: "/home/settlementList",
|
||||
component: SettlementList
|
||||
},
|
||||
{
|
||||
path: "/home/packageDetail",
|
||||
component: PackageDetail
|
||||
},
|
||||
{
|
||||
path: "/home/mytempMould",
|
||||
component: MyTempMouldAdd
|
||||
|
|
Loading…
Reference in New Issue