From a92f04540867f0964129e601df0485d3f17b4bc7 Mon Sep 17 00:00:00 2001 From: wangsongsole Date: Fri, 26 Jan 2024 16:55:16 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=AA=20optimize:=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=88=97=E8=A1=A8=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/order/list/list.js | 37 +++++++++++++----------------------- 1 file changed, 13 insertions(+), 24 deletions(-) diff --git a/src/pages/order/list/list.js b/src/pages/order/list/list.js index dcc61401..5a58f4fc 100644 --- a/src/pages/order/list/list.js +++ b/src/pages/order/list/list.js @@ -5,9 +5,9 @@ import { handlerRefund, putOrderCancel, putOrderSuccess, + receiveRetry, refund, - resendCardCode, - receiveRetry + resendCardCode } from "@/assets/api.js" import "@/assets/comm.css" import { nowDay, nowMonth } from "@/assets/comm.js" @@ -35,7 +35,6 @@ export default class orderList extends React.Component { tabList: [{ title: "订单列表" }], orderList: [], filterList: filterList, - selectiondata: [], menuList: [ { id: 0, name: "订单状态", check: false }, @@ -110,7 +109,6 @@ export default class orderList extends React.Component { handelResponse( res, (response, msg) => { - console.log(msg) Notify.clear() Notify.success(msg) }, @@ -277,43 +275,36 @@ export default class orderList extends React.Component { //清空 clearFn() { - this.setState({ selectiondata: [] }) - this.setState({ allcheck: false }) - this.setState({ itemcheck: false }) + this.setState({ allcheck: false, selectiondata: [], itemcheck: false }) } //选择时间 onChangeCombinedDate(e) { - this.setState({ combinedValue: e, page: 1, limit: 10, selectiondata: [] }) - setTimeout(() => { + this.setState({ combinedValue: e, page: 1, limit: 10, selectiondata: [] }, () => { this.getOrderFn() - }, 0) + }) } //page pageChange(e) { - this.setState({ page: e }) - this.setState({ selectiondata: [] }) - setTimeout(() => { + this.setState({ selectiondata: [], page: e }, () => { this.getOrderFn() - }, 0) + }) } //limit countChange(e) { - this.setState({ page: 1, limit: e }) - this.setState({ selectiondata: [] }) - setTimeout(() => { + this.setState({}) + this.setState({ selectiondata: [], page: 1, limit: e }, () => { this.getOrderFn() - }, 0) + }) } //敲回车查询 sureFn() { - this.setState({ page: 1 }) - setTimeout(() => { + this.setState({ page: 1 }, () => { this.getOrderFn() - }, 300) + }) } //!提取动态删除核销状态条件 @@ -396,9 +387,8 @@ export default class orderList extends React.Component { componentWillMount() { let datetime = [tomonth + " " + "00:00:00", day + " " + "23:59:59"] - this.setState({ combinedValue: datetime }) this.getOrderFn(datetime) - this.setState({ tableHeight: window.innerHeight - 430 }) + this.setState({ tableHeight: window.innerHeight - 430, combinedValue: datetime }) } //!状态筛选 @@ -427,7 +417,6 @@ export default class orderList extends React.Component { //! 1:直冲 2:立减金 3:红包 if (e.length && prop === "status") { - console.log(e) e.map((item, index) => { if ([6, 7, 8, 9].includes(item)) { orderType.push(3)