订单列表新增下拉筛选状态

This commit is contained in:
wangsongsole 2022-09-28 17:22:17 +08:00
parent 4c347bf71e
commit 8670b0b8ca
1 changed files with 43 additions and 8 deletions

View File

@ -203,19 +203,32 @@ export default class orderlist extends React.Component {
{ id: 4, name: "直充-已取消" }, { id: 4, name: "直充-已取消" },
{ id: 111, name: "立减金-待领取" }, { id: 111, name: "立减金-待领取" },
{ id: 222, name: "立减金-已领取" }, { id: 222, name: "立减金-已领取" },
{ id: 5, name: "立减金-已过期" }, { id: 5, name: "立减金-已过期" }
{ id: 6, name: "优惠券-待支付" } ]
},
{
id: 1,
label: "支付状态",
prop: "pay_status",
menuList: [
{ id: 1, name: "待支付" },
{ id: 2, name: "已支付" },
{ id: 3, name: "已退款" }
] ]
} }
], ],
selectiondata: [], selectiondata: [],
menuList: [{ id: 0, name: "订单状态", check: false }], menuList: [
{ id: 0, name: "订单状态", check: false },
{ id: 1, name: "支付状态", check: false }
],
allcheck: false, allcheck: false,
itemcheck: false, itemcheck: false,
combinedValue: [], combinedValue: [],
tableHeight: 500, tableHeight: 500,
status: null, status: null,
pay_status: null,
page: 1, page: 1,
limit: 10, limit: 10,
key_word: "", key_word: "",
@ -286,7 +299,7 @@ export default class orderlist extends React.Component {
//导出订单 //导出订单
exportFn() { exportFn() {
let _self = this let _self = this
let { key_word, key, status, option, orderType } = _self.state let { key_word, status, option, orderType } = _self.state
let data = {} let data = {}
if (orderType) { if (orderType) {
//区分立减金和商品 //区分立减金和商品
@ -522,7 +535,8 @@ export default class orderlist extends React.Component {
//获取订单列表 //获取订单列表
getOrderFn(time = {}) { getOrderFn(time = {}) {
let _self = this let _self = this
let { page, limit, option, key_word, status, orderType } = _self.state let { page, limit, option, key_word, status, orderType, pay_status } =
_self.state
let data = { page, limit } let data = { page, limit }
if (orderType) { if (orderType) {
//区分立减金和商品 //区分立减金和商品
@ -532,9 +546,29 @@ export default class orderlist extends React.Component {
data.begin_time = this.state.combinedValue[0] data.begin_time = this.state.combinedValue[0]
data.end_time = this.state.combinedValue[1] data.end_time = this.state.combinedValue[1]
} }
if (status || status === 0) { if (status || status === 0) {
data.status = status data.status = status
} }
if (pay_status) {
data.pay_status = pay_status
}
if (status === 6) {
data.pay_status = 1
data.use_coupon = 1
}
if (status === 7) {
data.pay_status = 2
data.use_coupon = 1
}
if (status === 8) {
data.pay_status = 3
data.use_coupon = 1
}
if (time && time[0]) { if (time && time[0]) {
data.begin_time = time[0] data.begin_time = time[0]
data.end_time = time[1] data.end_time = time[1]
@ -568,7 +602,6 @@ export default class orderlist extends React.Component {
data.channel_activity_id = key_word data.channel_activity_id = key_word
} }
} }
getOrderList(data) getOrderList(data)
.then((res) => { .then((res) => {
handelResponse( handelResponse(
@ -653,6 +686,9 @@ export default class orderlist extends React.Component {
if (prevState.status != this.state.status) { if (prevState.status != this.state.status) {
this.getOrderFn() this.getOrderFn()
} }
if (prevState.pay_status != this.state.pay_status) {
this.getOrderFn()
}
} }
//过滤表格枚举状态 //过滤表格枚举状态
render() { render() {
@ -669,7 +705,6 @@ export default class orderlist extends React.Component {
/> />
) )
const { current, pageSize } = this.state
return ( return (
<div id='dislist' className='orderList'> <div id='dislist' className='orderList'>
<TabPage tabs={this.state.tabList} slot={date}> <TabPage tabs={this.state.tabList} slot={date}>
@ -787,7 +822,7 @@ export default class orderlist extends React.Component {
</p> </p>
) )
} }
if (com == "pay_status") { if (com == "pay_status" && rowData.use_coupon === 1) {
return ( return (
<p className='dflexa'> <p className='dflexa'>
<span> <span>