Commit 52c22aec authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

修改带新增物流单选择对应单据 点击查看单号详情的跳转

parent 2cde7a06
......@@ -606,6 +606,44 @@ const AddLogistics: React.FC<{}> = () => {
})
}
}, [memberInfo])
/**跳转到售后/订单的详情 */
const jumpOrderDetail = (id: any) => {
switch (Number(createType)) {
case 1:
switch (Number(relevanceType)) {
case 1:
window.open(`/memberCenter/tranactionAbility/saleOrder/readyAddLogisticsOrder/preview?id=${id}`)
break;
case 2:
window.open(`/memberCenter/afterService/exchangeApplication/exchangePrAddLogistics/detail?id=${id}`)
break;
case 3:
window.open(`/memberCenter/afterService/exchangeManage/exchangePrAddLogistics/detail?id=${id}`)
break;
case 4:
window.open(`/memberCenter/afterService/returnApplication/returnPrAddLogistics/detail?id=${id}`)
break;
}
break;
case 2:
window.open(`/memberCenter/tranactionAbility/saleOrder/readyAddLogisticsOrder/preview?id=${id}`)
break;
case 3:
window.open(`/memberCenter/handling/confirm/pendingDelivered/detail?id=${id}`)
break;
case 4:
window.open(`/memberCenter/afterService/exchangeApplication/exchangePrAddLogistics/detail?id=${id}`)
break;
case 5:
window.open(`/memberCenter/afterService/exchangeManage/exchangePrAddLogistics/detail?id=${id}`)
break;
case 6:
window.open(`/memberCenter/afterService/returnApplication/returnPrAddLogistics/detail?id=${id}`)
break;
}
}
return (
<PageHeaderWrapper
onBack={() => history.goBack()}
......@@ -636,11 +674,13 @@ const AddLogistics: React.FC<{}> = () => {
<Form.Item label="物流单号" name='receiverName1'><span></span></Form.Item>
<Form.Item label='对应发货单号' name='shipmentOrderCode'>
<Search disabled={!!history.location.query.createType} readOnly value={Object.keys(query).length > 0 ? query.shipmentOrderCode : undefined} enterButton={<><LinkOutlined /> 选择</>} onSearch={() => setshippingvisible(true)} />
{query.shipmentOrderCode && <Button type='link'>查看单号详情</Button>}
{query.shipmentOrderCode && <Button type='link'
onClick={() => window.open(`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${query.shipmentOrderId}&preview=1`)}
>查看单号详情</Button>}
</Form.Item>
<Form.Item label='对应订单号/售后单' name='relevanceOrderCode'>
<Search disabled={!!history.location.query.createType} readOnly value={Object.keys(query).length > 0 ? query.relevanceOrderCode : undefined} enterButton={<><LinkOutlined /> 选择</>} onSearch={() => setinvoicesvisible(true)} />
{query.relevanceOrderCode && <Button type='link'>查看单号详情</Button>}
{query.relevanceOrderCode && <Button type='link' onClick={() => jumpOrderDetail(query.relevanceOrderId)}>查看单号详情</Button>}
</Form.Item>
<Form.Item label="收货方" name='receiverName'><span>{query.receiverName}/{query.receiverPhone}</span></Form.Item>
<Form.Item label="收货地址" name='receiverFullAddress'>
......
/*
* @Author: LeeJiancong
* @Date: 2020-07-30 17:23:48
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-07-30 17:24:49
*/
export default {
default: {
padding: '2px 5px',
background: 'rgba(244,245,247,1)',
borderRadius: '4px'
},
confirm: {
color: '#3F7ED2',
padding: '2px 5px',
background: 'rgba(240, 248, 255, 1)',
borderRadius: '4px'
},
success: {
color: '#00B37A',
padding: '2px 5px',
background: 'rgba(235,247,242,1)',
borderRadius: '4px'
},
warn: {
color: '#E63F3B',
padding: '2px 5px',
background: 'rgba(255,235,230,1)',
borderRadius: '4px'
}
}
\ No newline at end of file
/*
* @Author: LeeJiancong
* @Date: 2020-07-30 17:23:48
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-07-30 17:24:49
*/
export default {
default: {
padding: '2px 5px',
background: 'rgba(244,245,247,1)',
borderRadius: '4px'
},
confirm: {
color: '#3F7ED2',
padding: '2px 5px',
background: 'rgba(240, 248, 255, 1)',
borderRadius: '4px'
},
success: {
color: '#00B37A',
padding: '2px 5px',
background: 'rgba(235,247,242,1)',
borderRadius: '4px'
},
warn: {
color: '#E63F3B',
padding: '2px 5px',
background: 'rgba(255,235,230,1)',
borderRadius: '4px'
},
error: {
color: '#ff0404',
padding: '2px 5px',
background: 'rgba(247,235,235,1)',
borderRadius: '4px'
}
}
......@@ -174,7 +174,8 @@ const OrderList: React.FC<ListProps> = (props) => {
render: (text: any, reconds: any) => {
let component: ReactNode = null
if (text == 3) {
component = <><span style={statuStyle.success}>不接受物流单</span></>
//外部状态1-待提交2-待确认3-不接受物流单4-接受物流单
component = <><span style={statuStyle.error}>不接受物流单</span></>
} else if (text == 4) {
component = <><span style={statuStyle.warn}>接受物流单</span></>
} else if (text == 2) {
......@@ -194,7 +195,7 @@ const OrderList: React.FC<ListProps> = (props) => {
<>
{
(record.status === 1 || record.status === 4) &&
(record.status === 1 || record.status === 3) &&
<Button type="link" onClick={() => toEdit(record.id)}>编辑</Button>
}
......
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