refactor(order): 将采购订单相关组件重构为通用订单组件

- 重命名 PurchaseOrder 相关组件为 Order 组件,包括 PurchaseOrderList、PurchaseOrderModal、PurchaseOrderFormItem、PurchaseOrderSearch、PurchaseOrderSelect
- 更新 BizContainer 中的 purchaseOrder 类型为 order 类型
- 修改 DealerFormItem 和 DealerSearch 中的标签显示逻辑,去除冗余模板字符串
- 为 DealerSelect 添加 onFinish 回调类型定义
- 移除 DealerSelect 中的 console.log 调试信息
- 修改 ShipOrderList 组件添加 params 参数支持
- 更新 OrderCostList 和 OrderRebateList 中的字段映射从 purchaseOrder 到 order
- 修改 OrderSupplierList 中的 orderId 类型定义
- 更新国际化配置中 purchaseOrder 相关键值为 order
- 重命名业务服务中的 purchaseOrder 模块为 order 模块
- 添加新的对账创建和记录页面
- 移除已废弃的 purchaseOrder 服务文件
This commit is contained in:
shenyifei 2025-12-23 14:35:02 +08:00
parent a6dc4b85d0
commit 124e3b179b
30 changed files with 1380 additions and 1018 deletions

View File

@ -16,8 +16,8 @@ import {
DealerFormItem, DealerFormItem,
DealerList, DealerList,
PageContainer, PageContainer,
PurchaseOrderFormItem, OrderFormItem,
PurchaseOrderList, OrderList,
Remark, Remark,
RemarkFormItem, RemarkFormItem,
SmartActionBar, SmartActionBar,
@ -847,24 +847,23 @@ export default function BizContainer<
); );
}, },
}, },
purchaseOrder: { order: {
renderFormItem: (_, props) => { renderFormItem: (_, props) => {
return ( return (
<PurchaseOrderFormItem {...props} {...props?.fieldProps} /> <OrderFormItem {...props} {...props?.fieldProps} />
); );
}, },
render: (purchaseOrderVO: BusinessAPI.PurchaseOrderVO) => { render: (orderVO: BusinessAPI.OrderVO) => {
console.log('purchaseOrderVO', purchaseOrderVO);
return ( return (
purchaseOrderVO && ( orderVO && (
<PurchaseOrderList <OrderList
ghost={true} ghost={true}
mode={'detail'} mode={'detail'}
orderId={purchaseOrderVO.orderId} orderId={orderVO.orderId}
trigger={() => ( trigger={() => (
<Space> <Space>
<a> <a>
{`${purchaseOrderVO.orderVehicle?.dealerName} - 第 ${purchaseOrderVO.orderVehicle?.vehicleNo || '暂无'} 车 - ${purchaseOrderVO.orderSn || '暂无'}`} {`${orderVO.orderVehicle?.dealerName} - 第 ${orderVO.orderVehicle?.vehicleNo || '暂无'} 车 - ${orderVO.orderSn || '暂无'}`}
</a> </a>
</Space> </Space>
)} )}

View File

@ -20,7 +20,7 @@ export type BizValueType =
| 'customField' | 'customField'
| 'status' | 'status'
| 'remark' | 'remark'
| 'purchaseOrder' | 'order'
| 'dealer'; | 'dealer';
export type FormType = 'modal' | 'drawer' | 'step'; export type FormType = 'modal' | 'drawer' | 'step';
export type ModeType = export type ModeType =

View File

@ -32,7 +32,7 @@ export default function DealerFormItem(props: IDealerFormItemProps) {
options: dealerList?.map((dealerVO?: BusinessAPI.DealerVO) => { options: dealerList?.map((dealerVO?: BusinessAPI.DealerVO) => {
return { return {
value: dealerVO?.dealerId, value: dealerVO?.dealerId,
label: `${dealerVO?.shortName || dealerVO?.fullName}`, label: dealerVO?.shortName || dealerVO?.fullName,
}; };
}), }),
}} }}

View File

@ -34,7 +34,7 @@ export default function DealerSearch(props: IDealerSearchProps) {
console.log('dealerVO', dealerVO); console.log('dealerVO', dealerVO);
return { return {
value: dealerVO?.dealerId, value: dealerVO?.dealerId,
label: `${dealerVO?.shortName || dealerVO?.fullName}`, label: dealerVO?.shortName || dealerVO?.fullName,
}; };
}), }),
}} }}

View File

@ -5,7 +5,9 @@ import {
ProFormSelectProps, ProFormSelectProps,
} from '@ant-design/pro-components'; } from '@ant-design/pro-components';
export type IUserSelectProps = ProFormSelectProps; export type IUserSelectProps = {
onFinish?: (dealerVOList: BusinessAPI.DealerVO[]) => void;
} & ProFormSelectProps;
export default function DealerSelect(props: IUserSelectProps) { export default function DealerSelect(props: IUserSelectProps) {
const intl = useIntl(); const intl = useIntl();
@ -13,7 +15,6 @@ export default function DealerSelect(props: IUserSelectProps) {
return ( return (
<ProFormDependency name={['dealerVO', 'canChangeDealer']}> <ProFormDependency name={['dealerVO', 'canChangeDealer']}>
{({ dealerVO, canChangeDealer }, form) => { {({ dealerVO, canChangeDealer }, form) => {
console.log('dealerVO', dealerVO);
return ( return (
<DealerSearch <DealerSearch
{...(canChangeDealer !== undefined && { {...(canChangeDealer !== undefined && {
@ -36,7 +37,7 @@ export default function DealerSelect(props: IUserSelectProps) {
convertValue={(dealerVO) => { convertValue={(dealerVO) => {
return dealerVO return dealerVO
? `${dealerVO?.shortName || dealerVO?.fullName}` ? `${dealerVO?.shortName || dealerVO?.fullName}`
: ''; : undefined;
}} }}
placeholder={intl.formatMessage({ placeholder={intl.formatMessage({
id: 'form.dealerId.placeholder', id: 'form.dealerId.placeholder',

View File

@ -13,6 +13,7 @@ interface IOrderShipListProps {
onValueChange?: () => void; onValueChange?: () => void;
mode?: ModeType; mode?: ModeType;
trigger?: () => React.ReactNode; trigger?: () => React.ReactNode;
params: BusinessAPI.OrderShipPageQry;
} }
export default function OrderShipList(props: IOrderShipListProps) { export default function OrderShipList(props: IOrderShipListProps) {
@ -23,6 +24,7 @@ export default function OrderShipList(props: IOrderShipListProps) {
mode = 'page', mode = 'page',
trigger, trigger,
onValueChange, onValueChange,
params,
} = props; } = props;
const intl = useIntl(); const intl = useIntl();
const intlPrefix = 'orderShip'; const intlPrefix = 'orderShip';
@ -144,6 +146,7 @@ export default function OrderShipList(props: IOrderShipListProps) {
...(activeKey !== 'ALL' && { ...(activeKey !== 'ALL' && {
state: activeKey! as BusinessAPI.OrderShipVO['state'], state: activeKey! as BusinessAPI.OrderShipVO['state'],
}), }),
...params,
}, },
toolbar: { toolbar: {
menu: { menu: {

View File

@ -4,7 +4,7 @@ import {
CompanyList, CompanyList,
CostList, CostList,
ModeType, ModeType,
PurchaseOrderSelect, OrderSelect,
} from '@/components'; } from '@/components';
import { business } from '@/services'; import { business } from '@/services';
import groupby from '@/utils/groupby'; import groupby from '@/utils/groupby';
@ -47,10 +47,10 @@ export default function OrderCostList(props: IOrderCostListProps) {
const columns: ProColumns<BusinessAPI.OrderCostVO, BizValueType>[] = [ const columns: ProColumns<BusinessAPI.OrderCostVO, BizValueType>[] = [
{ {
title: intl.formatMessage({ id: intlPrefix + '.column.purchaseOrder' }), title: intl.formatMessage({ id: intlPrefix + '.column.order' }),
dataIndex: 'purchaseOrderVO', dataIndex: 'orderVO',
key: 'orderId', key: 'orderId',
valueType: 'purchaseOrder', valueType: 'order',
}, },
{ {
title: intl.formatMessage({ id: intlPrefix + '.column.name' }), title: intl.formatMessage({ id: intlPrefix + '.column.name' }),
@ -248,15 +248,15 @@ export default function OrderCostList(props: IOrderCostListProps) {
/> />
} }
/>, />,
<PurchaseOrderSelect key={'purchaseOrderId'} />, <OrderSelect key={'orderId'} />,
<ProFormDependency key={'purchaseOrderVO'} name={['purchaseOrderVO']}> <ProFormDependency key={'orderVO'} name={['orderVO']}>
{({ purchaseOrderVO }, form) => { {({ orderVO }, form) => {
form.setFieldsValue({ form.setFieldsValue({
principal: purchaseOrderVO?.orderVehicle.driver, principal: orderVO?.orderVehicle.driver,
}); });
return ( return (
<> <>
{purchaseOrderVO && ( {orderVO && (
<ProFormText <ProFormText
key={'principal'} key={'principal'}
name={'principal'} name={'principal'}
@ -278,7 +278,7 @@ export default function OrderCostList(props: IOrderCostListProps) {
readonly={true} readonly={true}
/> />
)} )}
{purchaseOrderVO && ( {orderVO && (
<ProFormMoney <ProFormMoney
key={'price'} key={'price'}
name={'price'} name={'price'}

View File

@ -0,0 +1,62 @@
import { ProFormSelect } from '@ant-design/pro-components';
import { ProFieldFCRenderProps } from '@ant-design/pro-provider';
import { useState } from 'react';
import { OrderModal } from '@/components';
export interface IOrderFormItemProps
extends Omit<ProFieldFCRenderProps, 'value' | 'onChange'> {
value?: BusinessAPI.OrderVO['orderId'];
onChange?: (value?: BusinessAPI.OrderVO['orderId']) => void;
}
export default function OrderFormItem(
props: IOrderFormItemProps,
) {
const { value, onChange } = props;
const [showOrderModal, setShowOrderModal] =
useState<boolean>(false);
const [orderList, setOrderList] =
useState<(BusinessAPI.OrderVO | undefined)[]>();
return (
<>
<ProFormSelect
fieldProps={{
open: false,
onClear: () => {
onChange?.(undefined);
},
onClick: () => {
setShowOrderModal(true);
},
value: value,
placeholder: '请选择采购单',
options: orderList?.map(
(dealerVO?: BusinessAPI.OrderVO) => {
return {
value: dealerVO?.orderId,
label: `${dealerVO?.orderSn}`,
};
},
),
}}
/>
<OrderModal
title={'选择采购单'}
open={showOrderModal}
onOk={() => setShowOrderModal(false)}
onCancel={() => setShowOrderModal(false)}
onFinish={async (orderVOList) => {
if (orderVOList.length > 0) {
const orderVO = orderVOList[0];
onChange?.(orderVO?.orderId);
setOrderList(orderVOList);
setShowOrderModal(false);
}
}}
type={'radio'}
/>
</>
);
}

View File

@ -1,22 +1,27 @@
import { BizContainer, BizValueType, ModeType } from '@/components'; import {
BizContainer,
BizValueType,
ModeType,
OrderFormItem,
} from '@/components';
import { business } from '@/services'; import { business } from '@/services';
import { useIntl } from '@@/exports'; import { useIntl } from '@@/exports';
import { ProColumns } from '@ant-design/pro-components'; import { ProColumns } from '@ant-design/pro-components';
import { ProDescriptionsItemProps } from '@ant-design/pro-descriptions'; import { ProDescriptionsItemProps } from '@ant-design/pro-descriptions';
import { Tag } from 'antd'; import { Space, Tag } from 'antd';
import React, { useState } from 'react'; import React, { useState } from 'react';
interface IPurchaseOrderListProps { interface IOrderListProps {
ghost?: boolean; ghost?: boolean;
orderId?: BusinessAPI.PurchaseOrderVO['orderId']; orderId?: BusinessAPI.OrderVO['orderId'];
search?: boolean; search?: boolean;
onValueChange?: () => void; onValueChange?: () => void;
mode?: ModeType; mode?: ModeType;
trigger?: () => React.ReactNode; trigger?: () => React.ReactNode;
params?: BusinessAPI.PurchaseOrderPageQry; params?: BusinessAPI.OrderPageQry;
} }
export default function PurchaseOrderList(props: IPurchaseOrderListProps) { export default function OrderList(props: IOrderListProps) {
const { const {
ghost = false, ghost = false,
orderId, orderId,
@ -27,16 +32,38 @@ export default function PurchaseOrderList(props: IPurchaseOrderListProps) {
params, params,
} = props; } = props;
const intl = useIntl(); const intl = useIntl();
const intlPrefix = 'purchaseOrder'; const intlPrefix = 'order';
const [activeKey, setActiveKey] = useState<string>('ALL'); const [activeKey, setActiveKey] = useState<string>('ALL');
const columns: ProColumns<BusinessAPI.PurchaseOrderVO, BizValueType>[] = [ const columns: ProColumns<BusinessAPI.OrderVO, BizValueType>[] = [
{ {
title: intl.formatMessage({ id: intlPrefix + '.column.orderSn' }), title: intl.formatMessage({ id: intlPrefix + '.column.order' }),
dataIndex: 'orderSn', key: 'orderId',
key: 'orderSn', renderFormItem: (_, props) => {
renderText: (text: string) => <span className="font-medium">{text}</span>, return (
//@ts-ignore
<OrderFormItem {...props} {...props?.fieldProps} />
);
},
render: (_, orderVO: BusinessAPI.OrderVO) => {
return (
orderVO && (
<OrderList
ghost={true}
mode={'detail'}
orderId={orderVO.orderId}
trigger={() => (
<Space>
<a>
{`${orderVO.orderVehicle?.dealerName} - 第 ${orderVO.orderVehicle?.vehicleNo || '暂无'} 车 - ${orderVO.orderSn || '暂无'}`}
</a>
</Space>
)}
/>
)
);
},
}, },
{ {
title: intl.formatMessage({ id: intlPrefix + '.column.origin' }), title: intl.formatMessage({ id: intlPrefix + '.column.origin' }),
@ -48,21 +75,6 @@ export default function PurchaseOrderList(props: IPurchaseOrderListProps) {
dataIndex: ['orderVehicle', 'destination'], dataIndex: ['orderVehicle', 'destination'],
search: false, search: false,
}, },
{
title: intl.formatMessage({ id: intlPrefix + '.column.dealerName' }),
dataIndex: ['orderVehicle', 'dealerName'],
key: 'dealerName',
},
{
title: intl.formatMessage({ id: intlPrefix + '.column.vehicleNo' }),
dataIndex: ['orderVehicle', 'vehicleNo'],
key: 'vehicleNo',
render: (_, record) => {
return record.orderVehicle?.vehicleNo
? '第' + record.orderVehicle?.vehicleNo + '车'
: '-';
},
},
{ {
title: intl.formatMessage({ id: intlPrefix + '.column.plate' }), title: intl.formatMessage({ id: intlPrefix + '.column.plate' }),
dataIndex: ['orderVehicle', 'plate'], dataIndex: ['orderVehicle', 'plate'],
@ -119,26 +131,26 @@ export default function PurchaseOrderList(props: IPurchaseOrderListProps) {
]; ];
const detailColumns: ProDescriptionsItemProps< const detailColumns: ProDescriptionsItemProps<
BusinessAPI.PurchaseOrderVO, BusinessAPI.OrderVO,
BizValueType BizValueType
>[] = columns as ProDescriptionsItemProps< >[] = columns as ProDescriptionsItemProps<
BusinessAPI.PurchaseOrderVO, BusinessAPI.OrderVO,
BizValueType BizValueType
>[]; >[];
return ( return (
<BizContainer< <BizContainer<
typeof business.purchaseOrder, typeof business.order,
BusinessAPI.PurchaseOrderVO, BusinessAPI.OrderVO,
BusinessAPI.PurchaseOrderPageQry, BusinessAPI.OrderPageQry,
BusinessAPI.PurchaseOrderCreateCmd, BusinessAPI.OrderCreateCmd,
BusinessAPI.PurchaseOrderUpdateCmd BusinessAPI.OrderUpdateCmd
> >
rowKey={'orderId'} rowKey={'orderId'}
permission={'operation-purchase-order'} permission={'operation-order'}
func={business.purchaseOrder} func={business.order}
method={'purchaseOrder'} method={'order'}
methodUpper={'PurchaseOrder'} methodUpper={'Order'}
intlPrefix={intlPrefix} intlPrefix={intlPrefix}
modeType={mode} modeType={mode}
onValueChange={onValueChange} onValueChange={onValueChange}
@ -154,7 +166,7 @@ export default function PurchaseOrderList(props: IPurchaseOrderListProps) {
search, search,
params: { params: {
...(activeKey !== 'ALL' && { ...(activeKey !== 'ALL' && {
state: activeKey! as BusinessAPI.PurchaseOrderVO['state'], state: activeKey! as BusinessAPI.OrderVO['state'],
}), }),
...params, ...params,
}, },

View File

@ -11,20 +11,21 @@ import {
import { SelectModal } from '@chageable/components'; import { SelectModal } from '@chageable/components';
import { Alert, ModalProps, Row, Space, Tag } from 'antd'; import { Alert, ModalProps, Row, Space, Tag } from 'antd';
import React, { useEffect, useRef, useState } from 'react'; import React, { useEffect, useRef, useState } from 'react';
import { OrderFormItem, OrderList } from '@/components';
export interface IPurchaseOrderModalProps extends ModalProps { export interface IOrderModalProps extends ModalProps {
title: string; title: string;
selectedList?: BusinessAPI.PurchaseOrderVO[]; selectedList?: BusinessAPI.OrderVO[];
onFinish: (purchaseOrderVOList: BusinessAPI.PurchaseOrderVO[]) => void; onFinish: (orderVOList: BusinessAPI.OrderVO[]) => void;
type: 'checkbox' | 'radio' | undefined; type: 'checkbox' | 'radio' | undefined;
params?: BusinessAPI.DealerPageQry; params?: BusinessAPI.DealerPageQry;
num?: number; num?: number;
tips?: string; tips?: string;
extraFilter?: React.ReactNode[]; extraFilter?: React.ReactNode[];
extraColumns?: ProColumns<BusinessAPI.PurchaseOrderVO>[]; extraColumns?: ProColumns<BusinessAPI.OrderVO>[];
} }
export default function PurchaseOrderModal(props: IPurchaseOrderModalProps) { export default function OrderModal(props: IOrderModalProps) {
const { const {
title, title,
onFinish, onFinish,
@ -38,9 +39,9 @@ export default function PurchaseOrderModal(props: IPurchaseOrderModalProps) {
...rest ...rest
} = props; } = props;
const actionRef = useRef<ActionType>(); const actionRef = useRef<ActionType>();
const sessionKey = `purchaseOrderList`; const sessionKey = `orderList`;
const intl = useIntl(); const intl = useIntl();
const intlPrefix = 'purchaseOrder'; const intlPrefix = 'order';
const [params, setParams] = useState<BusinessAPI.DealerPageQry>( const [params, setParams] = useState<BusinessAPI.DealerPageQry>(
initParams || {}, initParams || {},
); );
@ -54,12 +55,34 @@ export default function PurchaseOrderModal(props: IPurchaseOrderModalProps) {
} }
}, [initParams]); }, [initParams]);
const columns: ProColumns<BusinessAPI.PurchaseOrderVO>[] = [ const columns: ProColumns<BusinessAPI.OrderVO>[] = [
{ {
title: intl.formatMessage({ id: intlPrefix + '.column.orderSn' }), title: intl.formatMessage({ id: intlPrefix + '.column.order' }),
dataIndex: 'orderSn', key: 'orderId',
key: 'orderSn', renderFormItem: (_, props) => {
renderText: (text: string) => <span className="font-medium">{text}</span>, return (
//@ts-ignore
<OrderFormItem {...props} {...props?.fieldProps} />
);
},
render: (_, orderVO: BusinessAPI.OrderVO) => {
return (
orderVO && (
<OrderList
ghost={true}
mode={'detail'}
orderId={orderVO.orderId}
trigger={() => (
<Space>
<a>
{`${orderVO.orderVehicle?.dealerName} - 第 ${orderVO.orderVehicle?.vehicleNo || '暂无'} 车 - ${orderVO.orderSn || '暂无'}`}
</a>
</Space>
)}
/>
)
);
},
}, },
{ {
title: intl.formatMessage({ id: intlPrefix + '.column.origin' }), title: intl.formatMessage({ id: intlPrefix + '.column.origin' }),
@ -71,23 +94,6 @@ export default function PurchaseOrderModal(props: IPurchaseOrderModalProps) {
dataIndex: ['orderVehicle', 'destination'], dataIndex: ['orderVehicle', 'destination'],
search: false, search: false,
}, },
{
title: intl.formatMessage({ id: intlPrefix + '.column.dealerName' }),
dataIndex: ['orderVehicle', 'dealerName'],
key: 'dealerName',
search: false,
},
{
title: intl.formatMessage({ id: intlPrefix + '.column.vehicleNo' }),
dataIndex: ['orderVehicle', 'vehicleNo'],
key: 'vehicleNo',
search: false,
render: (_, record) => {
return record.orderVehicle?.vehicleNo
? '第' + record.orderVehicle?.vehicleNo + '车'
: '-';
},
},
{ {
title: intl.formatMessage({ id: intlPrefix + '.column.plate' }), title: intl.formatMessage({ id: intlPrefix + '.column.plate' }),
dataIndex: ['orderVehicle', 'plate'], dataIndex: ['orderVehicle', 'plate'],
@ -137,30 +143,30 @@ export default function PurchaseOrderModal(props: IPurchaseOrderModalProps) {
...(initExtraColumns || []), ...(initExtraColumns || []),
]; ];
function setDealerVOStorage(purchaseOrderVO: BusinessAPI.PurchaseOrderVO) { function setDealerVOStorage(orderVO: BusinessAPI.OrderVO) {
const localPurchaseOrderList = localStorage.getItem(sessionKey); const localOrderList = localStorage.getItem(sessionKey);
const purchaseOrderList = localPurchaseOrderList const orderList = localOrderList
? JSON.parse(localPurchaseOrderList) ? JSON.parse(localOrderList)
: []; : [];
purchaseOrderList.forEach( orderList.forEach(
(item: BusinessAPI.PurchaseOrderVO, index: number) => { (item: BusinessAPI.OrderVO, index: number) => {
if (item.orderId === purchaseOrderVO.orderId) { if (item.orderId === orderVO.orderId) {
purchaseOrderList.splice(index, 1); orderList.splice(index, 1);
} }
}, },
); );
if (purchaseOrderList.length < 5) { if (orderList.length < 5) {
purchaseOrderList.unshift(purchaseOrderVO); orderList.unshift(orderVO);
localStorage.setItem(sessionKey, JSON.stringify(purchaseOrderList)); localStorage.setItem(sessionKey, JSON.stringify(orderList));
} else { } else {
purchaseOrderList.pop(); orderList.pop();
purchaseOrderList.unshift(purchaseOrderVO); orderList.unshift(orderVO);
localStorage.setItem(sessionKey, JSON.stringify(purchaseOrderList)); localStorage.setItem(sessionKey, JSON.stringify(orderList));
} }
} }
return ( return (
<SelectModal<BusinessAPI.PurchaseOrderVO, BusinessAPI.PurchaseOrderPageQry> <SelectModal<BusinessAPI.OrderVO, BusinessAPI.OrderPageQry>
rowKey={'orderId'} rowKey={'orderId'}
modalProps={{ modalProps={{
title: title || '选择采购单', title: title || '选择采购单',
@ -180,15 +186,15 @@ export default function PurchaseOrderModal(props: IPurchaseOrderModalProps) {
columns: columns, columns: columns,
columnsState: { columnsState: {
persistenceType: 'sessionStorage', persistenceType: 'sessionStorage',
persistenceKey: 'purchaseOrderModalColumnStateKey', persistenceKey: 'orderModalColumnStateKey',
}, },
params: { params: {
...params, ...params,
}, },
request: async (params, sorter, filter) => { request: async (params, sorter, filter) => {
const { data, success, totalCount } = const { data, success, totalCount } =
await business.purchaseOrder.pagePurchaseOrder({ await business.order.pageOrder({
purchaseOrderPageQry: formatParam<typeof params>( orderPageQry: formatParam<typeof params>(
params, params,
sorter, sorter,
filter, filter,
@ -209,22 +215,22 @@ export default function PurchaseOrderModal(props: IPurchaseOrderModalProps) {
// selectedRows 和 selectedList 组合在一起,去重, // selectedRows 和 selectedList 组合在一起,去重,
const selectedRowsMap = new Map< const selectedRowsMap = new Map<
string, string,
BusinessAPI.PurchaseOrderVO BusinessAPI.OrderVO
>(); >();
selectedRows.forEach((item: BusinessAPI.PurchaseOrderVO) => { selectedRows.forEach((item: BusinessAPI.OrderVO) => {
if (item) { if (item) {
if (!selectedRowsMap.has(item.orderId)) { if (!selectedRowsMap.has(item.orderId)) {
selectedRowsMap.set(item.orderId, item); selectedRowsMap.set(item.orderId, item);
} }
} }
}); });
selectedList?.forEach((item: BusinessAPI.PurchaseOrderVO) => { selectedList?.forEach((item: BusinessAPI.OrderVO) => {
if (!selectedRowsMap.has(item.orderId)) { if (!selectedRowsMap.has(item.orderId)) {
selectedRowsMap.set(item.orderId, item); selectedRowsMap.set(item.orderId, item);
} }
}); });
let selectedTempList: BusinessAPI.PurchaseOrderVO[] = []; let selectedTempList: BusinessAPI.OrderVO[] = [];
selectedRowsMap.forEach((item: BusinessAPI.PurchaseOrderVO) => { selectedRowsMap.forEach((item: BusinessAPI.OrderVO) => {
if (selectedRowKeys.includes(item.orderId)) { if (selectedRowKeys.includes(item.orderId)) {
selectedTempList.push(item); selectedTempList.push(item);
} }
@ -233,7 +239,7 @@ export default function PurchaseOrderModal(props: IPurchaseOrderModalProps) {
<Space size={12}> <Space size={12}>
<span> {selectedRowKeys.length} </span> <span> {selectedRowKeys.length} </span>
<Space wrap={true}> <Space wrap={true}>
{selectedTempList?.map((item: BusinessAPI.PurchaseOrderVO) => { {selectedTempList?.map((item: BusinessAPI.OrderVO) => {
return item && <span key={item.orderId}>{item.orderSn}</span>; return item && <span key={item.orderId}>{item.orderSn}</span>;
})} })}
</Space> </Space>
@ -254,23 +260,23 @@ export default function PurchaseOrderModal(props: IPurchaseOrderModalProps) {
<> <>
{tips && <Alert type={'info'} message={tips} />} {tips && <Alert type={'info'} message={tips} />}
<Row gutter={16}> <Row gutter={16}>
{dealerList.map((item: BusinessAPI.PurchaseOrderVO) => { {dealerList.map((item: BusinessAPI.OrderVO) => {
return ( return (
<Tag <Tag
style={{ style={{
cursor: 'pointer', cursor: 'pointer',
}} }}
onClick={async () => { onClick={async () => {
const { data: purchaseOrderVO } = const { data: orderVO } =
await business.purchaseOrder.showPurchaseOrder({ await business.order.showOrder({
purchaseOrderShowQry: { orderShowQry: {
orderId: item.orderId, orderId: item.orderId,
}, },
}); });
if (purchaseOrderVO) { if (orderVO) {
onFinish([purchaseOrderVO]); onFinish([orderVO]);
setDealerVOStorage(purchaseOrderVO); setDealerVOStorage(orderVO);
} }
}} }}
key={item.orderId} key={item.orderId}

View File

@ -36,10 +36,10 @@ export default function OrderRebateList(props: IOrderRebateListProps) {
const columns: ProColumns<BusinessAPI.OrderRebateVO, BizValueType>[] = [ const columns: ProColumns<BusinessAPI.OrderRebateVO, BizValueType>[] = [
{ {
title: intl.formatMessage({ id: intlPrefix + '.column.purchaseOrder' }), title: intl.formatMessage({ id: intlPrefix + '.column.order' }),
dataIndex: 'purchaseOrderVO', dataIndex: 'orderVO',
key: 'orderId', key: 'orderId',
valueType: 'purchaseOrder', valueType: 'order',
}, },
{ {
title: intl.formatMessage({ id: intlPrefix + '.column.name' }), title: intl.formatMessage({ id: intlPrefix + '.column.name' }),

View File

@ -0,0 +1,66 @@
import { IOrderModalProps, OrderModal } from '@/components';
import {
FormInstance,
ProFormSelect,
ProFormSelectProps,
} from '@ant-design/pro-components';
import { useState } from 'react';
export interface IOrderSearchProps extends ProFormSelectProps {
form: FormInstance;
selectedList?: IOrderModalProps['selectedList'];
onFinish?: (orderVOList: BusinessAPI.OrderVO[]) => void;
}
export default function OrderSearch(props: IOrderSearchProps) {
const { form, selectedList, onFinish, ...rest } = props;
const [showOrderModal, setShowOrderModal] =
useState<boolean>(false);
const [orderList, setOrderList] =
useState<(BusinessAPI.OrderVO | undefined)[]>();
return (
<>
<ProFormSelect
{...rest}
fieldProps={{
open: false,
onClick: () => {
setShowOrderModal(true);
},
placeholder: '请选择采购单',
options: orderList?.map(
(orderVO?: BusinessAPI.OrderVO) => {
return {
value: orderVO?.orderId,
label: orderVO?.orderSn,
};
},
),
}}
/>
<OrderModal
title={'请选择采购单'}
open={showOrderModal}
onOk={() => setShowOrderModal(false)}
onCancel={() => setShowOrderModal(false)}
selectedList={selectedList}
onFinish={async (orderVOList) => {
if (orderVOList.length > 0) {
const orderVO = orderVOList[0];
form.setFieldsValue({
orderId: orderVO?.orderId,
orderVO: orderVO,
});
form.validateFields(['orderId', 'orderVO']);
setOrderList(orderVOList);
setShowOrderModal(false);
onFinish?.(orderVOList);
}
}}
type={'radio'}
/>
</>
);
}

View File

@ -0,0 +1,57 @@
import { OrderSearch } from '@/components';
import { useIntl } from '@@/exports';
import {
ProFormDependency,
ProFormSelectProps,
} from '@ant-design/pro-components';
export type IOrderSelectProps = {
onFinish?: (orderVOList: BusinessAPI.OrderVO[]) => void;
} & ProFormSelectProps;
export default function OrderSelect(props: IOrderSelectProps) {
const intl = useIntl();
return (
<ProFormDependency name={['orderVO', 'canChangeOrder']}>
{({ orderVO, canChangeOrder }, form) => {
return (
<OrderSearch
{...(canChangeOrder !== undefined && {
readonly: !canChangeOrder,
})}
className={'purchase-order-select'}
form={form}
{...(orderVO && { selectedList: [orderVO] })}
label={intl.formatMessage({
id: 'form.orderId.label',
})}
transform={(orderVO) => {
return {
orderVO: orderVO,
orderId: orderVO.orderId,
};
}}
name={'orderVO'}
required={true}
convertValue={(orderVO) => {
return orderVO?.orderSn;
}}
placeholder={intl.formatMessage({
id: 'form.orderId.placeholder',
})}
rules={[
{
required: true,
message: intl.formatMessage({
id: 'form.orderId.required',
}),
},
]}
{...props}
/>
);
}}
</ProFormDependency>
);
}

View File

@ -16,7 +16,7 @@ import React, { useState } from 'react';
interface IOrderSupplierListProps { interface IOrderSupplierListProps {
ghost?: boolean; ghost?: boolean;
orderId?: BusinessAPI.PurchaseOrderVO['orderId']; orderId?: BusinessAPI.OrderVO['orderId'];
search?: boolean; search?: boolean;
onValueChange?: () => void; onValueChange?: () => void;
mode?: ModeType; mode?: ModeType;
@ -50,10 +50,10 @@ export default function OrderSupplierList(props: IOrderSupplierListProps) {
const columns: ProColumns<BusinessAPI.OrderSupplierVO, BizValueType>[] = [ const columns: ProColumns<BusinessAPI.OrderSupplierVO, BizValueType>[] = [
{ {
title: intl.formatMessage({ id: intlPrefix + '.column.purchaseOrder' }), title: intl.formatMessage({ id: intlPrefix + '.column.order' }),
dataIndex: 'purchaseOrderVO', dataIndex: 'orderVO',
key: 'orderId', key: 'orderId',
valueType: 'purchaseOrder', valueType: 'order',
}, },
{ {
title: intl.formatMessage({ id: intlPrefix + '.column.name' }), title: intl.formatMessage({ id: intlPrefix + '.column.name' }),

View File

@ -1,62 +0,0 @@
import PurchaseOrderModal from '@/components/Order/PurchaseOrderModal';
import { ProFormSelect } from '@ant-design/pro-components';
import { ProFieldFCRenderProps } from '@ant-design/pro-provider';
import { useState } from 'react';
export interface IPurchaseOrderFormItemProps
extends Omit<ProFieldFCRenderProps, 'value' | 'onChange'> {
value?: BusinessAPI.PurchaseOrderVO['orderId'];
onChange?: (value?: BusinessAPI.PurchaseOrderVO['orderId']) => void;
}
export default function PurchaseOrderFormItem(
props: IPurchaseOrderFormItemProps,
) {
const { value, onChange } = props;
const [showPurchaseOrderModal, setShowPurchaseOrderModal] =
useState<boolean>(false);
const [purchaseOrderList, setPurchaseOrderList] =
useState<(BusinessAPI.PurchaseOrderVO | undefined)[]>();
return (
<>
<ProFormSelect
fieldProps={{
open: false,
onClear: () => {
onChange?.(undefined);
},
onClick: () => {
setShowPurchaseOrderModal(true);
},
value: value,
placeholder: '请选择采购单',
options: purchaseOrderList?.map(
(dealerVO?: BusinessAPI.PurchaseOrderVO) => {
return {
value: dealerVO?.orderId,
label: `${dealerVO?.orderSn}`,
};
},
),
}}
/>
<PurchaseOrderModal
title={'选择采购单'}
open={showPurchaseOrderModal}
onOk={() => setShowPurchaseOrderModal(false)}
onCancel={() => setShowPurchaseOrderModal(false)}
onFinish={async (purchaseOrderVOList) => {
if (purchaseOrderVOList.length > 0) {
const purchaseOrderVO = purchaseOrderVOList[0];
onChange?.(purchaseOrderVO?.orderId);
setPurchaseOrderList(purchaseOrderVOList);
setShowPurchaseOrderModal(false);
}
}}
type={'radio'}
/>
</>
);
}

View File

@ -1,66 +0,0 @@
import { IPurchaseOrderModalProps, PurchaseOrderModal } from '@/components';
import {
FormInstance,
ProFormSelect,
ProFormSelectProps,
} from '@ant-design/pro-components';
import { useState } from 'react';
export interface IPurchaseOrderSearchProps extends ProFormSelectProps {
form: FormInstance;
selectedList?: IPurchaseOrderModalProps['selectedList'];
onFinish?: (purchaseOrderList: BusinessAPI.PurchaseOrderVO[]) => void;
}
export default function PurchaseOrderSearch(props: IPurchaseOrderSearchProps) {
const { form, selectedList, onFinish, ...rest } = props;
const [showPurchaseOrderModal, setShowPurchaseOrderModal] =
useState<boolean>(false);
const [purchaseOrderList, setPurchaseOrderList] =
useState<(BusinessAPI.PurchaseOrderVO | undefined)[]>();
return (
<>
<ProFormSelect
{...rest}
fieldProps={{
open: false,
onClick: () => {
setShowPurchaseOrderModal(true);
},
placeholder: '请选择采购单',
options: purchaseOrderList?.map(
(purchaseOrderVO?: BusinessAPI.PurchaseOrderVO) => {
return {
value: purchaseOrderVO?.orderId,
label: purchaseOrderVO?.orderSn,
};
},
),
}}
/>
<PurchaseOrderModal
title={'请选择采购单'}
open={showPurchaseOrderModal}
onOk={() => setShowPurchaseOrderModal(false)}
onCancel={() => setShowPurchaseOrderModal(false)}
selectedList={selectedList}
onFinish={async (purchaseOrderVOList) => {
if (purchaseOrderVOList.length > 0) {
const purchaseOrderVO = purchaseOrderVOList[0];
form.setFieldsValue({
orderId: purchaseOrderVO?.orderId,
purchaseOrderVO: purchaseOrderVO,
});
form.validateFields(['orderId', 'purchaseOrderVO']);
setPurchaseOrderList(purchaseOrderVOList);
setShowPurchaseOrderModal(false);
onFinish?.(purchaseOrderVOList);
}
}}
type={'radio'}
/>
</>
);
}

View File

@ -1,57 +0,0 @@
import { PurchaseOrderSearch } from '@/components';
import { useIntl } from '@@/exports';
import {
ProFormDependency,
ProFormSelectProps,
} from '@ant-design/pro-components';
export type IPurchaseOrderSelectProps = {
onFinish?: (purchaseOrderVOList: BusinessAPI.PurchaseOrderVO[]) => void;
} & ProFormSelectProps;
export default function PurchaseOrderSelect(props: IPurchaseOrderSelectProps) {
const intl = useIntl();
return (
<ProFormDependency name={['purchaseOrderVO', 'canChangePurchaseOrder']}>
{({ purchaseOrderVO, canChangePurchaseOrder }, form) => {
return (
<PurchaseOrderSearch
{...(canChangePurchaseOrder !== undefined && {
readonly: !canChangePurchaseOrder,
})}
className={'purchase-order-select'}
form={form}
{...(purchaseOrderVO && { selectedList: [purchaseOrderVO] })}
label={intl.formatMessage({
id: 'form.orderId.label',
})}
transform={(purchaseOrderVO) => {
return {
purchaseOrderVO: purchaseOrderVO,
orderId: purchaseOrderVO.orderId,
};
}}
name={'purchaseOrderVO'}
required={true}
convertValue={(purchaseOrderVO) => {
return purchaseOrderVO?.orderSn;
}}
placeholder={intl.formatMessage({
id: 'form.orderId.placeholder',
})}
rules={[
{
required: true,
message: intl.formatMessage({
id: 'form.orderId.required',
}),
},
]}
{...props}
/>
);
}}
</ProFormDependency>
);
}

View File

@ -1,9 +1,9 @@
export { default as PurchaseOrderList } from './PurchaseOrderList'; export { default as OrderList } from './OrderList';
export { default as OrderSupplierList } from './OrderSupplierList'; export { default as OrderSupplierList } from './OrderSupplierList';
export { default as OrderCostList } from './OrderCostList'; export { default as OrderCostList } from './OrderCostList';
export { default as OrderRebateList } from './OrderRebateList'; export { default as OrderRebateList } from './OrderRebateList';
export { default as PurchaseOrderModal } from './PurchaseOrderModal'; export { default as OrderModal } from './OrderModal';
export { default as PurchaseOrderFormItem } from './PurchaseOrderFormItem'; export { default as OrderFormItem } from './OrderFormItem';
export { default as PurchaseOrderSearch } from './PurchaseOrderSearch'; export { default as OrderSearch } from './OrderSearch';
export { default as PurchaseOrderSelect } from './PurchaseOrderSelect'; export { default as OrderSelect } from './OrderSelect';
export type { IPurchaseOrderModalProps } from './PurchaseOrderModal'; export type { IOrderModalProps } from './OrderModal';

View File

@ -2122,7 +2122,7 @@ export default {
}, },
}, },
}, },
purchaseOrder: { order: {
tab: { tab: {
all: '全部', all: '全部',
draft: '草稿', draft: '草稿',
@ -2132,11 +2132,9 @@ export default {
closed: '已关闭', closed: '已关闭',
}, },
column: { column: {
orderSn: '采购单编号', order: '采购单',
plate: '车牌号', plate: '车牌号',
deliveryTime: '采购日期', deliveryTime: '采购日期',
dealerName: '经销商名称',
vehicleNo: '车次号',
frameInfo: '瓜农信息', frameInfo: '瓜农信息',
origin: '发货地', origin: '发货地',
destination: '收货地', destination: '收货地',
@ -2246,7 +2244,7 @@ export default {
invoiceAmount: '应开发票金额(元)', invoiceAmount: '应开发票金额(元)',
depositAmount: '已付定金(元)', depositAmount: '已付定金(元)',
remainingAmount: '剩余付款金额(元)', remainingAmount: '剩余付款金额(元)',
purchaseOrder: '采购单', order: '采购单',
deliveryTime: '采购日期', deliveryTime: '采购日期',
dealerName: '经销商名称', dealerName: '经销商名称',
vehicleNo: '车次号', vehicleNo: '车次号',
@ -2296,7 +2294,7 @@ export default {
name: '费用名称', name: '费用名称',
principal: '收款方', principal: '收款方',
price: '待付款金额', price: '待付款金额',
purchaseOrder: '采购单', order: '采购单',
orderVehicle: '关联车辆', orderVehicle: '关联车辆',
orderCompany: '所属公司', orderCompany: '所属公司',
belong: '归属', belong: '归属',
@ -2370,7 +2368,7 @@ export default {
'calcMethod.notFixed': '不固定模式', 'calcMethod.notFixed': '不固定模式',
netWeight: '净重(斤)', netWeight: '净重(斤)',
unitPrice: '单价(元/斤)', unitPrice: '单价(元/斤)',
purchaseOrder: '采购单', order: '采购单',
orderVehicle: '关联车辆', orderVehicle: '关联车辆',
orderCompany: '所属公司', orderCompany: '所属公司',
isPaid: '是否付款', isPaid: '是否付款',

View File

@ -1,8 +1,8 @@
import { PurchaseOrderList } from '@/components'; import { OrderList } from '@/components';
export default function Page() { export default function Page() {
return ( return (
<PurchaseOrderList <OrderList
params={{ params={{
type: 'PRODUCTION_PURCHASE', type: 'PRODUCTION_PURCHASE',
}} }}

View File

@ -1,8 +1,8 @@
import { PurchaseOrderList } from '@/components'; import { OrderList } from '@/components';
export default function Page() { export default function Page() {
return ( return (
<PurchaseOrderList <OrderList
params={{ params={{
type: 'MARKET_PURCHASE', type: 'MARKET_PURCHASE',
}} }}

View File

@ -0,0 +1,91 @@
import {
DealerSelect,
PageContainer,
OrderList,
ShipOrderList,
} from '@/components';
import {
ProCard,
ProForm,
ProFormDependency,
} from '@ant-design/pro-components';
import { Space, Steps } from 'antd';
import { useState } from 'react';
export default function Page() {
const [current, setCurrent] = useState(0);
const onChange = (value: number) => {
console.log('onChange:', value);
setCurrent(value);
};
const [dealerVO, setDealerVO] = useState<BusinessAPI.DealerVO>();
return (
<PageContainer
permission={''}
fieldProps={{
content: (
<Steps
current={current}
onChange={onChange}
items={[
{
title: '步骤一',
subTitle: '选择客户与车次',
},
{
title: '步骤二',
subTitle: '核对并录入调整项',
},
]}
></Steps>
),
}}
>
{current === 0 && (
<ProCard
title={
<Space>
<ProForm
submitter={false}
onFinish={(formData) => {
setDealerVO(formData.dealerVO);
}}
>
<ProFormDependency name={['dealerId', 'dealerVO']}>
{(_, form) => (
<DealerSelect
noStyle={true}
key={'dealerId'}
onFinish={() => {
form.submit();
}}
/>
)}
</ProFormDependency>
</ProForm>
</Space>
}
headerBordered={true}
direction={'column'}
>
{dealerVO && (
<ShipOrderList
ghost={true}
mode={'page'}
params={{
dealerId: dealerVO.dealerId,
}}
/>
)}
</ProCard>
)}
{current === 1 && (
<ProCard title={'核对并录入调整项'} headerBordered={true}></ProCard>
)}
</PageContainer>
);
}

View File

@ -0,0 +1,5 @@
import { PageContainer } from '@/components';
export default function Page() {
return <PageContainer permission={''}></PageContainer>;
}

View File

@ -6,7 +6,6 @@ import * as captcha from './captcha';
import * as channel from './channel'; import * as channel from './channel';
import * as user from './user'; import * as user from './user';
import * as userAuth from './userAuth'; import * as userAuth from './userAuth';
export default { export default {
user, user,
userAuth, userAuth,

View File

@ -0,0 +1,73 @@
// @ts-ignore
/* eslint-disable */
import request from '../request';
/** 审核列表 GET /operation/pageAudit */
export async function pageAudit(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: BusinessAPI.pageAuditParams,
options?: { [key: string]: any },
) {
return request<BusinessAPI.PageResponseAuditVO>('/operation/pageAudit', {
method: 'GET',
params: {
...params,
auditPageQry: undefined,
...params['auditPageQry'],
},
...(options || {}),
});
}
/** 审核详情 GET /operation/showAudit */
export async function showAudit(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: BusinessAPI.showAuditParams,
options?: { [key: string]: any },
) {
return request<BusinessAPI.SingleResponseAuditVO>('/operation/showAudit', {
method: 'GET',
params: {
...params,
auditShowQry: undefined,
...params['auditShowQry'],
},
...(options || {}),
});
}
/** 审核更新 PUT /operation/updateAudit */
export async function updateAudit(
body: BusinessAPI.AuditUpdateCmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.SingleResponseAuditVO>(
'/operation/updateAudit',
{
method: 'PUT',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
},
);
}
/** 审核更新 PATCH /operation/updateAudit */
export async function updateAudit1(
body: BusinessAPI.AuditUpdateCmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.SingleResponseAuditVO>(
'/operation/updateAudit',
{
method: 'PATCH',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
},
);
}

View File

@ -3,6 +3,7 @@
// API 更新时间: // API 更新时间:
// API 唯一标识: // API 唯一标识:
import * as agreement from './agreement'; import * as agreement from './agreement';
import * as audit from './audit';
import * as boxBrand from './boxBrand'; import * as boxBrand from './boxBrand';
import * as boxProduct from './boxProduct'; import * as boxProduct from './boxProduct';
import * as boxSpec from './boxSpec'; import * as boxSpec from './boxSpec';
@ -23,6 +24,7 @@ import * as giftBox from './giftBox';
import * as material from './material'; import * as material from './material';
import * as materialCategory from './materialCategory'; import * as materialCategory from './materialCategory';
import * as menu from './menu'; import * as menu from './menu';
import * as order from './order';
import * as orderCost from './orderCost'; import * as orderCost from './orderCost';
import * as orderRebate from './orderRebate'; import * as orderRebate from './orderRebate';
import * as orderShip from './orderShip'; import * as orderShip from './orderShip';
@ -30,19 +32,17 @@ import * as orderSupplier from './orderSupplier';
import * as permission from './permission'; import * as permission from './permission';
import * as platform from './platform'; import * as platform from './platform';
import * as product from './product'; import * as product from './product';
import * as purchaseOrder from './purchaseOrder';
import * as role from './role'; import * as role from './role';
import * as setting from './setting'; import * as setting from './setting';
import * as supplier from './supplier'; import * as supplier from './supplier';
import * as user from './user'; import * as user from './user';
export default { export default {
user, user,
supplier, supplier,
setting, setting,
purchaseOrder,
product, product,
platform, platform,
order,
orderSupplier, orderSupplier,
orderShip, orderShip,
menu, menu,
@ -64,6 +64,7 @@ export default {
boxSpec, boxSpec,
boxProduct, boxProduct,
boxBrand, boxBrand,
audit,
agreement, agreement,
role, role,
permission, permission,

View File

@ -0,0 +1,301 @@
// @ts-ignore
/* eslint-disable */
import request from '../request';
/** 采购订单审核(审核员审核) POST /operation/approveOrder */
export async function approveOrder(
body: BusinessAPI.OrderApproveCmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.Response>('/operation/approveOrder', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}
/** 获取某个状态的数量 GET /operation/countOrderByState */
export async function countOrderByState(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: BusinessAPI.countOrderByStateParams,
options?: { [key: string]: any },
) {
return request<BusinessAPI.SingleResponseLong>(
'/operation/countOrderByState',
{
method: 'GET',
params: {
...params,
orderCountQry: undefined,
...params['orderCountQry'],
},
...(options || {}),
},
);
}
/** 创建采购订单(暂存) POST /operation/createOrder */
export async function createOrder(
body: BusinessAPI.OrderCreateCmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.SingleResponseOrderVO>(
'/operation/createOrder',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
},
);
}
/** 采购订单删除 DELETE /operation/destroyOrder */
export async function destroyOrder(
body: BusinessAPI.OrderDestroyCmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.Response>('/operation/destroyOrder', {
method: 'DELETE',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}
/** 采购订单审批(老板审批) POST /operation/finalApproveOrder */
export async function finalApproveOrder(
body: BusinessAPI.OrderFinalApproveCmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.Response>('/operation/finalApproveOrder', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}
/** 获取上一车车次号 GET /operation/getLastVehicleNo */
export async function getLastVehicleNo(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: BusinessAPI.getLastVehicleNoParams,
options?: { [key: string]: any },
) {
return request<BusinessAPI.SingleResponseString>(
'/operation/getLastVehicleNo',
{
method: 'GET',
params: {
...params,
lastVehicleNoQry: undefined,
...params['lastVehicleNoQry'],
},
...(options || {}),
},
);
}
/** 采购订单列表 GET /operation/listOrder */
export async function listOrder(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: BusinessAPI.listOrderParams,
options?: { [key: string]: any },
) {
return request<BusinessAPI.MultiResponseOrderVO>('/operation/listOrder', {
method: 'GET',
params: {
...params,
orderListQry: undefined,
...params['orderListQry'],
},
...(options || {}),
});
}
/** 采购订单列表 GET /operation/pageOrder */
export async function pageOrder(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: BusinessAPI.pageOrderParams,
options?: { [key: string]: any },
) {
return request<BusinessAPI.PageResponseOrderVO>('/operation/pageOrder', {
method: 'GET',
params: {
...params,
orderPageQry: undefined,
...params['orderPageQry'],
},
...(options || {}),
});
}
/** 采购订单驳回审核(审核员驳回审核) POST /operation/rejectApproveOrder */
export async function rejectApproveOrder(
body: BusinessAPI.OrderRejectApproveCmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.Response>('/operation/rejectApproveOrder', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}
/** 采购订单驳回审批(老板驳回审批) POST /operation/rejectFinalOrder */
export async function rejectFinalOrder(
body: BusinessAPI.OrderRejectFinalCmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.Response>('/operation/rejectFinalOrder', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}
/** 采购订单第一步:车辆信息和经销商信息保存 POST /operation/saveOrderStep1 */
export async function saveOrderStep1(
body: BusinessAPI.OrderStep1Cmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.SingleResponseOrderVO>(
'/operation/saveOrderStep1',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
},
);
}
/** 采购订单第二步:供应商信息保存 POST /operation/saveOrderStep2 */
export async function saveOrderStep2(
body: BusinessAPI.OrderStep2Cmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.Response>('/operation/saveOrderStep2', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}
/** 采购订单第三步:人工和辅料等费用信息保存 POST /operation/saveOrderStep3 */
export async function saveOrderStep3(
body: BusinessAPI.OrderStep3Cmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.Response>('/operation/saveOrderStep3', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}
/** 采购订单详情 GET /operation/showOrder */
export async function showOrder(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: BusinessAPI.showOrderParams,
options?: { [key: string]: any },
) {
return request<BusinessAPI.SingleResponseOrderVO>('/operation/showOrder', {
method: 'GET',
params: {
...params,
orderShowQry: undefined,
...params['orderShowQry'],
},
...(options || {}),
});
}
/** 采购订单提审(产地/市场采购员提审) POST /operation/submitReviewOrder */
export async function submitReviewOrder(
body: BusinessAPI.OrderSubmitReviewCmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.Response>('/operation/submitReviewOrder', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}
/** 采购订单更新 PUT /operation/updateOrder */
export async function updateOrder(
body: BusinessAPI.OrderUpdateCmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.SingleResponseOrderVO>(
'/operation/updateOrder',
{
method: 'PUT',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
},
);
}
/** 采购订单更新 PATCH /operation/updateOrder */
export async function updateOrder1(
body: BusinessAPI.OrderUpdateCmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.SingleResponseOrderVO>(
'/operation/updateOrder',
{
method: 'PATCH',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
},
);
}
/** 采购订单撤回提审(产地/市场采购员撤回提审) POST /operation/withdrawReviewOrder */
export async function withdrawReviewOrder(
body: BusinessAPI.OrderWithdrawReviewCmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.Response>('/operation/withdrawReviewOrder', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}

View File

@ -1,325 +0,0 @@
// @ts-ignore
/* eslint-disable */
import request from '../request';
/** 采购订单审核(审核员审核) POST /operation/approvePurchaseOrder */
export async function approvePurchaseOrder(
body: BusinessAPI.PurchaseOrderApproveCmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.Response>('/operation/approvePurchaseOrder', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}
/** 获取某个状态的数量 GET /operation/countPurchaseOrderByState */
export async function countPurchaseOrderByState(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: BusinessAPI.countPurchaseOrderByStateParams,
options?: { [key: string]: any },
) {
return request<BusinessAPI.SingleResponseLong>(
'/operation/countPurchaseOrderByState',
{
method: 'GET',
params: {
...params,
purchaseOrderCountQry: undefined,
...params['purchaseOrderCountQry'],
},
...(options || {}),
},
);
}
/** 创建采购订单(暂存) POST /operation/createPurchaseOrder */
export async function createPurchaseOrder(
body: BusinessAPI.PurchaseOrderCreateCmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.SingleResponsePurchaseOrderVO>(
'/operation/createPurchaseOrder',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
},
);
}
/** 采购订单删除 DELETE /operation/destroyPurchaseOrder */
export async function destroyPurchaseOrder(
body: BusinessAPI.PurchaseOrderDestroyCmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.Response>('/operation/destroyPurchaseOrder', {
method: 'DELETE',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}
/** 采购订单审批(老板审批) POST /operation/finalApprovePurchaseOrder */
export async function finalApprovePurchaseOrder(
body: BusinessAPI.PurchaseOrderFinalApproveCmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.Response>(
'/operation/finalApprovePurchaseOrder',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
},
);
}
/** 获取上一车车次号 GET /operation/getLastVehicleNo */
export async function getLastVehicleNo(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: BusinessAPI.getLastVehicleNoParams,
options?: { [key: string]: any },
) {
return request<BusinessAPI.SingleResponseString>(
'/operation/getLastVehicleNo',
{
method: 'GET',
params: {
...params,
lastVehicleNoQry: undefined,
...params['lastVehicleNoQry'],
},
...(options || {}),
},
);
}
/** 采购订单列表 GET /operation/listPurchaseOrder */
export async function listPurchaseOrder(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: BusinessAPI.listPurchaseOrderParams,
options?: { [key: string]: any },
) {
return request<BusinessAPI.MultiResponsePurchaseOrderVO>(
'/operation/listPurchaseOrder',
{
method: 'GET',
params: {
...params,
purchaseOrderListQry: undefined,
...params['purchaseOrderListQry'],
},
...(options || {}),
},
);
}
/** 采购订单列表 GET /operation/pagePurchaseOrder */
export async function pagePurchaseOrder(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: BusinessAPI.pagePurchaseOrderParams,
options?: { [key: string]: any },
) {
return request<BusinessAPI.PageResponsePurchaseOrderVO>(
'/operation/pagePurchaseOrder',
{
method: 'GET',
params: {
...params,
purchaseOrderPageQry: undefined,
...params['purchaseOrderPageQry'],
},
...(options || {}),
},
);
}
/** 采购订单驳回审核(审核员驳回审核) POST /operation/rejectApprovePurchaseOrder */
export async function rejectApprovePurchaseOrder(
body: BusinessAPI.PurchaseOrderRejectApproveCmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.Response>(
'/operation/rejectApprovePurchaseOrder',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
},
);
}
/** 采购订单驳回审批(老板驳回审批) POST /operation/rejectFinalPurchaseOrder */
export async function rejectFinalPurchaseOrder(
body: BusinessAPI.PurchaseOrderRejectFinalCmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.Response>(
'/operation/rejectFinalPurchaseOrder',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
},
);
}
/** 采购订单第一步:车辆信息和经销商信息保存 POST /operation/savePurchaseOrderStep1 */
export async function savePurchaseOrderStep1(
body: BusinessAPI.PurchaseOrderStep1Cmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.SingleResponsePurchaseOrderVO>(
'/operation/savePurchaseOrderStep1',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
},
);
}
/** 采购订单第二步:供应商信息保存 POST /operation/savePurchaseOrderStep2 */
export async function savePurchaseOrderStep2(
body: BusinessAPI.PurchaseOrderStep2Cmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.Response>('/operation/savePurchaseOrderStep2', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}
/** 采购订单第三步:人工和辅料等费用信息保存 POST /operation/savePurchaseOrderStep3 */
export async function savePurchaseOrderStep3(
body: BusinessAPI.PurchaseOrderStep3Cmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.Response>('/operation/savePurchaseOrderStep3', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}
/** 采购订单详情 GET /operation/showPurchaseOrder */
export async function showPurchaseOrder(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: BusinessAPI.showPurchaseOrderParams,
options?: { [key: string]: any },
) {
return request<BusinessAPI.SingleResponsePurchaseOrderVO>(
'/operation/showPurchaseOrder',
{
method: 'GET',
params: {
...params,
purchaseOrderShowQry: undefined,
...params['purchaseOrderShowQry'],
},
...(options || {}),
},
);
}
/** 采购订单提审(录入员提审) POST /operation/submitReviewPurchaseOrder */
export async function submitReviewPurchaseOrder(
body: BusinessAPI.PurchaseOrderSubmitReviewCmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.Response>(
'/operation/submitReviewPurchaseOrder',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
},
);
}
/** 采购订单更新 PUT /operation/updatePurchaseOrder */
export async function updatePurchaseOrder(
body: BusinessAPI.PurchaseOrderUpdateCmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.SingleResponsePurchaseOrderVO>(
'/operation/updatePurchaseOrder',
{
method: 'PUT',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
},
);
}
/** 采购订单更新 PATCH /operation/updatePurchaseOrder */
export async function updatePurchaseOrder1(
body: BusinessAPI.PurchaseOrderUpdateCmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.SingleResponsePurchaseOrderVO>(
'/operation/updatePurchaseOrder',
{
method: 'PATCH',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
},
);
}
/** 采购订单撤回提审(录入员撤回提审) POST /operation/withdrawReviewPurchaseOrder */
export async function withdrawReviewPurchaseOrder(
body: BusinessAPI.PurchaseOrderWithdrawReviewCmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.Response>(
'/operation/withdrawReviewPurchaseOrder',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
},
);
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long