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:
parent
a6dc4b85d0
commit
124e3b179b
@ -16,8 +16,8 @@ import {
|
||||
DealerFormItem,
|
||||
DealerList,
|
||||
PageContainer,
|
||||
PurchaseOrderFormItem,
|
||||
PurchaseOrderList,
|
||||
OrderFormItem,
|
||||
OrderList,
|
||||
Remark,
|
||||
RemarkFormItem,
|
||||
SmartActionBar,
|
||||
@ -847,24 +847,23 @@ export default function BizContainer<
|
||||
);
|
||||
},
|
||||
},
|
||||
purchaseOrder: {
|
||||
order: {
|
||||
renderFormItem: (_, props) => {
|
||||
return (
|
||||
<PurchaseOrderFormItem {...props} {...props?.fieldProps} />
|
||||
<OrderFormItem {...props} {...props?.fieldProps} />
|
||||
);
|
||||
},
|
||||
render: (purchaseOrderVO: BusinessAPI.PurchaseOrderVO) => {
|
||||
console.log('purchaseOrderVO', purchaseOrderVO);
|
||||
render: (orderVO: BusinessAPI.OrderVO) => {
|
||||
return (
|
||||
purchaseOrderVO && (
|
||||
<PurchaseOrderList
|
||||
orderVO && (
|
||||
<OrderList
|
||||
ghost={true}
|
||||
mode={'detail'}
|
||||
orderId={purchaseOrderVO.orderId}
|
||||
orderId={orderVO.orderId}
|
||||
trigger={() => (
|
||||
<Space>
|
||||
<a>
|
||||
{`${purchaseOrderVO.orderVehicle?.dealerName} - 第 ${purchaseOrderVO.orderVehicle?.vehicleNo || '暂无'} 车 - ${purchaseOrderVO.orderSn || '暂无'}`}
|
||||
{`${orderVO.orderVehicle?.dealerName} - 第 ${orderVO.orderVehicle?.vehicleNo || '暂无'} 车 - ${orderVO.orderSn || '暂无'}`}
|
||||
</a>
|
||||
</Space>
|
||||
)}
|
||||
|
||||
@ -20,7 +20,7 @@ export type BizValueType =
|
||||
| 'customField'
|
||||
| 'status'
|
||||
| 'remark'
|
||||
| 'purchaseOrder'
|
||||
| 'order'
|
||||
| 'dealer';
|
||||
export type FormType = 'modal' | 'drawer' | 'step';
|
||||
export type ModeType =
|
||||
|
||||
@ -32,7 +32,7 @@ export default function DealerFormItem(props: IDealerFormItemProps) {
|
||||
options: dealerList?.map((dealerVO?: BusinessAPI.DealerVO) => {
|
||||
return {
|
||||
value: dealerVO?.dealerId,
|
||||
label: `${dealerVO?.shortName || dealerVO?.fullName}`,
|
||||
label: dealerVO?.shortName || dealerVO?.fullName,
|
||||
};
|
||||
}),
|
||||
}}
|
||||
|
||||
@ -34,7 +34,7 @@ export default function DealerSearch(props: IDealerSearchProps) {
|
||||
console.log('dealerVO', dealerVO);
|
||||
return {
|
||||
value: dealerVO?.dealerId,
|
||||
label: `${dealerVO?.shortName || dealerVO?.fullName}`,
|
||||
label: dealerVO?.shortName || dealerVO?.fullName,
|
||||
};
|
||||
}),
|
||||
}}
|
||||
|
||||
@ -5,7 +5,9 @@ import {
|
||||
ProFormSelectProps,
|
||||
} from '@ant-design/pro-components';
|
||||
|
||||
export type IUserSelectProps = ProFormSelectProps;
|
||||
export type IUserSelectProps = {
|
||||
onFinish?: (dealerVOList: BusinessAPI.DealerVO[]) => void;
|
||||
} & ProFormSelectProps;
|
||||
|
||||
export default function DealerSelect(props: IUserSelectProps) {
|
||||
const intl = useIntl();
|
||||
@ -13,7 +15,6 @@ export default function DealerSelect(props: IUserSelectProps) {
|
||||
return (
|
||||
<ProFormDependency name={['dealerVO', 'canChangeDealer']}>
|
||||
{({ dealerVO, canChangeDealer }, form) => {
|
||||
console.log('dealerVO', dealerVO);
|
||||
return (
|
||||
<DealerSearch
|
||||
{...(canChangeDealer !== undefined && {
|
||||
@ -36,7 +37,7 @@ export default function DealerSelect(props: IUserSelectProps) {
|
||||
convertValue={(dealerVO) => {
|
||||
return dealerVO
|
||||
? `${dealerVO?.shortName || dealerVO?.fullName}`
|
||||
: '';
|
||||
: undefined;
|
||||
}}
|
||||
placeholder={intl.formatMessage({
|
||||
id: 'form.dealerId.placeholder',
|
||||
|
||||
@ -13,6 +13,7 @@ interface IOrderShipListProps {
|
||||
onValueChange?: () => void;
|
||||
mode?: ModeType;
|
||||
trigger?: () => React.ReactNode;
|
||||
params: BusinessAPI.OrderShipPageQry;
|
||||
}
|
||||
|
||||
export default function OrderShipList(props: IOrderShipListProps) {
|
||||
@ -23,6 +24,7 @@ export default function OrderShipList(props: IOrderShipListProps) {
|
||||
mode = 'page',
|
||||
trigger,
|
||||
onValueChange,
|
||||
params,
|
||||
} = props;
|
||||
const intl = useIntl();
|
||||
const intlPrefix = 'orderShip';
|
||||
@ -144,6 +146,7 @@ export default function OrderShipList(props: IOrderShipListProps) {
|
||||
...(activeKey !== 'ALL' && {
|
||||
state: activeKey! as BusinessAPI.OrderShipVO['state'],
|
||||
}),
|
||||
...params,
|
||||
},
|
||||
toolbar: {
|
||||
menu: {
|
||||
|
||||
@ -4,7 +4,7 @@ import {
|
||||
CompanyList,
|
||||
CostList,
|
||||
ModeType,
|
||||
PurchaseOrderSelect,
|
||||
OrderSelect,
|
||||
} from '@/components';
|
||||
import { business } from '@/services';
|
||||
import groupby from '@/utils/groupby';
|
||||
@ -47,10 +47,10 @@ export default function OrderCostList(props: IOrderCostListProps) {
|
||||
|
||||
const columns: ProColumns<BusinessAPI.OrderCostVO, BizValueType>[] = [
|
||||
{
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.purchaseOrder' }),
|
||||
dataIndex: 'purchaseOrderVO',
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.order' }),
|
||||
dataIndex: 'orderVO',
|
||||
key: 'orderId',
|
||||
valueType: 'purchaseOrder',
|
||||
valueType: 'order',
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.name' }),
|
||||
@ -248,15 +248,15 @@ export default function OrderCostList(props: IOrderCostListProps) {
|
||||
/>
|
||||
}
|
||||
/>,
|
||||
<PurchaseOrderSelect key={'purchaseOrderId'} />,
|
||||
<ProFormDependency key={'purchaseOrderVO'} name={['purchaseOrderVO']}>
|
||||
{({ purchaseOrderVO }, form) => {
|
||||
<OrderSelect key={'orderId'} />,
|
||||
<ProFormDependency key={'orderVO'} name={['orderVO']}>
|
||||
{({ orderVO }, form) => {
|
||||
form.setFieldsValue({
|
||||
principal: purchaseOrderVO?.orderVehicle.driver,
|
||||
principal: orderVO?.orderVehicle.driver,
|
||||
});
|
||||
return (
|
||||
<>
|
||||
{purchaseOrderVO && (
|
||||
{orderVO && (
|
||||
<ProFormText
|
||||
key={'principal'}
|
||||
name={'principal'}
|
||||
@ -278,7 +278,7 @@ export default function OrderCostList(props: IOrderCostListProps) {
|
||||
readonly={true}
|
||||
/>
|
||||
)}
|
||||
{purchaseOrderVO && (
|
||||
{orderVO && (
|
||||
<ProFormMoney
|
||||
key={'price'}
|
||||
name={'price'}
|
||||
|
||||
@ -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'}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@ -1,22 +1,27 @@
|
||||
import { BizContainer, BizValueType, ModeType } from '@/components';
|
||||
import {
|
||||
BizContainer,
|
||||
BizValueType,
|
||||
ModeType,
|
||||
OrderFormItem,
|
||||
} from '@/components';
|
||||
import { business } from '@/services';
|
||||
import { useIntl } from '@@/exports';
|
||||
import { ProColumns } from '@ant-design/pro-components';
|
||||
import { ProDescriptionsItemProps } from '@ant-design/pro-descriptions';
|
||||
import { Tag } from 'antd';
|
||||
import { Space, Tag } from 'antd';
|
||||
import React, { useState } from 'react';
|
||||
|
||||
interface IPurchaseOrderListProps {
|
||||
interface IOrderListProps {
|
||||
ghost?: boolean;
|
||||
orderId?: BusinessAPI.PurchaseOrderVO['orderId'];
|
||||
orderId?: BusinessAPI.OrderVO['orderId'];
|
||||
search?: boolean;
|
||||
onValueChange?: () => void;
|
||||
mode?: ModeType;
|
||||
trigger?: () => React.ReactNode;
|
||||
params?: BusinessAPI.PurchaseOrderPageQry;
|
||||
params?: BusinessAPI.OrderPageQry;
|
||||
}
|
||||
|
||||
export default function PurchaseOrderList(props: IPurchaseOrderListProps) {
|
||||
export default function OrderList(props: IOrderListProps) {
|
||||
const {
|
||||
ghost = false,
|
||||
orderId,
|
||||
@ -27,16 +32,38 @@ export default function PurchaseOrderList(props: IPurchaseOrderListProps) {
|
||||
params,
|
||||
} = props;
|
||||
const intl = useIntl();
|
||||
const intlPrefix = 'purchaseOrder';
|
||||
const intlPrefix = 'order';
|
||||
|
||||
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' }),
|
||||
dataIndex: 'orderSn',
|
||||
key: 'orderSn',
|
||||
renderText: (text: string) => <span className="font-medium">{text}</span>,
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.order' }),
|
||||
key: 'orderId',
|
||||
renderFormItem: (_, props) => {
|
||||
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' }),
|
||||
@ -48,21 +75,6 @@ export default function PurchaseOrderList(props: IPurchaseOrderListProps) {
|
||||
dataIndex: ['orderVehicle', 'destination'],
|
||||
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' }),
|
||||
dataIndex: ['orderVehicle', 'plate'],
|
||||
@ -119,26 +131,26 @@ export default function PurchaseOrderList(props: IPurchaseOrderListProps) {
|
||||
];
|
||||
|
||||
const detailColumns: ProDescriptionsItemProps<
|
||||
BusinessAPI.PurchaseOrderVO,
|
||||
BusinessAPI.OrderVO,
|
||||
BizValueType
|
||||
>[] = columns as ProDescriptionsItemProps<
|
||||
BusinessAPI.PurchaseOrderVO,
|
||||
BusinessAPI.OrderVO,
|
||||
BizValueType
|
||||
>[];
|
||||
|
||||
return (
|
||||
<BizContainer<
|
||||
typeof business.purchaseOrder,
|
||||
BusinessAPI.PurchaseOrderVO,
|
||||
BusinessAPI.PurchaseOrderPageQry,
|
||||
BusinessAPI.PurchaseOrderCreateCmd,
|
||||
BusinessAPI.PurchaseOrderUpdateCmd
|
||||
typeof business.order,
|
||||
BusinessAPI.OrderVO,
|
||||
BusinessAPI.OrderPageQry,
|
||||
BusinessAPI.OrderCreateCmd,
|
||||
BusinessAPI.OrderUpdateCmd
|
||||
>
|
||||
rowKey={'orderId'}
|
||||
permission={'operation-purchase-order'}
|
||||
func={business.purchaseOrder}
|
||||
method={'purchaseOrder'}
|
||||
methodUpper={'PurchaseOrder'}
|
||||
permission={'operation-order'}
|
||||
func={business.order}
|
||||
method={'order'}
|
||||
methodUpper={'Order'}
|
||||
intlPrefix={intlPrefix}
|
||||
modeType={mode}
|
||||
onValueChange={onValueChange}
|
||||
@ -154,7 +166,7 @@ export default function PurchaseOrderList(props: IPurchaseOrderListProps) {
|
||||
search,
|
||||
params: {
|
||||
...(activeKey !== 'ALL' && {
|
||||
state: activeKey! as BusinessAPI.PurchaseOrderVO['state'],
|
||||
state: activeKey! as BusinessAPI.OrderVO['state'],
|
||||
}),
|
||||
...params,
|
||||
},
|
||||
@ -11,20 +11,21 @@ import {
|
||||
import { SelectModal } from '@chageable/components';
|
||||
import { Alert, ModalProps, Row, Space, Tag } from 'antd';
|
||||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import { OrderFormItem, OrderList } from '@/components';
|
||||
|
||||
export interface IPurchaseOrderModalProps extends ModalProps {
|
||||
export interface IOrderModalProps extends ModalProps {
|
||||
title: string;
|
||||
selectedList?: BusinessAPI.PurchaseOrderVO[];
|
||||
onFinish: (purchaseOrderVOList: BusinessAPI.PurchaseOrderVO[]) => void;
|
||||
selectedList?: BusinessAPI.OrderVO[];
|
||||
onFinish: (orderVOList: BusinessAPI.OrderVO[]) => void;
|
||||
type: 'checkbox' | 'radio' | undefined;
|
||||
params?: BusinessAPI.DealerPageQry;
|
||||
num?: number;
|
||||
tips?: string;
|
||||
extraFilter?: React.ReactNode[];
|
||||
extraColumns?: ProColumns<BusinessAPI.PurchaseOrderVO>[];
|
||||
extraColumns?: ProColumns<BusinessAPI.OrderVO>[];
|
||||
}
|
||||
|
||||
export default function PurchaseOrderModal(props: IPurchaseOrderModalProps) {
|
||||
export default function OrderModal(props: IOrderModalProps) {
|
||||
const {
|
||||
title,
|
||||
onFinish,
|
||||
@ -38,9 +39,9 @@ export default function PurchaseOrderModal(props: IPurchaseOrderModalProps) {
|
||||
...rest
|
||||
} = props;
|
||||
const actionRef = useRef<ActionType>();
|
||||
const sessionKey = `purchaseOrderList`;
|
||||
const sessionKey = `orderList`;
|
||||
const intl = useIntl();
|
||||
const intlPrefix = 'purchaseOrder';
|
||||
const intlPrefix = 'order';
|
||||
const [params, setParams] = useState<BusinessAPI.DealerPageQry>(
|
||||
initParams || {},
|
||||
);
|
||||
@ -54,12 +55,34 @@ export default function PurchaseOrderModal(props: IPurchaseOrderModalProps) {
|
||||
}
|
||||
}, [initParams]);
|
||||
|
||||
const columns: ProColumns<BusinessAPI.PurchaseOrderVO>[] = [
|
||||
const columns: ProColumns<BusinessAPI.OrderVO>[] = [
|
||||
{
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.orderSn' }),
|
||||
dataIndex: 'orderSn',
|
||||
key: 'orderSn',
|
||||
renderText: (text: string) => <span className="font-medium">{text}</span>,
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.order' }),
|
||||
key: 'orderId',
|
||||
renderFormItem: (_, props) => {
|
||||
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' }),
|
||||
@ -71,23 +94,6 @@ export default function PurchaseOrderModal(props: IPurchaseOrderModalProps) {
|
||||
dataIndex: ['orderVehicle', 'destination'],
|
||||
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' }),
|
||||
dataIndex: ['orderVehicle', 'plate'],
|
||||
@ -137,30 +143,30 @@ export default function PurchaseOrderModal(props: IPurchaseOrderModalProps) {
|
||||
...(initExtraColumns || []),
|
||||
];
|
||||
|
||||
function setDealerVOStorage(purchaseOrderVO: BusinessAPI.PurchaseOrderVO) {
|
||||
const localPurchaseOrderList = localStorage.getItem(sessionKey);
|
||||
const purchaseOrderList = localPurchaseOrderList
|
||||
? JSON.parse(localPurchaseOrderList)
|
||||
function setDealerVOStorage(orderVO: BusinessAPI.OrderVO) {
|
||||
const localOrderList = localStorage.getItem(sessionKey);
|
||||
const orderList = localOrderList
|
||||
? JSON.parse(localOrderList)
|
||||
: [];
|
||||
purchaseOrderList.forEach(
|
||||
(item: BusinessAPI.PurchaseOrderVO, index: number) => {
|
||||
if (item.orderId === purchaseOrderVO.orderId) {
|
||||
purchaseOrderList.splice(index, 1);
|
||||
orderList.forEach(
|
||||
(item: BusinessAPI.OrderVO, index: number) => {
|
||||
if (item.orderId === orderVO.orderId) {
|
||||
orderList.splice(index, 1);
|
||||
}
|
||||
},
|
||||
);
|
||||
if (purchaseOrderList.length < 5) {
|
||||
purchaseOrderList.unshift(purchaseOrderVO);
|
||||
localStorage.setItem(sessionKey, JSON.stringify(purchaseOrderList));
|
||||
if (orderList.length < 5) {
|
||||
orderList.unshift(orderVO);
|
||||
localStorage.setItem(sessionKey, JSON.stringify(orderList));
|
||||
} else {
|
||||
purchaseOrderList.pop();
|
||||
purchaseOrderList.unshift(purchaseOrderVO);
|
||||
localStorage.setItem(sessionKey, JSON.stringify(purchaseOrderList));
|
||||
orderList.pop();
|
||||
orderList.unshift(orderVO);
|
||||
localStorage.setItem(sessionKey, JSON.stringify(orderList));
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<SelectModal<BusinessAPI.PurchaseOrderVO, BusinessAPI.PurchaseOrderPageQry>
|
||||
<SelectModal<BusinessAPI.OrderVO, BusinessAPI.OrderPageQry>
|
||||
rowKey={'orderId'}
|
||||
modalProps={{
|
||||
title: title || '选择采购单',
|
||||
@ -180,15 +186,15 @@ export default function PurchaseOrderModal(props: IPurchaseOrderModalProps) {
|
||||
columns: columns,
|
||||
columnsState: {
|
||||
persistenceType: 'sessionStorage',
|
||||
persistenceKey: 'purchaseOrderModalColumnStateKey',
|
||||
persistenceKey: 'orderModalColumnStateKey',
|
||||
},
|
||||
params: {
|
||||
...params,
|
||||
},
|
||||
request: async (params, sorter, filter) => {
|
||||
const { data, success, totalCount } =
|
||||
await business.purchaseOrder.pagePurchaseOrder({
|
||||
purchaseOrderPageQry: formatParam<typeof params>(
|
||||
await business.order.pageOrder({
|
||||
orderPageQry: formatParam<typeof params>(
|
||||
params,
|
||||
sorter,
|
||||
filter,
|
||||
@ -209,22 +215,22 @@ export default function PurchaseOrderModal(props: IPurchaseOrderModalProps) {
|
||||
// selectedRows 和 selectedList 组合在一起,去重,
|
||||
const selectedRowsMap = new Map<
|
||||
string,
|
||||
BusinessAPI.PurchaseOrderVO
|
||||
BusinessAPI.OrderVO
|
||||
>();
|
||||
selectedRows.forEach((item: BusinessAPI.PurchaseOrderVO) => {
|
||||
selectedRows.forEach((item: BusinessAPI.OrderVO) => {
|
||||
if (item) {
|
||||
if (!selectedRowsMap.has(item.orderId)) {
|
||||
selectedRowsMap.set(item.orderId, item);
|
||||
}
|
||||
}
|
||||
});
|
||||
selectedList?.forEach((item: BusinessAPI.PurchaseOrderVO) => {
|
||||
selectedList?.forEach((item: BusinessAPI.OrderVO) => {
|
||||
if (!selectedRowsMap.has(item.orderId)) {
|
||||
selectedRowsMap.set(item.orderId, item);
|
||||
}
|
||||
});
|
||||
let selectedTempList: BusinessAPI.PurchaseOrderVO[] = [];
|
||||
selectedRowsMap.forEach((item: BusinessAPI.PurchaseOrderVO) => {
|
||||
let selectedTempList: BusinessAPI.OrderVO[] = [];
|
||||
selectedRowsMap.forEach((item: BusinessAPI.OrderVO) => {
|
||||
if (selectedRowKeys.includes(item.orderId)) {
|
||||
selectedTempList.push(item);
|
||||
}
|
||||
@ -233,7 +239,7 @@ export default function PurchaseOrderModal(props: IPurchaseOrderModalProps) {
|
||||
<Space size={12}>
|
||||
<span>已选 {selectedRowKeys.length} 项</span>
|
||||
<Space wrap={true}>
|
||||
{selectedTempList?.map((item: BusinessAPI.PurchaseOrderVO) => {
|
||||
{selectedTempList?.map((item: BusinessAPI.OrderVO) => {
|
||||
return item && <span key={item.orderId}>{item.orderSn}</span>;
|
||||
})}
|
||||
</Space>
|
||||
@ -254,23 +260,23 @@ export default function PurchaseOrderModal(props: IPurchaseOrderModalProps) {
|
||||
<>
|
||||
{tips && <Alert type={'info'} message={tips} />}
|
||||
<Row gutter={16}>
|
||||
{dealerList.map((item: BusinessAPI.PurchaseOrderVO) => {
|
||||
{dealerList.map((item: BusinessAPI.OrderVO) => {
|
||||
return (
|
||||
<Tag
|
||||
style={{
|
||||
cursor: 'pointer',
|
||||
}}
|
||||
onClick={async () => {
|
||||
const { data: purchaseOrderVO } =
|
||||
await business.purchaseOrder.showPurchaseOrder({
|
||||
purchaseOrderShowQry: {
|
||||
const { data: orderVO } =
|
||||
await business.order.showOrder({
|
||||
orderShowQry: {
|
||||
orderId: item.orderId,
|
||||
},
|
||||
});
|
||||
|
||||
if (purchaseOrderVO) {
|
||||
onFinish([purchaseOrderVO]);
|
||||
setDealerVOStorage(purchaseOrderVO);
|
||||
if (orderVO) {
|
||||
onFinish([orderVO]);
|
||||
setDealerVOStorage(orderVO);
|
||||
}
|
||||
}}
|
||||
key={item.orderId}
|
||||
@ -36,10 +36,10 @@ export default function OrderRebateList(props: IOrderRebateListProps) {
|
||||
|
||||
const columns: ProColumns<BusinessAPI.OrderRebateVO, BizValueType>[] = [
|
||||
{
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.purchaseOrder' }),
|
||||
dataIndex: 'purchaseOrderVO',
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.order' }),
|
||||
dataIndex: 'orderVO',
|
||||
key: 'orderId',
|
||||
valueType: 'purchaseOrder',
|
||||
valueType: 'order',
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.name' }),
|
||||
|
||||
66
packages/app-operation/src/components/Order/OrderSearch.tsx
Normal file
66
packages/app-operation/src/components/Order/OrderSearch.tsx
Normal 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'}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
57
packages/app-operation/src/components/Order/OrderSelect.tsx
Normal file
57
packages/app-operation/src/components/Order/OrderSelect.tsx
Normal 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>
|
||||
);
|
||||
}
|
||||
@ -16,7 +16,7 @@ import React, { useState } from 'react';
|
||||
|
||||
interface IOrderSupplierListProps {
|
||||
ghost?: boolean;
|
||||
orderId?: BusinessAPI.PurchaseOrderVO['orderId'];
|
||||
orderId?: BusinessAPI.OrderVO['orderId'];
|
||||
search?: boolean;
|
||||
onValueChange?: () => void;
|
||||
mode?: ModeType;
|
||||
@ -50,10 +50,10 @@ export default function OrderSupplierList(props: IOrderSupplierListProps) {
|
||||
|
||||
const columns: ProColumns<BusinessAPI.OrderSupplierVO, BizValueType>[] = [
|
||||
{
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.purchaseOrder' }),
|
||||
dataIndex: 'purchaseOrderVO',
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.order' }),
|
||||
dataIndex: 'orderVO',
|
||||
key: 'orderId',
|
||||
valueType: 'purchaseOrder',
|
||||
valueType: 'order',
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.name' }),
|
||||
|
||||
@ -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'}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@ -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'}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@ -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>
|
||||
);
|
||||
}
|
||||
@ -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 OrderCostList } from './OrderCostList';
|
||||
export { default as OrderRebateList } from './OrderRebateList';
|
||||
export { default as PurchaseOrderModal } from './PurchaseOrderModal';
|
||||
export { default as PurchaseOrderFormItem } from './PurchaseOrderFormItem';
|
||||
export { default as PurchaseOrderSearch } from './PurchaseOrderSearch';
|
||||
export { default as PurchaseOrderSelect } from './PurchaseOrderSelect';
|
||||
export type { IPurchaseOrderModalProps } from './PurchaseOrderModal';
|
||||
export { default as OrderModal } from './OrderModal';
|
||||
export { default as OrderFormItem } from './OrderFormItem';
|
||||
export { default as OrderSearch } from './OrderSearch';
|
||||
export { default as OrderSelect } from './OrderSelect';
|
||||
export type { IOrderModalProps } from './OrderModal';
|
||||
|
||||
@ -2122,7 +2122,7 @@ export default {
|
||||
},
|
||||
},
|
||||
},
|
||||
purchaseOrder: {
|
||||
order: {
|
||||
tab: {
|
||||
all: '全部',
|
||||
draft: '草稿',
|
||||
@ -2132,11 +2132,9 @@ export default {
|
||||
closed: '已关闭',
|
||||
},
|
||||
column: {
|
||||
orderSn: '采购单编号',
|
||||
order: '采购单',
|
||||
plate: '车牌号',
|
||||
deliveryTime: '采购日期',
|
||||
dealerName: '经销商名称',
|
||||
vehicleNo: '车次号',
|
||||
frameInfo: '瓜农信息',
|
||||
origin: '发货地',
|
||||
destination: '收货地',
|
||||
@ -2246,7 +2244,7 @@ export default {
|
||||
invoiceAmount: '应开发票金额(元)',
|
||||
depositAmount: '已付定金(元)',
|
||||
remainingAmount: '剩余付款金额(元)',
|
||||
purchaseOrder: '采购单',
|
||||
order: '采购单',
|
||||
deliveryTime: '采购日期',
|
||||
dealerName: '经销商名称',
|
||||
vehicleNo: '车次号',
|
||||
@ -2296,7 +2294,7 @@ export default {
|
||||
name: '费用名称',
|
||||
principal: '收款方',
|
||||
price: '待付款金额',
|
||||
purchaseOrder: '采购单',
|
||||
order: '采购单',
|
||||
orderVehicle: '关联车辆',
|
||||
orderCompany: '所属公司',
|
||||
belong: '归属',
|
||||
@ -2370,7 +2368,7 @@ export default {
|
||||
'calcMethod.notFixed': '不固定模式',
|
||||
netWeight: '净重(斤)',
|
||||
unitPrice: '单价(元/斤)',
|
||||
purchaseOrder: '采购单',
|
||||
order: '采购单',
|
||||
orderVehicle: '关联车辆',
|
||||
orderCompany: '所属公司',
|
||||
isPaid: '是否付款',
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import { PurchaseOrderList } from '@/components';
|
||||
import { OrderList } from '@/components';
|
||||
|
||||
export default function Page() {
|
||||
return (
|
||||
<PurchaseOrderList
|
||||
<OrderList
|
||||
params={{
|
||||
type: 'PRODUCTION_PURCHASE',
|
||||
}}
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import { PurchaseOrderList } from '@/components';
|
||||
import { OrderList } from '@/components';
|
||||
|
||||
export default function Page() {
|
||||
return (
|
||||
<PurchaseOrderList
|
||||
<OrderList
|
||||
params={{
|
||||
type: 'MARKET_PURCHASE',
|
||||
}}
|
||||
|
||||
91
packages/app-operation/src/pages/ReconciliationCreate.tsx
Normal file
91
packages/app-operation/src/pages/ReconciliationCreate.tsx
Normal 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>
|
||||
);
|
||||
}
|
||||
@ -0,0 +1,5 @@
|
||||
import { PageContainer } from '@/components';
|
||||
|
||||
export default function Page() {
|
||||
return <PageContainer permission={''}></PageContainer>;
|
||||
}
|
||||
@ -6,7 +6,6 @@ import * as captcha from './captcha';
|
||||
import * as channel from './channel';
|
||||
import * as user from './user';
|
||||
import * as userAuth from './userAuth';
|
||||
|
||||
export default {
|
||||
user,
|
||||
userAuth,
|
||||
|
||||
73
packages/app-operation/src/services/business/audit.ts
Normal file
73
packages/app-operation/src/services/business/audit.ts
Normal 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 || {}),
|
||||
},
|
||||
);
|
||||
}
|
||||
@ -3,6 +3,7 @@
|
||||
// API 更新时间:
|
||||
// API 唯一标识:
|
||||
import * as agreement from './agreement';
|
||||
import * as audit from './audit';
|
||||
import * as boxBrand from './boxBrand';
|
||||
import * as boxProduct from './boxProduct';
|
||||
import * as boxSpec from './boxSpec';
|
||||
@ -23,6 +24,7 @@ import * as giftBox from './giftBox';
|
||||
import * as material from './material';
|
||||
import * as materialCategory from './materialCategory';
|
||||
import * as menu from './menu';
|
||||
import * as order from './order';
|
||||
import * as orderCost from './orderCost';
|
||||
import * as orderRebate from './orderRebate';
|
||||
import * as orderShip from './orderShip';
|
||||
@ -30,19 +32,17 @@ import * as orderSupplier from './orderSupplier';
|
||||
import * as permission from './permission';
|
||||
import * as platform from './platform';
|
||||
import * as product from './product';
|
||||
import * as purchaseOrder from './purchaseOrder';
|
||||
import * as role from './role';
|
||||
import * as setting from './setting';
|
||||
import * as supplier from './supplier';
|
||||
import * as user from './user';
|
||||
|
||||
export default {
|
||||
user,
|
||||
supplier,
|
||||
setting,
|
||||
purchaseOrder,
|
||||
product,
|
||||
platform,
|
||||
order,
|
||||
orderSupplier,
|
||||
orderShip,
|
||||
menu,
|
||||
@ -64,6 +64,7 @@ export default {
|
||||
boxSpec,
|
||||
boxProduct,
|
||||
boxBrand,
|
||||
audit,
|
||||
agreement,
|
||||
role,
|
||||
permission,
|
||||
|
||||
301
packages/app-operation/src/services/business/order.ts
Normal file
301
packages/app-operation/src/services/business/order.ts
Normal 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 || {}),
|
||||
});
|
||||
}
|
||||
@ -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
Loading…
Reference in New Issue
Block a user