处理营销系统立减金【订单列表】筛选立减金和商品状态前端数据请求
This commit is contained in:
parent
f53a2482f7
commit
bb3cd38685
|
@ -184,6 +184,7 @@ export default class orderlist extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
this.state = {
|
this.state = {
|
||||||
|
orderType:'',
|
||||||
tabList: [{ title: '订单列表' }],
|
tabList: [{ title: '订单列表' }],
|
||||||
orderList: [],
|
orderList: [],
|
||||||
filterList: [
|
filterList: [
|
||||||
|
@ -193,10 +194,13 @@ export default class orderlist extends React.Component {
|
||||||
prop: 'status',
|
prop: 'status',
|
||||||
menuList: [
|
menuList: [
|
||||||
{ id: 999, name: '全部' },
|
{ id: 999, name: '全部' },
|
||||||
{ id: 1, name: '充值中' },
|
{ id: 1, name: '商品-充值中' },
|
||||||
{ id: 2, name: '已完成' },
|
{ id: 2, name: '商品-已完成' },
|
||||||
{ id: 3, name: '充值失败' },
|
{ id: 3, name: '商品-充值失败' },
|
||||||
{ id: 4, name: '已取消' }
|
{ id: 4, name: '商品-已取消' },
|
||||||
|
{ id: 111, name: '立减金-待领取' },
|
||||||
|
{ id: 222, name: '立减金-已领取' },
|
||||||
|
{ id: 5, name: '立减金-已过期' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -277,8 +281,11 @@ export default class orderlist extends React.Component {
|
||||||
//导出订单
|
//导出订单
|
||||||
exportFn() {
|
exportFn() {
|
||||||
let _self = this
|
let _self = this
|
||||||
let { key_word, key, status, option } = _self.state
|
let { key_word, key, status, option,orderType } = _self.state
|
||||||
let data = {}
|
let data = {}
|
||||||
|
if(orderType){//区分立减金和商品
|
||||||
|
data.order_type=orderType;
|
||||||
|
}
|
||||||
if (this.state.combinedValue && this.state.combinedValue[0]) {
|
if (this.state.combinedValue && this.state.combinedValue[0]) {
|
||||||
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]
|
||||||
|
@ -501,13 +508,17 @@ export default class orderlist extends React.Component {
|
||||||
let data = {}
|
let data = {}
|
||||||
data[prop] = null
|
data[prop] = null
|
||||||
this.setState(data)
|
this.setState(data)
|
||||||
|
this.setState({orderType:null});
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取订单列表
|
//获取订单列表
|
||||||
getOrderFn(time = {}) {
|
getOrderFn(time = {}) {
|
||||||
let _self = this
|
let _self = this
|
||||||
let { page, limit, option, key_word, status } = _self.state
|
let { page, limit, option, key_word, status,orderType} = _self.state
|
||||||
let data = { page, limit }
|
let data = { page, limit }
|
||||||
|
if(orderType){//区分立减金和商品
|
||||||
|
data.order_type=orderType;
|
||||||
|
}
|
||||||
if (this.state.combinedValue && this.state.combinedValue[0]) {
|
if (this.state.combinedValue && this.state.combinedValue[0]) {
|
||||||
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]
|
||||||
|
@ -548,6 +559,7 @@ 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) => {
|
||||||
|
@ -600,13 +612,22 @@ export default class orderlist extends React.Component {
|
||||||
//状态筛选
|
//状态筛选
|
||||||
selectedId(e, prop) {
|
selectedId(e, prop) {
|
||||||
let data = {}
|
let data = {}
|
||||||
|
let orderType=1;
|
||||||
|
data[prop] = e
|
||||||
if (e == 999) {
|
if (e == 999) {
|
||||||
data[prop] = null
|
data[prop] = null
|
||||||
} else {
|
}if (e == 111) {
|
||||||
data[prop] = e
|
data[prop] = 1
|
||||||
|
orderType=2;
|
||||||
|
} if (e == 222) {
|
||||||
|
data[prop] = 2
|
||||||
|
orderType=2;
|
||||||
|
}
|
||||||
|
if(e==5){
|
||||||
|
orderType=2;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setState(data)
|
this.setState(data)
|
||||||
|
this.setState({orderType});
|
||||||
}
|
}
|
||||||
// 监听组件内部状态的变化:
|
// 监听组件内部状态的变化:
|
||||||
componentDidUpdate(prevProps, prevState) {
|
componentDidUpdate(prevProps, prevState) {
|
||||||
|
|
Loading…
Reference in New Issue