fix: 1).修复优惠券列表启用停用展示 2). 修复审核中状态作废至灰

This commit is contained in:
zhangds 2022-11-22 14:34:56 +08:00
parent eb26eecfeb
commit 2a45863a06
1 changed files with 26 additions and 8 deletions

View File

@ -491,6 +491,18 @@ const UseCouponList = () => {
);
}
if ([1, 2, 3].includes(rowData.old_status)) {
if (rowData.approval_status === 1) {
return (
<span
style={{
paddingRight: "10px",
color: "#d8dbdd",
}}
>
作废
</span>
);
}
return (
<span className="grid-link" onClick={(e) => delFn(e, rowData)}>
作废
@ -635,14 +647,20 @@ const UseCouponList = () => {
}
if (com == "switch") {
return (
<Switch
size="small"
checked={rowData.status == 2 ? false : true}
onChange={(e) => changeStatus(e, rowData)}
disabled={rowData.status == 4 || rowData.status == 5}
></Switch>
);
// 1 2
if (rowData.status === 2 || rowData.status === 1) {
return (
<Switch
size="small"
checked={rowData.status == 2 ? false : true}
onChange={(e) => changeStatus(e, rowData)}
></Switch>
);
} else {
return (
<Switch size="small" checked={false} disabled={true}></Switch>
);
}
}
if (com == "status") {