Commit c3c01833 authored by XieZhiXiong's avatar XieZhiXiong

fix: 修复单据来源值为 undefined 的问题

parent 53bc5c81
......@@ -7,7 +7,7 @@ const AddBills: React.FC = () => {
invoicesTypeId, // 单据类型ID
relevanceInvoices, // 对应单据
relevanceInvoicesId, // 单据id,可能是待新增销售发货单,待新增采购入库单跳转过来的
source,
source = 2,
} = usePageStatus();
return (
......
......@@ -232,7 +232,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
fullAddress: fullAddress || '',
receiverName: receiverName || '',
phone: phone || '',
// deliveryType,
deliveryType,
isDefault,
}
] :
......@@ -240,8 +240,6 @@ const BillsForm: React.FC<BillsFormProps> = ({
,
invoicesDetailsRequests: details,
...rest,
deliveryType,
transport: DELIVERY_TYPE[deliveryType],
});
}).finally(() => {
setInfoLoading(false);
......@@ -271,6 +269,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
setInfoLoading(true);
PublicApi.getOrderProcurementOrderDetails({
id: relevanceInvoicesId,
orderNo: '',
}).then(res => {
if (res.code !== 1000) {
return;
......@@ -317,6 +316,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
setInfoLoading(true);
PublicApi.getOrderPurchaseOrderDetails({
id: relevanceInvoicesId,
orderNo: '',
}).then(res => {
if (res.code !== 1000) {
return;
......@@ -392,12 +392,11 @@ const BillsForm: React.FC<BillsFormProps> = ({
fullAddress: receiveAddress || '',
receiverName: receiveUserName || '',
phone: receiveUserTel || '',
deliveryType,
}
] :
[]
,
deliveryType,
transport: DELIVERY_TYPE[deliveryType],
});
}).finally(() => {
setInfoLoading(false);
......@@ -439,12 +438,11 @@ const BillsForm: React.FC<BillsFormProps> = ({
fullAddress: receiveAddress || '',
receiverName: receiveUserName || '',
phone: receiveUserTel || '',
deliveryType,
}
] :
[]
,
deliveryType,
transport: DELIVERY_TYPE[deliveryType],
});
}).finally(() => {
setInfoLoading(false);
......
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