From 2bee24ff7686754c363d5246b63461d85843db8c Mon Sep 17 00:00:00 2001 From: wangsongsole Date: Tue, 28 Mar 2023 15:54:17 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix:=20=E4=BF=AE=E5=A4=8D=20?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E7=8A=B6=E6=80=81=E7=AD=9B=E9=80=89=E8=81=94?= =?UTF-8?q?=E5=8A=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/order/list/list.js | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/src/pages/order/list/list.js b/src/pages/order/list/list.js index 3d80eb97..18218945 100644 --- a/src/pages/order/list/list.js +++ b/src/pages/order/list/list.js @@ -401,17 +401,25 @@ export default class orderList extends React.Component { }, 300); } + /* 提取动态删除核销状态条件 */ + dynamicVoucher() { + if (this.state.menuList.length === 3) { + /*调用组件方法 销毁核销状态选项 */ + this.refs.filterBar.onCloseSelect('', 3, 'voucher_status'); + } + + this.setState({ + menuList: [ + { id: 0, name: '订单状态', check: false }, + { id: 1, name: '支付状态', check: false } + ] + }); + } + onFilterClose(prop) { /* 当支付状态选项关闭时 销毁核销状态选项 */ if (prop === 'status') { - this.setState({ - menuList: [ - { id: 0, name: '订单状态', check: false }, - { id: 1, name: '支付状态', check: false } - ] - }); - /*调用组件方法 销毁核销状态选项 */ - this.refs.filterBar.onCloseSelect('', 3, 'voucher_status'); + this.dynamicVoucher(); } let data = {}; @@ -553,17 +561,7 @@ export default class orderList extends React.Component { ] }); } else { - if (this.state.menuList.length === 3) { - /*调用组件方法 销毁核销状态选项 */ - this.refs.filterBar.onCloseSelect('', 3, 'voucher_status'); - } - - this.setState({ - menuList: [ - { id: 0, name: '订单状态', check: false }, - { id: 1, name: '支付状态', check: false } - ] - }); + this.dynamicVoucher(); } }