From 8670b0b8ca2286bc451cb595c39f5edf2240b269 Mon Sep 17 00:00:00 2001 From: wangsongsole Date: Wed, 28 Sep 2022 17:22:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=88=97=E8=A1=A8=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E4=B8=8B=E6=8B=89=E7=AD=9B=E9=80=89=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/order/list/list.js | 51 ++++++++++++++++++++++++++++++------ 1 file changed, 43 insertions(+), 8 deletions(-) diff --git a/src/pages/order/list/list.js b/src/pages/order/list/list.js index 028d405c..0a2feed4 100644 --- a/src/pages/order/list/list.js +++ b/src/pages/order/list/list.js @@ -203,19 +203,32 @@ export default class orderlist extends React.Component { { id: 4, name: "直充-已取消" }, { id: 111, name: "立减金-待领取" }, { id: 222, name: "立减金-已领取" }, - { id: 5, name: "立减金-已过期" }, - { id: 6, name: "优惠券-待支付" } + { id: 5, name: "立减金-已过期" } + ] + }, + { + id: 1, + label: "支付状态", + prop: "pay_status", + menuList: [ + { id: 1, name: "待支付" }, + { id: 2, name: "已支付" }, + { id: 3, name: "已退款" } ] } ], selectiondata: [], - menuList: [{ id: 0, name: "订单状态", check: false }], + menuList: [ + { id: 0, name: "订单状态", check: false }, + { id: 1, name: "支付状态", check: false } + ], allcheck: false, itemcheck: false, combinedValue: [], tableHeight: 500, status: null, + pay_status: null, page: 1, limit: 10, key_word: "", @@ -286,7 +299,7 @@ export default class orderlist extends React.Component { //导出订单 exportFn() { let _self = this - let { key_word, key, status, option, orderType } = _self.state + let { key_word, status, option, orderType } = _self.state let data = {} if (orderType) { //区分立减金和商品 @@ -522,7 +535,8 @@ export default class orderlist extends React.Component { //获取订单列表 getOrderFn(time = {}) { 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 } if (orderType) { //区分立减金和商品 @@ -532,9 +546,29 @@ export default class orderlist extends React.Component { data.begin_time = this.state.combinedValue[0] data.end_time = this.state.combinedValue[1] } + if (status || status === 0) { 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]) { data.begin_time = time[0] data.end_time = time[1] @@ -568,7 +602,6 @@ export default class orderlist extends React.Component { data.channel_activity_id = key_word } } - getOrderList(data) .then((res) => { handelResponse( @@ -653,6 +686,9 @@ export default class orderlist extends React.Component { if (prevState.status != this.state.status) { this.getOrderFn() } + if (prevState.pay_status != this.state.pay_status) { + this.getOrderFn() + } } //过滤表格枚举状态 render() { @@ -669,7 +705,6 @@ export default class orderlist extends React.Component { /> ) - const { current, pageSize } = this.state return (
@@ -787,7 +822,7 @@ export default class orderlist extends React.Component {

) } - if (com == "pay_status") { + if (com == "pay_status" && rowData.use_coupon === 1) { return (