♻️ 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) { orderStatusBg(params) {
switch (params) { /* 立减金 */
if (params.status === 1 && params.type === 2) {
return "#43A65D"
}
switch (params.status) {
case 0: case 0:
return "#3575C7" return "#3575C7"
case 1: case 1:

View File

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