♻️ refactor: 更改订单状态

This commit is contained in:
wangsongsole 2023-12-20 20:51:19 +08:00
parent e3105bd922
commit 5a3d09c58f
2 changed files with 8 additions and 4 deletions

View File

@ -43,7 +43,11 @@ const menu = {
},
orderStatusBg(params) {
switch (params) {
/* 立减金 */
if (params.status === 1 && params.type === 2) {
return "#43A65D"
}
switch (params.status) {
case 0:
return "#3575C7"
case 1:

View File

@ -667,11 +667,11 @@ export default class orderList extends React.Component {
<font
className="icon"
style={{
background: menu.orderStatusBg(parseInt(rowData.status))
background: menu.orderStatusBg(rowData)
}}
></font>
{rowData.status_text}
{rowData.type === 2 && rowData.status === 2
{rowData.type === 2 && [1, 2].includes(rowData.status)
? `${rowData.received_num}/${rowData.num}`
: ""}
</span>
@ -798,7 +798,7 @@ export default class orderList extends React.Component {
</>
) : null}
{rowData.type === 2 &&
rowData.status === 2 &&
[1, 2].includes(rowData.status) &&
rowData.received_num !== rowData.num ? (
<span
className="grid-link"