Commit 1a04ac87 authored by 李腾's avatar 李腾

feat: 售后订单管理-服务订单隐藏物流相关按钮

parent 6e2fbf1b
...@@ -125,44 +125,52 @@ export default () => { ...@@ -125,44 +125,52 @@ export default () => {
width: 300, width: 300,
dataIndex: 'action', dataIndex: 'action',
fixed: 'right', fixed: 'right',
render: (_, r) => [ render: (_, r) => {
<Popconfirm const operations = [
title="确定允许退款?" <Popconfirm
onConfirm={() => refund(r)} title="确定允许退款?"
okText="确认" onConfirm={() => refund(r)}
cancelText="取消" okText="确认"
key="pop" cancelText="取消"
disabled={!r.showRefund} key="pop"
> disabled={!r.showRefund}
<Button key="link1" className="mr10 mt10" type="primary" disabled={!r.showRefund}> >
{r.showRefunded ? '已退款' : '允许退款'} <Button key="link1" className="mr10 mt10" type="primary" disabled={!r.showRefund}>
</Button> {r.showRefunded ? '已退款' : '允许退款'}
</Popconfirm>, </Button>
<Button </Popconfirm>,
key="link2" <Button
onClick={() => reject(r)} key="link2"
type="primary" onClick={() => reject(r)}
className="mr10 mt10" type="primary"
disabled={!r.showRefuse} className="mr10 mt10"
> disabled={!r.showRefuse}
驳回 >
</Button>, 驳回
<Button key="link3" onClick={() => viewDetail(r)} type="primary" className="mr10 mt10"> </Button>,
订单详情 <Button key="link3" onClick={() => viewDetail(r)} type="primary" className="mr10 mt10">
</Button>, 订单详情
<Button </Button>,
key="link4" <Button
onClick={() => handleCom(r)} key="link4"
type="primary" onClick={() => handleCom(r)}
className="mr10 mt10" type="primary"
disabled={!r.showLogistics} className="mr10 mt10"
> disabled={!r.showLogistics}
查看物流 >
</Button>, 查看物流
<Button className="mr10 mt10" type="primary" onClick={() => viewLog(r)}> </Button>,
查看记录 <Button className="mr10 mt10" type="primary" onClick={() => viewLog(r)}>
</Button>, 查看记录
], </Button>,
];
// 服务订单删除物流拦截
if (!['vip', 'self'].includes(r.supplierType)) {
operations.splice(3, 1);
}
return operations;
},
}, },
]; ];
return ( return (
......
...@@ -178,25 +178,33 @@ export default () => { ...@@ -178,25 +178,33 @@ export default () => {
dataIndex: 'action', dataIndex: 'action',
width: 250, width: 250,
fixed: 'right', fixed: 'right',
render: (val, r) => [ render: (val, r) => {
<Button key="link1" onClick={() => openAudit(r)} className="mr10" type="primary"> const operations = [
审核 <Button key="link1" onClick={() => openAudit(r)} className="mr10 mt10" type="primary">
</Button>, 审核
<Button </Button>,
disabled={r.serviceType !== 1 || (r.serviceType === 1 && r.intercept)} <Button
onClick={() => openLogistics(r)} disabled={r.serviceType !== 1 || (r.serviceType === 1 && r.intercept)}
className="mr10" onClick={() => openLogistics(r)}
type="primary" className="mr10 mt10"
> type="primary"
物流拦截 >
</Button>, 物流拦截
<Button className="mr10 mt10" key="link" onClick={() => viewDetail(r)} type="primary"> </Button>,
订单详情 <Button className="mr10 mt10" key="link" onClick={() => viewDetail(r)} type="primary">
</Button>, 订单详情
<Button type="primary" onClick={() => viewLog(r)}> </Button>,
查看记录 <Button className="mr10 mt10" type="primary" onClick={() => viewLog(r)}>
</Button>, 查看记录
], </Button>,
];
// 服务订单删除物流拦截
if (!['vip', 'self'].includes(r.supplierType)) {
operations.splice(1, 1);
}
return operations;
},
}, },
]; ];
return ( return (
......
...@@ -281,7 +281,7 @@ const OrderList = ref => { ...@@ -281,7 +281,7 @@ const OrderList = ref => {
</div> </div>
)); ));
} }
return '-'; return <div align="center">-</div>;
}, },
}, },
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment