forked from yoone/WEB
feat(订单列表): 添加发货平台选择功能
在发货弹窗中新增发货平台选择字段,默认值为uniuni,并添加必填校验规则
This commit is contained in:
parent
2245c71702
commit
82e0df6d43
|
|
@ -83,6 +83,7 @@ import Item from 'antd/es/list/Item';
|
||||||
import RelatedOrders from '../../Subscription/Orders/RelatedOrders';
|
import RelatedOrders from '../../Subscription/Orders/RelatedOrders';
|
||||||
import React, { useMemo, useRef, useState } from 'react';
|
import React, { useMemo, useRef, useState } from 'react';
|
||||||
import { printPDF } from '@/utils/util';
|
import { printPDF } from '@/utils/util';
|
||||||
|
import dayjs from 'dayjs';
|
||||||
|
|
||||||
const ListPage: React.FC = () => {
|
const ListPage: React.FC = () => {
|
||||||
const actionRef = useRef<ActionType>();
|
const actionRef = useRef<ActionType>();
|
||||||
|
|
@ -1196,7 +1197,10 @@ const Shipping: React.FC<{
|
||||||
const [rates, setRates] = useState<API.RateDTO[]>([]);
|
const [rates, setRates] = useState<API.RateDTO[]>([]);
|
||||||
const [ratesLoading, setRatesLoading] = useState(false);
|
const [ratesLoading, setRatesLoading] = useState(false);
|
||||||
const { message } = App.useApp();
|
const { message } = App.useApp();
|
||||||
|
const [shipmentPlatforms, setShipmentPlatforms] = useState([
|
||||||
|
{ label: 'uniuni', value: 'uniuni' },
|
||||||
|
{ label: 'tms.freightwaves', value: 'freightwaves' },
|
||||||
|
]);
|
||||||
return (
|
return (
|
||||||
<ModalForm
|
<ModalForm
|
||||||
formRef={formRef}
|
formRef={formRef}
|
||||||
|
|
@ -1247,6 +1251,7 @@ const Shipping: React.FC<{
|
||||||
let shipmentInfo = localStorage.getItem('shipmentInfo');
|
let shipmentInfo = localStorage.getItem('shipmentInfo');
|
||||||
if (shipmentInfo) shipmentInfo = JSON.parse(shipmentInfo);
|
if (shipmentInfo) shipmentInfo = JSON.parse(shipmentInfo);
|
||||||
return {
|
return {
|
||||||
|
shipmentPlatform: 'uniuni',
|
||||||
...data,
|
...data,
|
||||||
// payment_method_id: shipmentInfo?.payment_method_id,
|
// payment_method_id: shipmentInfo?.payment_method_id,
|
||||||
stockPointId: shipmentInfo?.stockPointId,
|
stockPointId: shipmentInfo?.stockPointId,
|
||||||
|
|
@ -1360,6 +1365,18 @@ const Shipping: React.FC<{
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|
||||||
|
<Row gutter={16}>
|
||||||
|
<Col span={8}>
|
||||||
|
<ProFormSelect
|
||||||
|
name="shipmentPlatform"
|
||||||
|
label="发货平台"
|
||||||
|
options={shipmentPlatforms}
|
||||||
|
placeholder="请选择发货平台"
|
||||||
|
rules={[{ required: true, message: '请选择一个选项' }]}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
<ProFormText
|
<ProFormText
|
||||||
label="订单号"
|
label="订单号"
|
||||||
readonly
|
readonly
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue