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

🐞 fix(物流能力|二次询价): 新建物流对应发货单跳转二次询价禁止删除商品

parent d56f35f3
......@@ -312,7 +312,7 @@ const AddedFormLayout: React.FC<AddedFormLayoutProps> = (props: any) => {
}}
>
<BasicInfoLatyout getMemberInfo={getMemberInfo} memb={memberInfo} isEdit={spam || two} />
<InquiryProductLayout form={form} getInquiryProduct={getInquiryProduct} member={memberInfo} setInquiryProduct={inquiryProduct} />
<InquiryProductLayout isEdit={two} form={form} getInquiryProduct={getInquiryProduct} member={memberInfo} setInquiryProduct={inquiryProduct} />
<TradeTermsLayout isEdit={two} getFullAddress={getFullAddress} getContacts={getContacts} fullAddress={fullAddress} />
<AttachLayout enclosureUrls={enclosureUrls} getEnclosureUrls={getEnclosureUrls} removeEnclosureUrls={removeEnclosureUrls} />
</Form>
......
......@@ -22,10 +22,12 @@ interface InquiryProductLayoutProps {
member?: number,
/** form */
form?: any,
/** 二次询价 */
isEdit?: boolean,
}
const InquiryProductLayout: React.FC<InquiryProductLayoutProps> = (props: any) => {
const { getInquiryProduct, setInquiryProduct, member, form } = props;
const { getInquiryProduct, setInquiryProduct, member, form, isEdit } = props;
const [visible, setVisible] = useState<boolean>(false);
const [dataSource, setDataSource] = useState<any[]>([]);
const [memberId, setMemberId] = useState<number>();
......@@ -95,7 +97,7 @@ const InquiryProductLayout: React.FC<InquiryProductLayoutProps> = (props: any) =
key: "operate",
dataIndex: "operate",
render: (_text, _data, index) => (
<Button type="link" onClick={() => handleDeleted(index)}>删除</Button>
<Button disabled={isEdit} type="link" onClick={() => handleDeleted(index)}>删除</Button>
)
},
]
......
......@@ -191,7 +191,7 @@ const ModalTableOrder: React.FC<ModalTableProps> = (props) => {
return new Promise(resolve => {
switch (type) {
case 1:
PublicApi.getOrderLogisticsOrderList({ ...parmas }).then(res => {
PublicApi.getOrderCommonLogisticsPage({ ...parmas }).then(res => {
if (res.code === 1000) {
res.data.data.forEach((item: any) => {
item.applyNo = item.orderNo
......
......@@ -406,7 +406,7 @@ const AddLogistics: React.FC<{}> = () => {
console.warn(error)
})
} else {
PublicApi.getOrderProcurementOrderProductList({ ...params, id: query.relevanceOrderId, orderNo: query.relevanceOrderCode }).then((res: any) => {
PublicApi.getOrderCommonProductLogisticsPage({ ...params, id: query.relevanceOrderId, orderNo: query.relevanceOrderCode }).then((res: any) => {
if (res.code === 1000) {
resolve(res)
}
......@@ -782,6 +782,22 @@ const AddLogistics: React.FC<{}> = () => {
}
}
/** 查看对应发货单详情 */
const handleOrderDetail = (id: number) => {
if (id) {
switch (Number(createType)) {
case 6:
window.open(`/memberCenter/afterService/returnApplication/returnPrAddDeliver/deliverDetail?id=${id}`)
break;
default:
window.open(`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${id}&preview=1`)
break
}
} else {
message.error('此订单id不存在!')
}
}
return (
<PageHeaderWrapper
onBack={() => history.goBack()}
......@@ -812,13 +828,13 @@ const AddLogistics: React.FC<{}> = () => {
{query.logisticsOrderNo && <Form.Item label="物流单号" name='receiverName1'><span>{query.logisticsOrderNo}</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)} />
<Search disabled={!!history.location.query.createType} readOnly value={Object.keys(query).length > 0 ? query.shipmentOrderCode : undefined} enterButton={<div style={{ backgroundColor: '#6b778c !important', color: '#fff !important' }}><LinkOutlined /> 选择</div>} onSearch={() => setshippingvisible(true)} />
{query.shipmentOrderCode && <Button type='link'
onClick={() => window.open(`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${query.shipmentOrderId}&preview=1`)}
onClick={() => handleOrderDetail(query.shipmentOrderId)}
>查看单号详情</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)} />
<Search disabled={!!history.location.query.createType} readOnly value={Object.keys(query).length > 0 ? query.relevanceOrderCode : undefined} enterButton={<div style={{ backgroundColor: '#6b778c !important', color: '#fff !important' }}><LinkOutlined /> 选择</div>} onSearch={() => setinvoicesvisible(true)} />
{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>
......
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