修正 【订单列表】选择查询日期后,前端的page应该传1
This commit is contained in:
parent
a25166197f
commit
1ade133568
|
@ -1,14 +1,11 @@
|
|||
import ReactDOM from 'react-dom'
|
||||
import React, { Component } from 'react'
|
||||
import { Link } from 'react-router-dom'
|
||||
import React from 'react'
|
||||
import {
|
||||
Button,
|
||||
Notify,
|
||||
Select,
|
||||
Alert,
|
||||
CombinedDateRangePicker,
|
||||
Sweetalert,
|
||||
Icon
|
||||
Sweetalert
|
||||
} from 'zent'
|
||||
import './list.less'
|
||||
import '../../../assets/comm.css'
|
||||
|
@ -49,7 +46,6 @@ const options = [
|
|||
key: '5',
|
||||
text: '平台批次号'
|
||||
}
|
||||
|
||||
]
|
||||
const Column = [
|
||||
{
|
||||
|
@ -184,7 +180,7 @@ export default class orderlist extends React.Component {
|
|||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
orderType:'',
|
||||
orderType: '',
|
||||
tabList: [{ title: '订单列表' }],
|
||||
orderList: [],
|
||||
filterList: [
|
||||
|
@ -281,10 +277,11 @@ export default class orderlist extends React.Component {
|
|||
//导出订单
|
||||
exportFn() {
|
||||
let _self = this
|
||||
let { key_word, key, status, option,orderType } = _self.state
|
||||
let { key_word, key, status, option, orderType } = _self.state
|
||||
let data = {}
|
||||
if(orderType){//区分立减金和商品
|
||||
data.type=orderType;
|
||||
if (orderType) {
|
||||
//区分立减金和商品
|
||||
data.type = orderType
|
||||
}
|
||||
if (this.state.combinedValue && this.state.combinedValue[0]) {
|
||||
data.begin_time = this.state.combinedValue[0]
|
||||
|
@ -477,8 +474,10 @@ export default class orderlist extends React.Component {
|
|||
|
||||
//选择时间
|
||||
onChangeCombinedDate(e) {
|
||||
this.setState({ combinedValue: e })
|
||||
this.getOrderFn(e)
|
||||
this.setState({ combinedValue: e, page: 1, limit: 10, selectiondata: [] })
|
||||
setTimeout(() => {
|
||||
this.getOrderFn()
|
||||
}, 0)
|
||||
}
|
||||
//page
|
||||
pageChange(e) {
|
||||
|
@ -508,16 +507,17 @@ export default class orderlist extends React.Component {
|
|||
let data = {}
|
||||
data[prop] = null
|
||||
this.setState(data)
|
||||
this.setState({orderType:null});
|
||||
this.setState({ orderType: null })
|
||||
}
|
||||
|
||||
//获取订单列表
|
||||
getOrderFn(time = {}) {
|
||||
let _self = this
|
||||
let { page, limit, option, key_word, status,orderType} = _self.state
|
||||
let { page, limit, option, key_word, status, orderType } = _self.state
|
||||
let data = { page, limit }
|
||||
if(orderType){//区分立减金和商品
|
||||
data.type=orderType;
|
||||
if (orderType) {
|
||||
//区分立减金和商品
|
||||
data.type = orderType
|
||||
}
|
||||
if (this.state.combinedValue && this.state.combinedValue[0]) {
|
||||
data.begin_time = this.state.combinedValue[0]
|
||||
|
@ -559,7 +559,6 @@ export default class orderlist extends React.Component {
|
|||
data.channel_activity_id = key_word
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
getOrderList(data)
|
||||
.then((res) => {
|
||||
|
@ -594,8 +593,8 @@ export default class orderlist extends React.Component {
|
|||
placeholder = '请输入兑换码批次ID搜索'
|
||||
break
|
||||
case 5:
|
||||
placeholder = '请输入平台批次号'
|
||||
break
|
||||
placeholder = '请输入平台批次号'
|
||||
break
|
||||
default:
|
||||
placeholder = '请输入key搜索'
|
||||
break
|
||||
|
@ -612,22 +611,24 @@ export default class orderlist extends React.Component {
|
|||
//状态筛选
|
||||
selectedId(e, prop) {
|
||||
let data = {}
|
||||
let orderType=1;
|
||||
let orderType = 1
|
||||
data[prop] = e
|
||||
if (e == 999) {
|
||||
data[prop] = null
|
||||
}if (e == 111) {
|
||||
data[prop] = 1
|
||||
orderType=2;
|
||||
} if (e == 222) {
|
||||
data[prop] = 2
|
||||
orderType=2;
|
||||
}
|
||||
if(e==5){
|
||||
orderType=2;
|
||||
if (e == 111) {
|
||||
data[prop] = 1
|
||||
orderType = 2
|
||||
}
|
||||
if (e == 222) {
|
||||
data[prop] = 2
|
||||
orderType = 2
|
||||
}
|
||||
if (e == 5) {
|
||||
orderType = 2
|
||||
}
|
||||
this.setState(data)
|
||||
this.setState({orderType});
|
||||
this.setState({ orderType })
|
||||
}
|
||||
// 监听组件内部状态的变化:
|
||||
componentDidUpdate(prevProps, prevState) {
|
||||
|
@ -779,17 +780,23 @@ export default class orderlist extends React.Component {
|
|||
if (com === 'type_text') {
|
||||
return <span>{rowData.type === 1 ? '商品' : '立减金'}</span>
|
||||
}
|
||||
if(com=='channel_activity_id'){
|
||||
return <span>{rowData.channel_activity_id?rowData.channel_activity_id : '-'}</span>
|
||||
if (com == 'channel_activity_id') {
|
||||
return (
|
||||
<span>
|
||||
{rowData.channel_activity_id
|
||||
? rowData.channel_activity_id
|
||||
: '-'}
|
||||
</span>
|
||||
)
|
||||
}
|
||||
if (com == 'opearo') {
|
||||
return (
|
||||
<div>
|
||||
<span
|
||||
className='grid-link'
|
||||
onClick={(e) => this.moreFn(e, rowData)}>
|
||||
详情
|
||||
</span>
|
||||
<span
|
||||
className='grid-link'
|
||||
onClick={(e) => this.moreFn(e, rowData)}>
|
||||
详情
|
||||
</span>
|
||||
{rowData.status == 1 ? (
|
||||
<span
|
||||
className='grid-link'
|
||||
|
|
Loading…
Reference in New Issue