feat:订单列表增加立减金核销状态voucher_status
This commit is contained in:
parent
8f921eaed9
commit
c69a2a5b7f
|
@ -51,6 +51,8 @@ const menu = {
|
|||
return "#43A65D"
|
||||
case 3:
|
||||
return "#DC4F40"
|
||||
case 333:
|
||||
return "transparent"
|
||||
}
|
||||
},
|
||||
//计划任务状态
|
||||
|
|
|
@ -44,7 +44,8 @@ export default class orderlist extends React.Component {
|
|||
selectiondata: [],
|
||||
menuList: [
|
||||
{ id: 0, name: "订单状态", check: false },
|
||||
{ id: 1, name: "支付状态", check: false }
|
||||
{ id: 1, name: "支付状态", check: false },
|
||||
{ id: 3, name: "核销状态", check: false }
|
||||
],
|
||||
allcheck: false,
|
||||
itemcheck: false,
|
||||
|
@ -52,6 +53,7 @@ export default class orderlist extends React.Component {
|
|||
tableHeight: 500,
|
||||
status: null,
|
||||
pay_status: null,
|
||||
voucher_status:null,
|
||||
page: 1,
|
||||
limit: 10,
|
||||
key_word: "",
|
||||
|
@ -168,7 +170,7 @@ export default class orderlist extends React.Component {
|
|||
//导出订单
|
||||
exportFn() {
|
||||
let _self = this;
|
||||
let { key_word, status, option, orderType, pay_status } = _self.state;
|
||||
let { key_word, status, option, orderType, pay_status,voucher_status } = _self.state;
|
||||
let data = {};
|
||||
if (orderType && status) {
|
||||
//区分立减金和商品
|
||||
|
@ -186,6 +188,9 @@ export default class orderlist extends React.Component {
|
|||
if (pay_status?.length) {
|
||||
data.pay_status = pay_status?.join(",");
|
||||
}
|
||||
if (voucher_status?.length) {
|
||||
data.voucher_status = voucher_status?.join(",");
|
||||
}
|
||||
|
||||
if (option && option.key == 1) {
|
||||
if (key_word) {
|
||||
|
@ -259,11 +264,11 @@ export default class orderlist extends React.Component {
|
|||
var year = now.getFullYear();
|
||||
var month =
|
||||
now.getMonth() + 1 <= 9 ? "0" + (now.getMonth() + 1) : now.getMonth() + 1;
|
||||
var day = now.getDate() <= 9 ? "0" + now.getDate() : now.getDate();
|
||||
var tt = now.getHours() <= 9 ? "0" + now.getHours() : now.getHours();
|
||||
var mm = now.getMinutes() <= 9 ? "0" + now.getMinutes() : now.getMinutes();
|
||||
var ss = now.getSeconds() <= 9 ? "0" + now.getSeconds() : now.getSeconds();
|
||||
let datelist = [year, month, day, tt, mm, ss];
|
||||
var day = now.getDate() <= 9 ? "0" + now.getDate() : now.getDate();
|
||||
var tt = now.getHours() <= 9 ? "0" + now.getHours() : now.getHours();
|
||||
var mm = now.getMinutes() <= 9 ? "0" + now.getMinutes() : now.getMinutes();
|
||||
var ss = now.getSeconds() <= 9 ? "0" + now.getSeconds() : now.getSeconds();
|
||||
let datelist = [year, month, day, tt, mm, ss];
|
||||
return datelist.join("");
|
||||
}
|
||||
componentWillMount() {
|
||||
|
@ -409,7 +414,7 @@ export default class orderlist extends React.Component {
|
|||
//获取订单列表
|
||||
getOrderFn(time = {}) {
|
||||
let _self = this;
|
||||
let { page, limit, option, key_word, status, orderType, pay_status } =
|
||||
let { page, limit, option, key_word, status, orderType, pay_status,voucher_status } =
|
||||
_self.state;
|
||||
let data = { page, limit };
|
||||
if (orderType) {
|
||||
|
@ -462,7 +467,9 @@ export default class orderlist extends React.Component {
|
|||
if (pay_status?.length) {
|
||||
data.pay_status = pay_status?.join(",");
|
||||
}
|
||||
|
||||
if (voucher_status?.length) {
|
||||
data.voucher_status = voucher_status?.join(",");
|
||||
}
|
||||
getOrderList(data)
|
||||
.then((res) => {
|
||||
handelResponse(
|
||||
|
@ -579,7 +586,11 @@ export default class orderlist extends React.Component {
|
|||
if (prevState.pay_status != this.state.pay_status) {
|
||||
this.getOrderFn();
|
||||
}
|
||||
if (prevState.voucher_status != this.state.voucher_status) {
|
||||
this.getOrderFn();
|
||||
}
|
||||
}
|
||||
|
||||
//过滤表格枚举状态
|
||||
render() {
|
||||
const date = (
|
||||
|
@ -753,9 +764,19 @@ export default class orderlist extends React.Component {
|
|||
|
||||
if (com == "usage_status") {
|
||||
return (
|
||||
<span>
|
||||
|
||||
<p className='dflexa'>
|
||||
<span>
|
||||
<font
|
||||
className='icon'
|
||||
style={{
|
||||
background: menu.orderStatusBg(
|
||||
parseInt(rowData.orderVoucher?rowData.orderVoucher.status:333)
|
||||
)
|
||||
}}></font>
|
||||
{this.usageFunction(rowData.orderVoucher?.status)}
|
||||
</span>
|
||||
</span>
|
||||
</p>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -203,6 +203,17 @@ export const filterList = [
|
|||
{ id: 2, name: "已支付" },
|
||||
{ id: 3, name: "已退款" }
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
label: "核销状态",
|
||||
prop: "voucher_status",
|
||||
menuList: [
|
||||
{ id: 1, name: "未核销" },
|
||||
{ id: 2, name: "已核销" },
|
||||
{ id: 3, name: "已过期" },
|
||||
{ id: 4, name: "已退款" }
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
|
|
Loading…
Reference in New Issue