feat(order): 新增采购单相关组件及功能
- 新增 PurchaseOrderFormItem、PurchaseOrderModal 等采购单表单项组件 - 在 OrderCostList 和 OrderSupplierList 中集成采购单选择功能 - 新增 OrderRebateList 返利列表组件 - 实现采购单数据的展示与选择逻辑 - 添加采购单相关的搜索和筛选字段 - 支持采购单详情查看及关联数据显示 - 优化订单成本列表的创建表单结构 - 增加表格行选择和批量操作功能 - 完善采购单状态标签显示及样式处理
This commit is contained in:
parent
775a05a143
commit
01521fc8c5
@ -16,6 +16,8 @@ import {
|
|||||||
DealerFormItem,
|
DealerFormItem,
|
||||||
DealerList,
|
DealerList,
|
||||||
PageContainer,
|
PageContainer,
|
||||||
|
PurchaseOrderFormItem,
|
||||||
|
PurchaseOrderList,
|
||||||
Remark,
|
Remark,
|
||||||
RemarkFormItem,
|
RemarkFormItem,
|
||||||
SmartActionBar,
|
SmartActionBar,
|
||||||
@ -37,7 +39,7 @@ import {
|
|||||||
} from '@ant-design/pro-components';
|
} from '@ant-design/pro-components';
|
||||||
import { Avatar, Button, message, Space, Switch, Tour, TourProps } from 'antd';
|
import { Avatar, Button, message, Space, Switch, Tour, TourProps } from 'antd';
|
||||||
import { Dayjs } from 'dayjs';
|
import { Dayjs } from 'dayjs';
|
||||||
import React, {
|
import {
|
||||||
useContext,
|
useContext,
|
||||||
useEffect,
|
useEffect,
|
||||||
useImperativeHandle,
|
useImperativeHandle,
|
||||||
@ -845,6 +847,30 @@ export default function BizContainer<
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
purchaseOrder: {
|
||||||
|
renderFormItem: (_, props) => {
|
||||||
|
return (
|
||||||
|
<PurchaseOrderFormItem {...props} {...props?.fieldProps} />
|
||||||
|
);
|
||||||
|
},
|
||||||
|
render: (purchaseOrderVO: BusinessAPI.PurchaseOrderVO) => {
|
||||||
|
console.log('purchaseOrderVO', purchaseOrderVO);
|
||||||
|
return (
|
||||||
|
purchaseOrderVO && (
|
||||||
|
<PurchaseOrderList
|
||||||
|
ghost={true}
|
||||||
|
mode={'detail'}
|
||||||
|
orderId={purchaseOrderVO.orderId}
|
||||||
|
trigger={() => (
|
||||||
|
<Space>
|
||||||
|
<a>{purchaseOrderVO.orderSn}</a>
|
||||||
|
</Space>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
user: {
|
user: {
|
||||||
renderFormItem: (_, props) => {
|
renderFormItem: (_, props) => {
|
||||||
return <UserFormItem {...props} {...props?.fieldProps} />;
|
return <UserFormItem {...props} {...props?.fieldProps} />;
|
||||||
|
|||||||
@ -20,6 +20,7 @@ export type BizValueType =
|
|||||||
| 'customField'
|
| 'customField'
|
||||||
| 'status'
|
| 'status'
|
||||||
| 'remark'
|
| 'remark'
|
||||||
|
| 'purchaseOrder'
|
||||||
| 'dealer';
|
| 'dealer';
|
||||||
export type FormType = 'modal' | 'drawer' | 'step';
|
export type FormType = 'modal' | 'drawer' | 'step';
|
||||||
export type ModeType =
|
export type ModeType =
|
||||||
@ -156,7 +157,7 @@ export interface BizDragProps<
|
|||||||
) => React.ReactNode;
|
) => React.ReactNode;
|
||||||
fieldProps?: DragTableProps<BizVO, BizPageQry>;
|
fieldProps?: DragTableProps<BizVO, BizPageQry>;
|
||||||
trigger?: () => React.ReactNode;
|
trigger?: () => React.ReactNode;
|
||||||
mode?: ModeType
|
mode?: ModeType;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface BizCalenderProps<
|
export interface BizCalenderProps<
|
||||||
|
|||||||
@ -2,15 +2,24 @@ import {
|
|||||||
BizContainer,
|
BizContainer,
|
||||||
BizValueType,
|
BizValueType,
|
||||||
CompanyList,
|
CompanyList,
|
||||||
|
CostList,
|
||||||
ModeType,
|
ModeType,
|
||||||
PurchaseOrderList,
|
PurchaseOrderSelect,
|
||||||
} from '@/components';
|
} from '@/components';
|
||||||
import { business } from '@/services';
|
import { business } from '@/services';
|
||||||
import { useIntl } from '@@/exports';
|
|
||||||
import { ProColumns } from '@ant-design/pro-components';
|
|
||||||
import { ProDescriptionsItemProps } from '@ant-design/pro-descriptions';
|
|
||||||
import React, { useState } from 'react';
|
|
||||||
import groupby from '@/utils/groupby';
|
import groupby from '@/utils/groupby';
|
||||||
|
import { useIntl } from '@@/exports';
|
||||||
|
import {
|
||||||
|
ProColumns,
|
||||||
|
ProFormDependency,
|
||||||
|
ProFormMoney,
|
||||||
|
ProFormText,
|
||||||
|
} from '@ant-design/pro-components';
|
||||||
|
import { ProDescriptionsItemProps } from '@ant-design/pro-descriptions';
|
||||||
|
import { ProFormBizSelect } from '@chageable/components';
|
||||||
|
import { ProFormBizSelectHandles } from '@chageable/components/src';
|
||||||
|
import React, { useRef, useState } from 'react';
|
||||||
|
import { Button, Space } from 'antd';
|
||||||
|
|
||||||
interface IOrderCostListProps {
|
interface IOrderCostListProps {
|
||||||
ghost?: boolean;
|
ghost?: boolean;
|
||||||
@ -32,6 +41,7 @@ export default function OrderCostList(props: IOrderCostListProps) {
|
|||||||
} = props;
|
} = props;
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
const intlPrefix = 'orderCost';
|
const intlPrefix = 'orderCost';
|
||||||
|
const costRef = useRef<ProFormBizSelectHandles>(null);
|
||||||
|
|
||||||
const [activeKey, setActiveKey] = useState<string>('ALL');
|
const [activeKey, setActiveKey] = useState<string>('ALL');
|
||||||
|
|
||||||
@ -109,17 +119,8 @@ export default function OrderCostList(props: IOrderCostListProps) {
|
|||||||
{
|
{
|
||||||
title: intl.formatMessage({ id: intlPrefix + '.column.purchaseOrder' }),
|
title: intl.formatMessage({ id: intlPrefix + '.column.purchaseOrder' }),
|
||||||
dataIndex: 'purchaseOrderVO',
|
dataIndex: 'purchaseOrderVO',
|
||||||
key: 'poOrderSn',
|
key: 'orderId',
|
||||||
render: (_, record) => {
|
valueType: 'purchaseOrder',
|
||||||
return (
|
|
||||||
<PurchaseOrderList
|
|
||||||
ghost={true}
|
|
||||||
mode={'detail'}
|
|
||||||
orderId={record.purchaseOrderVO.orderId}
|
|
||||||
trigger={() => <a href={'#'}>{record.purchaseOrderVO.orderSn}</a>}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: intl.formatMessage({ id: intlPrefix + '.column.orderVehicle' }),
|
title: intl.formatMessage({ id: intlPrefix + '.column.orderVehicle' }),
|
||||||
@ -186,6 +187,144 @@ export default function OrderCostList(props: IOrderCostListProps) {
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const formContext = [
|
||||||
|
<ProFormBizSelect
|
||||||
|
ref={costRef}
|
||||||
|
key={'costId'}
|
||||||
|
name={'costId'}
|
||||||
|
label={intl.formatMessage({
|
||||||
|
id: intlPrefix + '.form.costId.label',
|
||||||
|
})}
|
||||||
|
required={true}
|
||||||
|
placeholder={intl.formatMessage({
|
||||||
|
id: intlPrefix + '.form.costId.placeholder',
|
||||||
|
})}
|
||||||
|
rules={[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: intl.formatMessage({
|
||||||
|
id: intlPrefix + '.form.costId.required',
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
params={{}}
|
||||||
|
fetchOptions={async () => {
|
||||||
|
const { data } = await business.cost.listCost({
|
||||||
|
costListQry: {
|
||||||
|
type: 'LOGISTICS_TYPE',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const costGroup = groupby(
|
||||||
|
data?.filter(
|
||||||
|
(item) =>
|
||||||
|
item.type === 'LOGISTICS_TYPE' &&
|
||||||
|
item.name !== '主运费' &&
|
||||||
|
item.name !== '短驳费' &&
|
||||||
|
item.name !== '草帘费',
|
||||||
|
) || [],
|
||||||
|
(item) => item.type,
|
||||||
|
);
|
||||||
|
|
||||||
|
const options = Object.keys(costGroup).map((key) => ({
|
||||||
|
label: intl.formatMessage({
|
||||||
|
id:
|
||||||
|
'cost.column.type.enum.' +
|
||||||
|
key
|
||||||
|
.toLowerCase()
|
||||||
|
.replace(/_([a-z])/g, (_, char) => char.toUpperCase()),
|
||||||
|
}),
|
||||||
|
title: key,
|
||||||
|
options: costGroup[key].map((item) => ({
|
||||||
|
label: item.name,
|
||||||
|
value: item.costId,
|
||||||
|
})),
|
||||||
|
}));
|
||||||
|
|
||||||
|
return options || [];
|
||||||
|
}}
|
||||||
|
fieldProps={{
|
||||||
|
fetchDataOnSearch: false,
|
||||||
|
showSearch: true,
|
||||||
|
autoClearSearchValue: true,
|
||||||
|
}}
|
||||||
|
addonAfter={
|
||||||
|
<CostList
|
||||||
|
ghost={true}
|
||||||
|
search={false}
|
||||||
|
mode={'create'}
|
||||||
|
onValueChange={async () => costRef.current?.reload()}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
/>,
|
||||||
|
<PurchaseOrderSelect key={'purchaseOrderId'} />,
|
||||||
|
<ProFormDependency key={'purchaseOrderVO'} name={['purchaseOrderVO']}>
|
||||||
|
{({ purchaseOrderVO }, form) => {
|
||||||
|
form.setFieldsValue({
|
||||||
|
principal: purchaseOrderVO?.orderVehicle.driver,
|
||||||
|
});
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
{purchaseOrderVO && (
|
||||||
|
<ProFormText
|
||||||
|
key={'principal'}
|
||||||
|
name={'principal'}
|
||||||
|
label={intl.formatMessage({
|
||||||
|
id: intlPrefix + '.form.driver.label',
|
||||||
|
})}
|
||||||
|
placeholder={intl.formatMessage({
|
||||||
|
id: intlPrefix + '.form.driver.placeholder',
|
||||||
|
})}
|
||||||
|
required={true}
|
||||||
|
rules={[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: intl.formatMessage({
|
||||||
|
id: intlPrefix + '.form.driver.required',
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
readonly={true}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
{purchaseOrderVO && (
|
||||||
|
<ProFormMoney
|
||||||
|
key={'price'}
|
||||||
|
name={'price'}
|
||||||
|
label={intl.formatMessage({
|
||||||
|
id: intlPrefix + '.form.price.label',
|
||||||
|
})}
|
||||||
|
placeholder={intl.formatMessage({
|
||||||
|
id: intlPrefix + '.form.price.placeholder',
|
||||||
|
})}
|
||||||
|
required={true}
|
||||||
|
rules={[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: intl.formatMessage({
|
||||||
|
id: intlPrefix + '.form.price.required',
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
fieldProps={{
|
||||||
|
min: 0,
|
||||||
|
max: 999999,
|
||||||
|
suffix: '元',
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
</ProFormDependency>,
|
||||||
|
<ProFormText key={'count'} name={'count'} hidden={true} />,
|
||||||
|
<ProFormText key={'isPaid'} name={'isPaid'} hidden={true} />,
|
||||||
|
];
|
||||||
|
|
||||||
|
const [selectedRows, setSelectedRows] = useState<BusinessAPI.OrderCostVO[]>(
|
||||||
|
[],
|
||||||
|
);
|
||||||
|
|
||||||
const detailColumns: ProDescriptionsItemProps<
|
const detailColumns: ProDescriptionsItemProps<
|
||||||
BusinessAPI.OrderCostVO,
|
BusinessAPI.OrderCostVO,
|
||||||
BizValueType
|
BizValueType
|
||||||
@ -225,6 +364,23 @@ export default function OrderCostList(props: IOrderCostListProps) {
|
|||||||
poStates: ['COMPLETED'],
|
poStates: ['COMPLETED'],
|
||||||
belongs: ['WORKER_TYPE', 'PRODUCTION_TYPE', 'DRIVER_TYPE'],
|
belongs: ['WORKER_TYPE', 'PRODUCTION_TYPE', 'DRIVER_TYPE'],
|
||||||
},
|
},
|
||||||
|
rowSelection: {
|
||||||
|
onChange: (_, selectedRows) => setSelectedRows(selectedRows),
|
||||||
|
},
|
||||||
|
tableAlertOptionRender: (props) => {
|
||||||
|
return (
|
||||||
|
<Space>
|
||||||
|
<Button
|
||||||
|
key={'cancel'}
|
||||||
|
type={'link'}
|
||||||
|
onClick={() => props.onCleanSelected()}
|
||||||
|
size={'middle'}
|
||||||
|
>
|
||||||
|
取消选择
|
||||||
|
</Button>
|
||||||
|
</Space>
|
||||||
|
);
|
||||||
|
},
|
||||||
toolbar: {
|
toolbar: {
|
||||||
menu: {
|
menu: {
|
||||||
type: 'tab',
|
type: 'tab',
|
||||||
@ -260,7 +416,15 @@ export default function OrderCostList(props: IOrderCostListProps) {
|
|||||||
},
|
},
|
||||||
columns,
|
columns,
|
||||||
}}
|
}}
|
||||||
create={false}
|
create={{
|
||||||
|
formType: 'drawer',
|
||||||
|
formContext,
|
||||||
|
trigger,
|
||||||
|
initValues: {
|
||||||
|
isPaid: false,
|
||||||
|
count: 1,
|
||||||
|
},
|
||||||
|
}}
|
||||||
update={false}
|
update={false}
|
||||||
destroy={false}
|
destroy={false}
|
||||||
detail={{
|
detail={{
|
||||||
|
|||||||
263
packages/app-operation/src/components/Order/OrderRebateList.tsx
Normal file
263
packages/app-operation/src/components/Order/OrderRebateList.tsx
Normal file
@ -0,0 +1,263 @@
|
|||||||
|
import {
|
||||||
|
BizContainer,
|
||||||
|
BizValueType,
|
||||||
|
CompanyList,
|
||||||
|
ModeType,
|
||||||
|
} 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 React, { useState } from 'react';
|
||||||
|
import { Button, Space } from 'antd';
|
||||||
|
|
||||||
|
interface IOrderRebateListProps {
|
||||||
|
ghost?: boolean;
|
||||||
|
orderRebateId?: BusinessAPI.OrderRebateVO['orderRebateId'];
|
||||||
|
search?: boolean;
|
||||||
|
onValueChange?: () => void;
|
||||||
|
mode?: ModeType;
|
||||||
|
trigger?: () => React.ReactNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function OrderRebateList(props: IOrderRebateListProps) {
|
||||||
|
const {
|
||||||
|
ghost = false,
|
||||||
|
orderRebateId,
|
||||||
|
search = true,
|
||||||
|
mode = 'page',
|
||||||
|
trigger,
|
||||||
|
onValueChange,
|
||||||
|
} = props;
|
||||||
|
const intl = useIntl();
|
||||||
|
const intlPrefix = 'orderRebate';
|
||||||
|
|
||||||
|
const [activeKey, setActiveKey] = useState<string>('ALL');
|
||||||
|
|
||||||
|
const columns: ProColumns<BusinessAPI.OrderRebateVO, BizValueType>[] = [
|
||||||
|
{
|
||||||
|
title: intl.formatMessage({ id: intlPrefix + '.column.name' }),
|
||||||
|
dataIndex: 'name',
|
||||||
|
key: 'name',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: intl.formatMessage({ id: intlPrefix + '.column.calcMethod' }),
|
||||||
|
dataIndex: 'calcMethod',
|
||||||
|
key: 'calcMethod',
|
||||||
|
search: false,
|
||||||
|
valueType: 'select',
|
||||||
|
valueEnum: {
|
||||||
|
NET_WEIGHT: {
|
||||||
|
text: intl.formatMessage({
|
||||||
|
id: intlPrefix + '.column.calcMethod.netWeight',
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
NOT_FIXED: {
|
||||||
|
text: intl.formatMessage({
|
||||||
|
id: intlPrefix + '.column.calcMethod.notFixed',
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
FIXED_AMOUNT: {
|
||||||
|
text: intl.formatMessage({
|
||||||
|
id: intlPrefix + '.column.calcMethod.fixedAmount',
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: intl.formatMessage({ id: intlPrefix + '.column.netWeight' }),
|
||||||
|
dataIndex: 'netWeight',
|
||||||
|
key: 'netWeight',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: intl.formatMessage({ id: intlPrefix + '.column.unitPrice' }),
|
||||||
|
dataIndex: 'unitPrice',
|
||||||
|
key: 'unitPrice',
|
||||||
|
valueType: 'money',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: intl.formatMessage({ id: intlPrefix + '.column.amount' }),
|
||||||
|
dataIndex: 'amount',
|
||||||
|
key: 'amount',
|
||||||
|
valueType: 'money',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: intl.formatMessage({ id: intlPrefix + '.column.purchaseOrder' }),
|
||||||
|
dataIndex: 'purchaseOrderVO',
|
||||||
|
key: 'orderId',
|
||||||
|
valueType: 'purchaseOrder',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: intl.formatMessage({ id: intlPrefix + '.column.orderVehicle' }),
|
||||||
|
dataIndex: 'orderVehicle',
|
||||||
|
key: 'ovVehicleNo',
|
||||||
|
render: (_, record) => {
|
||||||
|
return (
|
||||||
|
<span>
|
||||||
|
{record.orderVehicle.origin} 至 {record.orderVehicle.destination}
|
||||||
|
</span>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: intl.formatMessage({ id: intlPrefix + '.column.orderCompany' }),
|
||||||
|
dataIndex: 'orderCompany',
|
||||||
|
valueType: 'select',
|
||||||
|
request: async (params) => {
|
||||||
|
const { data } = await business.company.listCompany({
|
||||||
|
companyListQry: {
|
||||||
|
...params,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
return (
|
||||||
|
data?.map((item) => {
|
||||||
|
return {
|
||||||
|
label: item.fullName,
|
||||||
|
value: item.companyId,
|
||||||
|
};
|
||||||
|
}) || []
|
||||||
|
);
|
||||||
|
},
|
||||||
|
render: (_, record) => {
|
||||||
|
return (
|
||||||
|
<CompanyList
|
||||||
|
ghost={true}
|
||||||
|
mode={'detail'}
|
||||||
|
companyId={record.orderCompany.companyId}
|
||||||
|
trigger={() => <a href={'#'}>{record.orderCompany.fullName}</a>}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: intl.formatMessage({ id: intlPrefix + '.column.isPaid' }),
|
||||||
|
dataIndex: 'isPaid',
|
||||||
|
key: 'isPaid',
|
||||||
|
valueType: 'select',
|
||||||
|
valueEnum: {
|
||||||
|
true: {
|
||||||
|
text: intl.formatMessage({
|
||||||
|
id: intlPrefix + '.column.isPaid.paid',
|
||||||
|
}),
|
||||||
|
status: 'success',
|
||||||
|
},
|
||||||
|
false: {
|
||||||
|
text: intl.formatMessage({
|
||||||
|
id: intlPrefix + '.column.isPaid.unpaid',
|
||||||
|
}),
|
||||||
|
status: 'processing',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const [selectedRows, setSelectedRows] = useState<BusinessAPI.OrderRebateVO[]>(
|
||||||
|
[],
|
||||||
|
);
|
||||||
|
|
||||||
|
const detailColumns: ProDescriptionsItemProps<
|
||||||
|
BusinessAPI.OrderRebateVO,
|
||||||
|
BizValueType
|
||||||
|
>[] = columns as ProDescriptionsItemProps<
|
||||||
|
BusinessAPI.OrderRebateVO,
|
||||||
|
BizValueType
|
||||||
|
>[];
|
||||||
|
|
||||||
|
return (
|
||||||
|
<BizContainer<
|
||||||
|
typeof business.orderRebate,
|
||||||
|
BusinessAPI.OrderRebateVO,
|
||||||
|
BusinessAPI.OrderRebatePageQry
|
||||||
|
>
|
||||||
|
rowKey={'orderRebateId'}
|
||||||
|
permission={'operation-order-cost'}
|
||||||
|
func={business.orderRebate}
|
||||||
|
method={'orderRebate'}
|
||||||
|
methodUpper={'OrderRebate'}
|
||||||
|
intlPrefix={intlPrefix}
|
||||||
|
modeType={mode}
|
||||||
|
onValueChange={onValueChange}
|
||||||
|
container={{
|
||||||
|
ghost,
|
||||||
|
}}
|
||||||
|
status={false}
|
||||||
|
page={{
|
||||||
|
fieldProps: {
|
||||||
|
bordered: true,
|
||||||
|
ghost,
|
||||||
|
//@ts-ignore
|
||||||
|
search,
|
||||||
|
params: {
|
||||||
|
...(activeKey !== 'ALL' && {
|
||||||
|
isPaid: activeKey! as any,
|
||||||
|
}),
|
||||||
|
poStates: ['COMPLETED'],
|
||||||
|
},
|
||||||
|
rowSelection: {
|
||||||
|
onChange: (_, selectedRows) => setSelectedRows(selectedRows),
|
||||||
|
},
|
||||||
|
tableAlertOptionRender: (props) => {
|
||||||
|
return (
|
||||||
|
<Space>
|
||||||
|
<Button
|
||||||
|
key={'cancel'}
|
||||||
|
type={'link'}
|
||||||
|
onClick={() => props.onCleanSelected()}
|
||||||
|
size={'middle'}
|
||||||
|
>
|
||||||
|
取消选择
|
||||||
|
</Button>
|
||||||
|
</Space>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
toolbar: {
|
||||||
|
menu: {
|
||||||
|
type: 'tab',
|
||||||
|
activeKey: activeKey,
|
||||||
|
items: [
|
||||||
|
// 全部
|
||||||
|
{
|
||||||
|
key: 'ALL',
|
||||||
|
label: intl.formatMessage({
|
||||||
|
id: intlPrefix + '.tab.all',
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
// 已支付
|
||||||
|
{
|
||||||
|
key: 'true',
|
||||||
|
label: intl.formatMessage({
|
||||||
|
id: intlPrefix + '.tab.paid',
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
// 未支付
|
||||||
|
{
|
||||||
|
key: 'false',
|
||||||
|
label: intl.formatMessage({
|
||||||
|
id: intlPrefix + '.tab.unpaid',
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
onChange: (key) => {
|
||||||
|
setActiveKey(key as string);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
columns,
|
||||||
|
}}
|
||||||
|
create={false}
|
||||||
|
update={false}
|
||||||
|
destroy={false}
|
||||||
|
detail={{
|
||||||
|
rowId: orderRebateId,
|
||||||
|
formType: 'drawer',
|
||||||
|
columns: detailColumns,
|
||||||
|
trigger,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -1,9 +1,9 @@
|
|||||||
import {
|
import {
|
||||||
BizContainer,
|
BizContainer,
|
||||||
BizValueType,
|
BizValueType,
|
||||||
|
ButtonAccess,
|
||||||
CompanyList,
|
CompanyList,
|
||||||
ModeType,
|
ModeType,
|
||||||
PurchaseOrderList,
|
|
||||||
} from '@/components';
|
} from '@/components';
|
||||||
import { business } from '@/services';
|
import { business } from '@/services';
|
||||||
import { formatBankCard, formatIdCard, formatPhone } from '@/utils/format';
|
import { formatBankCard, formatIdCard, formatPhone } from '@/utils/format';
|
||||||
@ -11,6 +11,7 @@ import { useIntl } from '@@/exports';
|
|||||||
import { EyeInvisibleOutlined, EyeTwoTone } from '@ant-design/icons';
|
import { EyeInvisibleOutlined, EyeTwoTone } from '@ant-design/icons';
|
||||||
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 { Button, Image, Modal, Space } from 'antd';
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
|
|
||||||
interface IOrderSupplierListProps {
|
interface IOrderSupplierListProps {
|
||||||
@ -39,12 +40,44 @@ export default function OrderSupplierList(props: IOrderSupplierListProps) {
|
|||||||
const [showPhone, setShowPhone] = useState<Record<string, boolean>>({});
|
const [showPhone, setShowPhone] = useState<Record<string, boolean>>({});
|
||||||
const [activeKey, setActiveKey] = useState<string>('ALL');
|
const [activeKey, setActiveKey] = useState<string>('ALL');
|
||||||
|
|
||||||
|
// 发票预览相关状态
|
||||||
|
const [invoiceVisible, setInvoiceVisible] = useState(false);
|
||||||
|
const [contractVisible, setContractVisible] = useState(false);
|
||||||
|
const [wechatQrVisible, setWechatQrVisible] = useState(false);
|
||||||
|
const [paymentVoucherVisible, setPaymentVoucherVisible] = useState(false);
|
||||||
|
const [currentRecord, setCurrentRecord] =
|
||||||
|
useState<BusinessAPI.OrderSupplierVO | null>(null);
|
||||||
|
|
||||||
const columns: ProColumns<BusinessAPI.OrderSupplierVO, BizValueType>[] = [
|
const columns: ProColumns<BusinessAPI.OrderSupplierVO, BizValueType>[] = [
|
||||||
{
|
{
|
||||||
title: intl.formatMessage({ id: intlPrefix + '.column.name' }),
|
title: intl.formatMessage({ id: intlPrefix + '.column.name' }),
|
||||||
dataIndex: 'name',
|
dataIndex: 'name',
|
||||||
key: 'name',
|
key: 'name',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: intl.formatMessage({ id: intlPrefix + '.column.invoiceAmount' }),
|
||||||
|
dataIndex: 'invoiceAmount',
|
||||||
|
key: 'invoiceAmount',
|
||||||
|
valueType: 'money',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: intl.formatMessage({ id: intlPrefix + '.column.depositAmount' }),
|
||||||
|
dataIndex: 'depositAmount',
|
||||||
|
key: 'depositAmount',
|
||||||
|
valueType: 'money',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
// 剩余付款金额
|
||||||
|
{
|
||||||
|
title: intl.formatMessage({
|
||||||
|
id: intlPrefix + '.column.remainingAmount',
|
||||||
|
}),
|
||||||
|
dataIndex: 'remainingAmount',
|
||||||
|
key: 'remainingAmount',
|
||||||
|
valueType: 'money',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: intl.formatMessage({
|
title: intl.formatMessage({
|
||||||
id: intlPrefix + '.column.idCard',
|
id: intlPrefix + '.column.idCard',
|
||||||
@ -137,22 +170,25 @@ export default function OrderSupplierList(props: IOrderSupplierListProps) {
|
|||||||
{
|
{
|
||||||
title: intl.formatMessage({ id: intlPrefix + '.column.purchaseOrder' }),
|
title: intl.formatMessage({ id: intlPrefix + '.column.purchaseOrder' }),
|
||||||
dataIndex: 'purchaseOrderVO',
|
dataIndex: 'purchaseOrderVO',
|
||||||
key: 'poOrderSn',
|
key: 'orderId',
|
||||||
render: (_, record) => {
|
valueType: 'purchaseOrder',
|
||||||
return (
|
|
||||||
<PurchaseOrderList
|
|
||||||
ghost={true}
|
|
||||||
mode={'detail'}
|
|
||||||
orderId={record.purchaseOrderVO.orderId}
|
|
||||||
trigger={() => <a href={'#'}>{record.purchaseOrderVO.orderSn}</a>}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: intl.formatMessage({ id: intlPrefix + '.column.dealerName' }),
|
||||||
|
dataIndex: ['orderVehicle', 'dealerName'],
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: intl.formatMessage({ id: intlPrefix + '.column.vehicleNo' }),
|
||||||
|
dataIndex: ['orderVehicle', 'vehicleNo'],
|
||||||
|
search: false,
|
||||||
|
render: (_, record) => <span>第 {record.orderVehicle.vehicleNo} 车</span>,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: intl.formatMessage({ id: intlPrefix + '.column.orderVehicle' }),
|
title: intl.formatMessage({ id: intlPrefix + '.column.orderVehicle' }),
|
||||||
dataIndex: 'orderVehicle',
|
dataIndex: 'orderVehicle',
|
||||||
key: 'ovVehicleNo',
|
key: 'ovVehicleNo',
|
||||||
|
search: false,
|
||||||
render: (_, record) => {
|
render: (_, record) => {
|
||||||
return (
|
return (
|
||||||
<span>
|
<span>
|
||||||
@ -161,6 +197,11 @@ export default function OrderSupplierList(props: IOrderSupplierListProps) {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: intl.formatMessage({ id: intlPrefix + '.column.deliveryTime' }),
|
||||||
|
dataIndex: ['orderVehicle', 'deliveryTime'],
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: intl.formatMessage({ id: intlPrefix + '.column.orderCompany' }),
|
title: intl.formatMessage({ id: intlPrefix + '.column.orderCompany' }),
|
||||||
dataIndex: 'orderCompany',
|
dataIndex: 'orderCompany',
|
||||||
@ -214,6 +255,9 @@ export default function OrderSupplierList(props: IOrderSupplierListProps) {
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const [selectedRows, setSelectedRows] = useState<
|
||||||
|
BusinessAPI.OrderSupplierVO[]
|
||||||
|
>([]);
|
||||||
const detailColumns: ProDescriptionsItemProps<
|
const detailColumns: ProDescriptionsItemProps<
|
||||||
BusinessAPI.OrderSupplierVO,
|
BusinessAPI.OrderSupplierVO,
|
||||||
BizValueType
|
BizValueType
|
||||||
@ -223,6 +267,7 @@ export default function OrderSupplierList(props: IOrderSupplierListProps) {
|
|||||||
>[];
|
>[];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<>
|
||||||
<BizContainer<
|
<BizContainer<
|
||||||
typeof business.orderSupplier,
|
typeof business.orderSupplier,
|
||||||
BusinessAPI.OrderSupplierVO,
|
BusinessAPI.OrderSupplierVO,
|
||||||
@ -252,6 +297,23 @@ export default function OrderSupplierList(props: IOrderSupplierListProps) {
|
|||||||
}),
|
}),
|
||||||
poStates: ['COMPLETED'],
|
poStates: ['COMPLETED'],
|
||||||
},
|
},
|
||||||
|
rowSelection: {
|
||||||
|
onChange: (_, selectedRows) => setSelectedRows(selectedRows),
|
||||||
|
},
|
||||||
|
tableAlertOptionRender: (props) => {
|
||||||
|
return (
|
||||||
|
<Space>
|
||||||
|
<Button
|
||||||
|
key={'cancel'}
|
||||||
|
type={'link'}
|
||||||
|
onClick={() => props.onCleanSelected()}
|
||||||
|
size={'middle'}
|
||||||
|
>
|
||||||
|
取消选择
|
||||||
|
</Button>
|
||||||
|
</Space>
|
||||||
|
);
|
||||||
|
},
|
||||||
toolbar: {
|
toolbar: {
|
||||||
menu: {
|
menu: {
|
||||||
type: 'tab',
|
type: 'tab',
|
||||||
@ -286,6 +348,73 @@ export default function OrderSupplierList(props: IOrderSupplierListProps) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
columns,
|
columns,
|
||||||
|
options: (orderSupplierVO) => {
|
||||||
|
let btn = [];
|
||||||
|
if (orderSupplierVO.invoiceUpload) {
|
||||||
|
btn.push(
|
||||||
|
<ButtonAccess
|
||||||
|
permission="operation-order-supplier-view-invoice"
|
||||||
|
key="view-invoice"
|
||||||
|
type="link"
|
||||||
|
onClick={() => {
|
||||||
|
setCurrentRecord(orderSupplierVO);
|
||||||
|
setInvoiceVisible(true);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
查看发票
|
||||||
|
</ButtonAccess>,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (orderSupplierVO.wechatQr) {
|
||||||
|
btn.push(
|
||||||
|
<ButtonAccess
|
||||||
|
permission="operation-order-supplier-view-wechat-qr-code"
|
||||||
|
key="wechat-qr-code"
|
||||||
|
type="link"
|
||||||
|
onClick={() => {
|
||||||
|
setCurrentRecord(orderSupplierVO);
|
||||||
|
setWechatQrVisible(true);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
查看微信收款码
|
||||||
|
</ButtonAccess>,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (orderSupplierVO.contractUpload) {
|
||||||
|
btn.push(
|
||||||
|
<ButtonAccess
|
||||||
|
permission="operation-order-supplier-view-contract"
|
||||||
|
key="view-contract"
|
||||||
|
type="link"
|
||||||
|
onClick={() => {
|
||||||
|
setCurrentRecord(orderSupplierVO);
|
||||||
|
setContractVisible(true);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
查看合同
|
||||||
|
</ButtonAccess>,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (orderSupplierVO.isPaid) {
|
||||||
|
btn.push(
|
||||||
|
<ButtonAccess
|
||||||
|
permission="operation-order-supplier-view-payment-voucher"
|
||||||
|
key="payment-voucher"
|
||||||
|
type="link"
|
||||||
|
onClick={() => {
|
||||||
|
setCurrentRecord(orderSupplierVO);
|
||||||
|
setPaymentVoucherVisible(true);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
查看付款凭证
|
||||||
|
</ButtonAccess>,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return btn;
|
||||||
|
},
|
||||||
}}
|
}}
|
||||||
create={false}
|
create={false}
|
||||||
update={false}
|
update={false}
|
||||||
@ -297,5 +426,105 @@ export default function OrderSupplierList(props: IOrderSupplierListProps) {
|
|||||||
trigger,
|
trigger,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
{/* 发票预览Modal */}
|
||||||
|
<Modal
|
||||||
|
title="查看发票"
|
||||||
|
open={invoiceVisible}
|
||||||
|
onCancel={() => setInvoiceVisible(false)}
|
||||||
|
footer={null}
|
||||||
|
width={800}
|
||||||
|
centered
|
||||||
|
>
|
||||||
|
{currentRecord?.invoiceImg && currentRecord.invoiceImg.length > 0 ? (
|
||||||
|
<div className="space-y-4">
|
||||||
|
{currentRecord.invoiceImg.map((item, index) => (
|
||||||
|
<div key={index} className="text-center">
|
||||||
|
<p className="mb-2">发票 {index + 1}</p>
|
||||||
|
<Image
|
||||||
|
width="100%"
|
||||||
|
height={400}
|
||||||
|
src={item.filePath}
|
||||||
|
alt={item.fileName || `发票${index + 1}`}
|
||||||
|
placeholder={<div className="text-gray-400">加载中...</div>}
|
||||||
|
/>
|
||||||
|
<p className="text-sm text-gray-500 mt-2">
|
||||||
|
{item.fileName || `发票${index + 1}`}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<div className="text-center py-8 text-gray-500">暂无发票图片</div>
|
||||||
|
)}
|
||||||
|
</Modal>
|
||||||
|
|
||||||
|
{/* 合同预览Modal */}
|
||||||
|
<Modal
|
||||||
|
title="查看合同"
|
||||||
|
open={contractVisible}
|
||||||
|
onCancel={() => setContractVisible(false)}
|
||||||
|
footer={null}
|
||||||
|
width={800}
|
||||||
|
centered
|
||||||
|
>
|
||||||
|
{currentRecord?.contractImg && currentRecord.contractImg.length > 0 ? (
|
||||||
|
<div className="space-y-4">
|
||||||
|
{currentRecord.contractImg.map((item, index) => (
|
||||||
|
<div key={index} className="text-center">
|
||||||
|
<p className="mb-2">合同 {index + 1}</p>
|
||||||
|
<Image
|
||||||
|
width="100%"
|
||||||
|
height={400}
|
||||||
|
src={item.filePath}
|
||||||
|
alt={item.fileName || `合同${index + 1}`}
|
||||||
|
placeholder={<div className="text-gray-400">加载中...</div>}
|
||||||
|
/>
|
||||||
|
<p className="text-sm text-gray-500 mt-2">
|
||||||
|
{item.fileName || `合同${index + 1}`}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<div className="text-center py-8 text-gray-500">暂无合同图片</div>
|
||||||
|
)}
|
||||||
|
</Modal>
|
||||||
|
|
||||||
|
{/* 微信收款码预览Modal */}
|
||||||
|
<Modal
|
||||||
|
title="查看微信收款码"
|
||||||
|
open={wechatQrVisible}
|
||||||
|
onCancel={() => setWechatQrVisible(false)}
|
||||||
|
footer={null}
|
||||||
|
width={400}
|
||||||
|
centered
|
||||||
|
>
|
||||||
|
{currentRecord?.wechatQr ? (
|
||||||
|
<div className="text-center">
|
||||||
|
<Image
|
||||||
|
width="100%"
|
||||||
|
src={currentRecord.wechatQr}
|
||||||
|
alt="微信收款码"
|
||||||
|
placeholder={<div className="text-gray-400">加载中...</div>}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<div className="text-center py-8 text-gray-500">暂无微信收款码</div>
|
||||||
|
)}
|
||||||
|
</Modal>
|
||||||
|
|
||||||
|
{/* 付款凭证预览Modal */}
|
||||||
|
<Modal
|
||||||
|
title="查看付款凭证"
|
||||||
|
open={paymentVoucherVisible}
|
||||||
|
onCancel={() => setPaymentVoucherVisible(false)}
|
||||||
|
footer={null}
|
||||||
|
width={800}
|
||||||
|
centered
|
||||||
|
>
|
||||||
|
<div className="text-center py-8 text-gray-500">暂无付款凭证图片</div>
|
||||||
|
</Modal>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,62 @@
|
|||||||
|
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'}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -51,6 +51,12 @@ export default function PurchaseOrderList(props: IPurchaseOrderListProps) {
|
|||||||
dataIndex: ['orderVehicle', 'dealerName'],
|
dataIndex: ['orderVehicle', 'dealerName'],
|
||||||
key: 'dealerName',
|
key: 'dealerName',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: intl.formatMessage({ id: intlPrefix + '.column.vehicleNo' }),
|
||||||
|
dataIndex: ['orderVehicle', 'vehicleNo'],
|
||||||
|
key: 'vehicleNo',
|
||||||
|
render: (_, record) => <span>第 {record.orderVehicle.vehicleNo} 车</span>,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: intl.formatMessage({ id: intlPrefix + '.column.plate' }),
|
title: intl.formatMessage({ id: intlPrefix + '.column.plate' }),
|
||||||
dataIndex: ['orderVehicle', 'plate'],
|
dataIndex: ['orderVehicle', 'plate'],
|
||||||
|
|||||||
@ -0,0 +1,342 @@
|
|||||||
|
import { business } from '@/services';
|
||||||
|
import { formatParam } from '@/utils/formatParam';
|
||||||
|
import { pagination } from '@/utils/pagination';
|
||||||
|
import { useIntl } from '@@/exports';
|
||||||
|
import {
|
||||||
|
ActionType,
|
||||||
|
LightFilter,
|
||||||
|
ProColumns,
|
||||||
|
ProFormSelect,
|
||||||
|
} from '@ant-design/pro-components';
|
||||||
|
import { SelectModal } from '@chageable/components';
|
||||||
|
import { Alert, ModalProps, Row, Space, Tag } from 'antd';
|
||||||
|
import React, { useEffect, useRef, useState } from 'react';
|
||||||
|
|
||||||
|
export interface IPurchaseOrderModalProps extends ModalProps {
|
||||||
|
title: string;
|
||||||
|
selectedList?: BusinessAPI.PurchaseOrderVO[];
|
||||||
|
onFinish: (purchaseOrderVOList: BusinessAPI.PurchaseOrderVO[]) => void;
|
||||||
|
type: 'checkbox' | 'radio' | undefined;
|
||||||
|
params?: BusinessAPI.DealerPageQry;
|
||||||
|
num?: number;
|
||||||
|
tips?: string;
|
||||||
|
extraFilter?: React.ReactNode[];
|
||||||
|
extraColumns?: ProColumns<BusinessAPI.PurchaseOrderVO>[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function PurchaseOrderModal(props: IPurchaseOrderModalProps) {
|
||||||
|
const {
|
||||||
|
title,
|
||||||
|
onFinish,
|
||||||
|
type,
|
||||||
|
selectedList,
|
||||||
|
params: initParams,
|
||||||
|
num = 10,
|
||||||
|
tips,
|
||||||
|
extraFilter = [],
|
||||||
|
extraColumns: initExtraColumns = [],
|
||||||
|
...rest
|
||||||
|
} = props;
|
||||||
|
const actionRef = useRef<ActionType>();
|
||||||
|
const sessionKey = `purchaseOrderList`;
|
||||||
|
const intl = useIntl();
|
||||||
|
const intlPrefix = 'purchaseOrder';
|
||||||
|
const [params, setParams] = useState<BusinessAPI.DealerPageQry>(
|
||||||
|
initParams || {},
|
||||||
|
);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (initParams) {
|
||||||
|
setParams({
|
||||||
|
...params,
|
||||||
|
...initParams,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, [initParams]);
|
||||||
|
|
||||||
|
const columns: ProColumns<BusinessAPI.PurchaseOrderVO>[] = [
|
||||||
|
{
|
||||||
|
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.origin' }),
|
||||||
|
dataIndex: ['orderVehicle', 'origin'],
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: intl.formatMessage({ id: intlPrefix + '.column.destination' }),
|
||||||
|
dataIndex: ['orderVehicle', 'destination'],
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: intl.formatMessage({ id: intlPrefix + '.column.dealerName' }),
|
||||||
|
dataIndex: ['orderVehicle', 'dealerName'],
|
||||||
|
key: 'dealerName',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: intl.formatMessage({ id: intlPrefix + '.column.plate' }),
|
||||||
|
dataIndex: ['orderVehicle', 'plate'],
|
||||||
|
key: 'plate',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: intl.formatMessage({ id: intlPrefix + '.column.driver' }),
|
||||||
|
dataIndex: ['orderVehicle', 'driver'],
|
||||||
|
key: 'driver',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: intl.formatMessage({ id: intlPrefix + '.column.phone' }),
|
||||||
|
dataIndex: ['orderVehicle', 'phone'],
|
||||||
|
key: 'phone',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: intl.formatMessage({ id: intlPrefix + '.column.state' }),
|
||||||
|
dataIndex: 'state',
|
||||||
|
key: 'state',
|
||||||
|
valueType: 'select',
|
||||||
|
render: (_, record) => {
|
||||||
|
const stateText = intl.formatMessage({
|
||||||
|
id: `${intlPrefix}.column.state.${record.state?.toLowerCase() || 'unknown'}`,
|
||||||
|
});
|
||||||
|
|
||||||
|
let color = 'default';
|
||||||
|
switch (record.state) {
|
||||||
|
case 'DRAFT':
|
||||||
|
color = 'default';
|
||||||
|
break;
|
||||||
|
case 'WAITING_AUDIT':
|
||||||
|
color = 'processing';
|
||||||
|
break;
|
||||||
|
case 'COMPLETED':
|
||||||
|
color = 'success';
|
||||||
|
break;
|
||||||
|
case 'REJECTED':
|
||||||
|
color = 'error';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
color = 'default';
|
||||||
|
}
|
||||||
|
|
||||||
|
return <Tag color={color}>{stateText}</Tag>;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
...(initExtraColumns || []),
|
||||||
|
];
|
||||||
|
|
||||||
|
function setDealerVOStorage(purchaseOrderVO: BusinessAPI.PurchaseOrderVO) {
|
||||||
|
const localPurchaseOrderList = localStorage.getItem(sessionKey);
|
||||||
|
const purchaseOrderList = localPurchaseOrderList
|
||||||
|
? JSON.parse(localPurchaseOrderList)
|
||||||
|
: [];
|
||||||
|
purchaseOrderList.forEach(
|
||||||
|
(item: BusinessAPI.PurchaseOrderVO, index: number) => {
|
||||||
|
if (item.orderId === purchaseOrderVO.orderId) {
|
||||||
|
purchaseOrderList.splice(index, 1);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
);
|
||||||
|
if (purchaseOrderList.length < 5) {
|
||||||
|
purchaseOrderList.unshift(purchaseOrderVO);
|
||||||
|
localStorage.setItem(sessionKey, JSON.stringify(purchaseOrderList));
|
||||||
|
} else {
|
||||||
|
purchaseOrderList.pop();
|
||||||
|
purchaseOrderList.unshift(purchaseOrderVO);
|
||||||
|
localStorage.setItem(sessionKey, JSON.stringify(purchaseOrderList));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<SelectModal<BusinessAPI.PurchaseOrderVO, BusinessAPI.PurchaseOrderPageQry>
|
||||||
|
rowKey={'orderId'}
|
||||||
|
modalProps={{
|
||||||
|
title: title || '选择采购单',
|
||||||
|
...rest,
|
||||||
|
destroyOnHidden: true,
|
||||||
|
afterOpenChange: (open) => {
|
||||||
|
if (!open) {
|
||||||
|
setParams({
|
||||||
|
...initParams,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
selectedList={selectedList}
|
||||||
|
tableProps={{
|
||||||
|
rowKey: 'orderId',
|
||||||
|
columns: columns,
|
||||||
|
columnsState: {
|
||||||
|
persistenceType: 'sessionStorage',
|
||||||
|
persistenceKey: 'purchaseOrderModalColumnStateKey',
|
||||||
|
},
|
||||||
|
params: {
|
||||||
|
...params,
|
||||||
|
},
|
||||||
|
request: async (params, sorter, filter) => {
|
||||||
|
const { data, success, totalCount } =
|
||||||
|
await business.purchaseOrder.pagePurchaseOrder({
|
||||||
|
purchaseOrderPageQry: formatParam<typeof params>(
|
||||||
|
params,
|
||||||
|
sorter,
|
||||||
|
filter,
|
||||||
|
),
|
||||||
|
});
|
||||||
|
|
||||||
|
return {
|
||||||
|
data: data || [],
|
||||||
|
total: totalCount,
|
||||||
|
success,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
pagination: {
|
||||||
|
...pagination(),
|
||||||
|
position: ['bottomRight'],
|
||||||
|
},
|
||||||
|
tableAlertRender: ({ selectedRowKeys, selectedRows }) => {
|
||||||
|
// selectedRows 和 selectedList 组合在一起,去重,
|
||||||
|
const selectedRowsMap = new Map<
|
||||||
|
string,
|
||||||
|
BusinessAPI.PurchaseOrderVO
|
||||||
|
>();
|
||||||
|
selectedRows.forEach((item: BusinessAPI.PurchaseOrderVO) => {
|
||||||
|
if (item) {
|
||||||
|
if (!selectedRowsMap.has(item.orderId)) {
|
||||||
|
selectedRowsMap.set(item.orderId, item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
selectedList?.forEach((item: BusinessAPI.PurchaseOrderVO) => {
|
||||||
|
if (!selectedRowsMap.has(item.orderId)) {
|
||||||
|
selectedRowsMap.set(item.orderId, item);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
let selectedTempList: BusinessAPI.PurchaseOrderVO[] = [];
|
||||||
|
selectedRowsMap.forEach((item: BusinessAPI.PurchaseOrderVO) => {
|
||||||
|
if (selectedRowKeys.includes(item.orderId)) {
|
||||||
|
selectedTempList.push(item);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return (
|
||||||
|
<Space size={12}>
|
||||||
|
<span>已选 {selectedRowKeys.length} 项</span>
|
||||||
|
<Space wrap={true}>
|
||||||
|
{selectedTempList?.map((item: BusinessAPI.PurchaseOrderVO) => {
|
||||||
|
return item && <span key={item.orderId}>{item.orderSn}</span>;
|
||||||
|
})}
|
||||||
|
</Space>
|
||||||
|
</Space>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
...(tips && {
|
||||||
|
tableExtraRender: () => {
|
||||||
|
return tips && <Alert type={'info'} message={tips} />;
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
...(type === 'radio' && {
|
||||||
|
tableExtraRender: () => {
|
||||||
|
const localDealerList = localStorage.getItem(sessionKey);
|
||||||
|
if (localDealerList) {
|
||||||
|
const dealerList = JSON.parse(localDealerList);
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
{tips && <Alert type={'info'} message={tips} />}
|
||||||
|
<Row gutter={16}>
|
||||||
|
{dealerList.map((item: BusinessAPI.PurchaseOrderVO) => {
|
||||||
|
return (
|
||||||
|
<Tag
|
||||||
|
style={{
|
||||||
|
cursor: 'pointer',
|
||||||
|
}}
|
||||||
|
onClick={async () => {
|
||||||
|
const { data: purchaseOrderVO } =
|
||||||
|
await business.purchaseOrder.showPurchaseOrder({
|
||||||
|
purchaseOrderShowQry: {
|
||||||
|
orderId: item.orderId,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
if (purchaseOrderVO) {
|
||||||
|
onFinish([purchaseOrderVO]);
|
||||||
|
setDealerVOStorage(purchaseOrderVO);
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
key={item.orderId}
|
||||||
|
>
|
||||||
|
{item.orderSn}
|
||||||
|
</Tag>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</Row>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
actionRef: actionRef,
|
||||||
|
toolbar: {
|
||||||
|
filter: (
|
||||||
|
<LightFilter
|
||||||
|
onFinish={async (values) => {
|
||||||
|
setParams({
|
||||||
|
...initParams,
|
||||||
|
...values,
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{extraFilter}
|
||||||
|
<ProFormSelect
|
||||||
|
label={'采购单状态'}
|
||||||
|
name={'state'}
|
||||||
|
placeholder={'请选择采购单状态'}
|
||||||
|
valueEnum={{
|
||||||
|
DRAFT: intl.formatMessage({
|
||||||
|
id: intlPrefix + '.column.state.draft',
|
||||||
|
}),
|
||||||
|
WAITING_AUDIT: intl.formatMessage({
|
||||||
|
id: intlPrefix + '.column.state.waiting_audit',
|
||||||
|
}),
|
||||||
|
COMPLETED: intl.formatMessage({
|
||||||
|
id: intlPrefix + '.column.state.completed',
|
||||||
|
}),
|
||||||
|
REJECTED: intl.formatMessage({
|
||||||
|
id: intlPrefix + '.column.state.rejected',
|
||||||
|
}),
|
||||||
|
CLOSED: intl.formatMessage({
|
||||||
|
id: intlPrefix + '.column.state.closed',
|
||||||
|
}),
|
||||||
|
}}
|
||||||
|
fieldProps={{
|
||||||
|
showSearch: true,
|
||||||
|
allowClear: true,
|
||||||
|
autoClearSearchValue: true,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</LightFilter>
|
||||||
|
),
|
||||||
|
search: {
|
||||||
|
placeholder: '请输入采购单编号',
|
||||||
|
onSearch: async (value: string) => {
|
||||||
|
setParams({
|
||||||
|
...params,
|
||||||
|
//@ts-ignore
|
||||||
|
orderSn: value,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
onFinish={(dealerVOList) => {
|
||||||
|
if (type === 'radio') {
|
||||||
|
if (dealerVOList.length > 0) {
|
||||||
|
setDealerVOStorage(dealerVOList[0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onFinish(dealerVOList);
|
||||||
|
}}
|
||||||
|
num={num}
|
||||||
|
type={type}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -0,0 +1,66 @@
|
|||||||
|
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'}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -0,0 +1,57 @@
|
|||||||
|
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,3 +1,9 @@
|
|||||||
export { default as PurchaseOrderList } from './PurchaseOrderList';
|
export { default as PurchaseOrderList } from './PurchaseOrderList';
|
||||||
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 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';
|
||||||
|
|||||||
@ -1930,18 +1930,6 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
form: {
|
|
||||||
userId: {
|
|
||||||
label: '操作用户',
|
|
||||||
placeholder: '请选择操作用户',
|
|
||||||
required: '操作用户为必填项',
|
|
||||||
},
|
|
||||||
dealerId: {
|
|
||||||
label: '操作经销商',
|
|
||||||
placeholder: '请选择操作经销商',
|
|
||||||
required: '操作经销商为必填项',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
productData: {
|
productData: {
|
||||||
module: {
|
module: {
|
||||||
costItem: '项目模块',
|
costItem: '项目模块',
|
||||||
@ -2054,6 +2042,7 @@ export default {
|
|||||||
plate: '车牌号',
|
plate: '车牌号',
|
||||||
deliveryTime: '采购日期',
|
deliveryTime: '采购日期',
|
||||||
dealerName: '经销商名称',
|
dealerName: '经销商名称',
|
||||||
|
vehicleNo: '车次号',
|
||||||
frameInfo: '瓜农信息',
|
frameInfo: '瓜农信息',
|
||||||
origin: '发货地',
|
origin: '发货地',
|
||||||
destination: '收货地',
|
destination: '收货地',
|
||||||
@ -2160,9 +2149,15 @@ export default {
|
|||||||
idCard: '瓜农身份证',
|
idCard: '瓜农身份证',
|
||||||
phone: '瓜农手机号',
|
phone: '瓜农手机号',
|
||||||
bankCard: '瓜农银行卡号',
|
bankCard: '瓜农银行卡号',
|
||||||
|
invoiceAmount: '应开发票金额(元)',
|
||||||
|
depositAmount: '已付定金(元)',
|
||||||
|
remainingAmount: '剩余付款金额(元)',
|
||||||
purchaseOrder: '关联采购单',
|
purchaseOrder: '关联采购单',
|
||||||
orderVehicle: '关联车辆',
|
deliveryTime: '采购日期',
|
||||||
orderCompany: '所属公司',
|
dealerName: '经销商名称',
|
||||||
|
vehicleNo: '车次号',
|
||||||
|
orderVehicle: '运输路线',
|
||||||
|
orderCompany: '销售公司',
|
||||||
isPaid: '是否付款',
|
isPaid: '是否付款',
|
||||||
'isPaid.paid': '已付款',
|
'isPaid.paid': '已付款',
|
||||||
'isPaid.unpaid': '待付款',
|
'isPaid.unpaid': '待付款',
|
||||||
@ -2221,31 +2216,118 @@ export default {
|
|||||||
createdAt: '创建时间',
|
createdAt: '创建时间',
|
||||||
option: '操作',
|
option: '操作',
|
||||||
},
|
},
|
||||||
|
form: {
|
||||||
|
costId: {
|
||||||
|
label: '费用类型',
|
||||||
|
placeholder: '请选择费用类型',
|
||||||
|
required: '请选择费用类型',
|
||||||
|
},
|
||||||
|
driver: {
|
||||||
|
label: '司机',
|
||||||
|
placeholder: '请输入司机',
|
||||||
|
required: '请输入司机',
|
||||||
|
},
|
||||||
|
price: {
|
||||||
|
label: '费用',
|
||||||
|
placeholder: '请输入费用',
|
||||||
|
required: '请输入费用',
|
||||||
|
},
|
||||||
|
},
|
||||||
modal: {
|
modal: {
|
||||||
create: {
|
create: {
|
||||||
title: '创建订单成本费用',
|
title: '补录费用',
|
||||||
button: '创建订单成本费用',
|
button: '补录费用',
|
||||||
success: '创建订单成本费用成功',
|
success: '补录费用成功',
|
||||||
},
|
},
|
||||||
update: {
|
update: {
|
||||||
title: '更新订单成本费用',
|
title: '更新费用',
|
||||||
button: '编辑',
|
button: '编辑',
|
||||||
success: '更新订单成本费用成功',
|
success: '更新费用成功',
|
||||||
},
|
},
|
||||||
delete: {
|
delete: {
|
||||||
success: '删除订单成本费用成功',
|
success: '删除费用成功',
|
||||||
button: '删除',
|
button: '删除',
|
||||||
confirm: {
|
confirm: {
|
||||||
title: '确认删除',
|
title: '确认删除',
|
||||||
content: '您确定要删除该订单成本费用吗?',
|
content: '您确定要删除该费用吗?',
|
||||||
okText: '确定',
|
okText: '确定',
|
||||||
cancelText: '取消',
|
cancelText: '取消',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
view: {
|
view: {
|
||||||
title: '查看订单成本费用',
|
title: '查看费用',
|
||||||
button: '详情',
|
button: '详情',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
orderRebate: {
|
||||||
|
tab: {
|
||||||
|
all: '全部',
|
||||||
|
paid: '已付款',
|
||||||
|
unpaid: '待付款',
|
||||||
|
},
|
||||||
|
column: {
|
||||||
|
name: '收款方名称',
|
||||||
|
amount: '待付款金额',
|
||||||
|
calcMethod: '返点方式',
|
||||||
|
'calcMethod.fixedAmount': '固定模式',
|
||||||
|
'calcMethod.netWeight': '净重模式',
|
||||||
|
'calcMethod.notFixed': '不固定模式',
|
||||||
|
netWeight: '净重(斤)',
|
||||||
|
unitPrice: '单价(元/斤)',
|
||||||
|
purchaseOrder: '关联采购单',
|
||||||
|
orderVehicle: '关联车辆',
|
||||||
|
orderCompany: '所属公司',
|
||||||
|
isPaid: '是否付款',
|
||||||
|
'isPaid.paid': '已付款',
|
||||||
|
'isPaid.unpaid': '待付款',
|
||||||
|
paidAt: '付款时间',
|
||||||
|
createdAt: '创建时间',
|
||||||
|
option: '操作',
|
||||||
|
},
|
||||||
|
modal: {
|
||||||
|
create: {
|
||||||
|
title: '创建订单返点费用',
|
||||||
|
button: '创建订单返点费用',
|
||||||
|
success: '创建订单返点费用成功',
|
||||||
|
},
|
||||||
|
update: {
|
||||||
|
title: '更新订单返点费用',
|
||||||
|
button: '编辑',
|
||||||
|
success: '更新订单返点费用成功',
|
||||||
|
},
|
||||||
|
delete: {
|
||||||
|
success: '删除订单返点费用成功',
|
||||||
|
button: '删除',
|
||||||
|
confirm: {
|
||||||
|
title: '确认删除',
|
||||||
|
content: '您确定要删除该订单返点费用吗?',
|
||||||
|
okText: '确定',
|
||||||
|
cancelText: '取消',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
view: {
|
||||||
|
title: '查看订单返点费用',
|
||||||
|
button: '详情',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
form: {
|
||||||
|
orderId: {
|
||||||
|
label: '采购单',
|
||||||
|
placeholder: '请选择关联采购单',
|
||||||
|
required: '关联采购单为必选项',
|
||||||
|
},
|
||||||
|
userId: {
|
||||||
|
label: '操作用户',
|
||||||
|
placeholder: '请选择操作用户',
|
||||||
|
required: '操作用户为必填项',
|
||||||
|
},
|
||||||
|
dealerId: {
|
||||||
|
label: '操作经销商',
|
||||||
|
placeholder: '请选择操作经销商',
|
||||||
|
required: '操作经销商为必填项',
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { MelonFarmerList } from '@/components';
|
import { OrderRebateList } from '@/components';
|
||||||
|
|
||||||
export default function Page() {
|
export default function Page() {
|
||||||
return <MelonFarmerList />;
|
return <OrderRebateList />;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,6 +23,7 @@ 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 orderCost from './orderCost';
|
import * as orderCost from './orderCost';
|
||||||
|
import * as orderRebate from './orderRebate';
|
||||||
import * as orderShip from './orderShip';
|
import * as orderShip from './orderShip';
|
||||||
import * as orderSupplier from './orderSupplier';
|
import * as orderSupplier from './orderSupplier';
|
||||||
import * as permission from './permission';
|
import * as permission from './permission';
|
||||||
@ -66,4 +67,5 @@ export default {
|
|||||||
permission,
|
permission,
|
||||||
extraction,
|
extraction,
|
||||||
orderCost,
|
orderCost,
|
||||||
|
orderRebate,
|
||||||
};
|
};
|
||||||
|
|||||||
@ -2,6 +2,24 @@
|
|||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
import request from '../request';
|
import request from '../request';
|
||||||
|
|
||||||
|
/** 创建订单成本项 POST /operation/createOrderCost */
|
||||||
|
export async function createOrderCost(
|
||||||
|
body: BusinessAPI.OrderCostCreateCmd,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.SingleResponseOrderCostVO>(
|
||||||
|
'/operation/createOrderCost',
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/** 订单成本项列表 GET /operation/pageOrderCost */
|
/** 订单成本项列表 GET /operation/pageOrderCost */
|
||||||
export async function pageOrderCost(
|
export async function pageOrderCost(
|
||||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
|||||||
23
packages/app-operation/src/services/business/orderRebate.ts
Normal file
23
packages/app-operation/src/services/business/orderRebate.ts
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
// @ts-ignore
|
||||||
|
/* eslint-disable */
|
||||||
|
import request from '../request';
|
||||||
|
|
||||||
|
/** 订单返点列表 GET /operation/pageOrderRebate */
|
||||||
|
export async function pageOrderRebate(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: BusinessAPI.pageOrderRebateParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.PageResponseOrderRebateVO>(
|
||||||
|
'/operation/pageOrderRebate',
|
||||||
|
{
|
||||||
|
method: 'GET',
|
||||||
|
params: {
|
||||||
|
...params,
|
||||||
|
orderRebatePageQry: undefined,
|
||||||
|
...params['orderRebatePageQry'],
|
||||||
|
},
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -104,7 +104,7 @@ declare namespace BusinessAPI {
|
|||||||
/** 品牌图片URL */
|
/** 品牌图片URL */
|
||||||
image?: string;
|
image?: string;
|
||||||
/** 纸箱规格ID */
|
/** 纸箱规格ID */
|
||||||
specIds?: string[];
|
specIds?: number[];
|
||||||
/** 备注 */
|
/** 备注 */
|
||||||
remark?: string;
|
remark?: string;
|
||||||
/** 状态:1_启用;0_禁用 */
|
/** 状态:1_启用;0_禁用 */
|
||||||
@ -175,7 +175,7 @@ declare namespace BusinessAPI {
|
|||||||
/** 品牌图片URL */
|
/** 品牌图片URL */
|
||||||
image?: string;
|
image?: string;
|
||||||
/** 纸箱规格ID */
|
/** 纸箱规格ID */
|
||||||
specIds?: string[];
|
specIds?: number[];
|
||||||
/** 备注 */
|
/** 备注 */
|
||||||
remark?: string;
|
remark?: string;
|
||||||
/** 状态:1_启用;0_禁用 */
|
/** 状态:1_启用;0_禁用 */
|
||||||
@ -192,7 +192,7 @@ declare namespace BusinessAPI {
|
|||||||
/** 品牌图片URL */
|
/** 品牌图片URL */
|
||||||
image?: string;
|
image?: string;
|
||||||
/** 纸箱规格ID */
|
/** 纸箱规格ID */
|
||||||
specIds?: string[];
|
specIds?: number[];
|
||||||
/** 备注 */
|
/** 备注 */
|
||||||
remark?: string;
|
remark?: string;
|
||||||
/** 状态:1_启用;0_禁用 */
|
/** 状态:1_启用;0_禁用 */
|
||||||
@ -914,7 +914,7 @@ declare namespace BusinessAPI {
|
|||||||
/** 状态:1_启用;0_禁用 */
|
/** 状态:1_启用;0_禁用 */
|
||||||
status: boolean;
|
status: boolean;
|
||||||
/** 成本项ID */
|
/** 成本项ID */
|
||||||
costItemIds?: string[];
|
costItemIds?: number[];
|
||||||
};
|
};
|
||||||
|
|
||||||
type CostDestroyCmd = {
|
type CostDestroyCmd = {
|
||||||
@ -1135,7 +1135,7 @@ declare namespace BusinessAPI {
|
|||||||
/** 状态:1_启用;0_禁用 */
|
/** 状态:1_启用;0_禁用 */
|
||||||
status: boolean;
|
status: boolean;
|
||||||
/** 成本项ID */
|
/** 成本项ID */
|
||||||
costItemIds?: string[];
|
costItemIds?: number[];
|
||||||
};
|
};
|
||||||
|
|
||||||
type CostVO = {
|
type CostVO = {
|
||||||
@ -1163,7 +1163,7 @@ declare namespace BusinessAPI {
|
|||||||
/** 状态:1_启用;0_禁用 */
|
/** 状态:1_启用;0_禁用 */
|
||||||
status: boolean;
|
status: boolean;
|
||||||
/** 项目id集合 */
|
/** 项目id集合 */
|
||||||
costItemIds?: string[];
|
costItemIds?: number[];
|
||||||
/** 创建时间 */
|
/** 创建时间 */
|
||||||
createdAt?: string;
|
createdAt?: string;
|
||||||
/** 项目列表 */
|
/** 项目列表 */
|
||||||
@ -1844,7 +1844,7 @@ declare namespace BusinessAPI {
|
|||||||
/** 登录密码 */
|
/** 登录密码 */
|
||||||
password: string;
|
password: string;
|
||||||
/** 角色ID */
|
/** 角色ID */
|
||||||
roleId: string[];
|
roleId: number[];
|
||||||
};
|
};
|
||||||
|
|
||||||
type EmployeeDestroyCmd = {
|
type EmployeeDestroyCmd = {
|
||||||
@ -1937,7 +1937,7 @@ declare namespace BusinessAPI {
|
|||||||
/** 用户ID */
|
/** 用户ID */
|
||||||
userId: string;
|
userId: string;
|
||||||
/** 角色ID */
|
/** 角色ID */
|
||||||
roleIdList: string[];
|
roleIdList: number[];
|
||||||
/** 角色信息 */
|
/** 角色信息 */
|
||||||
userRoleList?: UserRoleVO[];
|
userRoleList?: UserRoleVO[];
|
||||||
};
|
};
|
||||||
@ -2263,7 +2263,7 @@ declare namespace BusinessAPI {
|
|||||||
/** 平台id */
|
/** 平台id */
|
||||||
platformId: string;
|
platformId: string;
|
||||||
/** 角色Id */
|
/** 角色Id */
|
||||||
roleId?: string[];
|
roleId?: number[];
|
||||||
/** 是否隐藏 */
|
/** 是否隐藏 */
|
||||||
hideInMenu?: boolean;
|
hideInMenu?: boolean;
|
||||||
/** 权限Id */
|
/** 权限Id */
|
||||||
@ -2336,7 +2336,7 @@ declare namespace BusinessAPI {
|
|||||||
/** 平台id */
|
/** 平台id */
|
||||||
platformId: string;
|
platformId: string;
|
||||||
/** 角色Id */
|
/** 角色Id */
|
||||||
roleId?: string[];
|
roleId?: number[];
|
||||||
/** 是否隐藏 */
|
/** 是否隐藏 */
|
||||||
hideInMenu?: boolean;
|
hideInMenu?: boolean;
|
||||||
/** 权限Id */
|
/** 权限Id */
|
||||||
@ -2680,9 +2680,45 @@ declare namespace BusinessAPI {
|
|||||||
| 'OTHER_TYPE'
|
| 'OTHER_TYPE'
|
||||||
| 'LOGISTICS_TYPE';
|
| 'LOGISTICS_TYPE';
|
||||||
/** 关联项目id */
|
/** 关联项目id */
|
||||||
costItemIds?: string[];
|
costItemIds?: number[];
|
||||||
/** 是否选中 */
|
/** 是否选中 */
|
||||||
selected: boolean;
|
selected: boolean;
|
||||||
|
/** 是否已付款 */
|
||||||
|
isPaid?: boolean;
|
||||||
|
};
|
||||||
|
|
||||||
|
type OrderCostCreateCmd = {
|
||||||
|
/** 订单ID */
|
||||||
|
orderId?: string;
|
||||||
|
/** 费用Id */
|
||||||
|
costId: string;
|
||||||
|
/** 成本项目名称 */
|
||||||
|
name: string;
|
||||||
|
/** 单价 */
|
||||||
|
price: number;
|
||||||
|
/** 单位 */
|
||||||
|
unit: string;
|
||||||
|
/** 数量 */
|
||||||
|
count: number;
|
||||||
|
/** 费用归属:0_无归属;1_工头;2_产地;3_司机; */
|
||||||
|
belong?:
|
||||||
|
| 'NONE_TYPE'
|
||||||
|
| 'WORKER_TYPE'
|
||||||
|
| 'PRODUCTION_TYPE'
|
||||||
|
| 'DRIVER_TYPE';
|
||||||
|
/** 负责人 */
|
||||||
|
principal?: string;
|
||||||
|
/** 费用类型:1_辅料类型;2_人工类型;3_产地类型;4_其他类型;5_物流类型 */
|
||||||
|
type:
|
||||||
|
| 'MATERIAL_TYPE'
|
||||||
|
| 'ARTIFICIAL_TYPE'
|
||||||
|
| 'PRODUCTION_TYPE'
|
||||||
|
| 'OTHER_TYPE'
|
||||||
|
| 'LOGISTICS_TYPE';
|
||||||
|
/** 关联项目id */
|
||||||
|
costItemIds?: number[];
|
||||||
|
/** 是否付款 */
|
||||||
|
isPaid?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
type OrderCostItem = {
|
type OrderCostItem = {
|
||||||
@ -2782,7 +2818,7 @@ declare namespace BusinessAPI {
|
|||||||
| 'OTHER_TYPE'
|
| 'OTHER_TYPE'
|
||||||
| 'LOGISTICS_TYPE';
|
| 'LOGISTICS_TYPE';
|
||||||
/** 关联项目id */
|
/** 关联项目id */
|
||||||
costItemIds?: string[];
|
costItemIds?: number[];
|
||||||
/** 创建时间 */
|
/** 创建时间 */
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
/** 车辆信息 */
|
/** 车辆信息 */
|
||||||
@ -2901,6 +2937,76 @@ declare namespace BusinessAPI {
|
|||||||
unitPrice?: number;
|
unitPrice?: number;
|
||||||
/** 返点金额 */
|
/** 返点金额 */
|
||||||
amount?: number;
|
amount?: number;
|
||||||
|
/** 是否已付款 */
|
||||||
|
isPaid?: boolean;
|
||||||
|
};
|
||||||
|
|
||||||
|
type OrderRebatePageQry = {
|
||||||
|
pageSize?: number;
|
||||||
|
pageIndex?: number;
|
||||||
|
orderBy?: string;
|
||||||
|
orderDirection?: string;
|
||||||
|
groupBy?: string;
|
||||||
|
needTotalCount?: boolean;
|
||||||
|
/** 自定义字段key */
|
||||||
|
customFieldKey?: string;
|
||||||
|
/** 自定义字段value */
|
||||||
|
customFieldValue?: string;
|
||||||
|
/** 备注 */
|
||||||
|
remark?: string;
|
||||||
|
/** 状态:1_启用;0_禁用; */
|
||||||
|
status?: boolean;
|
||||||
|
/** 订单ID */
|
||||||
|
orderId?: string;
|
||||||
|
/** 订单状态 */
|
||||||
|
poStates?: (
|
||||||
|
| 'DRAFT'
|
||||||
|
| 'WAITING_AUDIT'
|
||||||
|
| 'COMPLETED'
|
||||||
|
| 'REJECTED'
|
||||||
|
| 'CLOSED'
|
||||||
|
)[];
|
||||||
|
/** 是否支付 */
|
||||||
|
isPaid?: boolean;
|
||||||
|
offset?: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type OrderRebateVO = {
|
||||||
|
/** 记录ID */
|
||||||
|
orderRebateId?: string;
|
||||||
|
/** 订单ID */
|
||||||
|
orderId?: string;
|
||||||
|
/** 客户ID */
|
||||||
|
customerId?: string;
|
||||||
|
/** 经销商ID */
|
||||||
|
dealerId?: string;
|
||||||
|
/** 客户名称 */
|
||||||
|
name?: string;
|
||||||
|
/** 返点计算方式:1_按净重计算;2_固定金额; */
|
||||||
|
calcMethod?: 'NET_WEIGHT' | 'FIXED_AMOUNT';
|
||||||
|
/** 返点净重 */
|
||||||
|
netWeight?: number;
|
||||||
|
/** 返点单价 */
|
||||||
|
unitPrice?: number;
|
||||||
|
/** 返点金额 */
|
||||||
|
amount?: number;
|
||||||
|
/** 创建时间 */
|
||||||
|
createdAt: string;
|
||||||
|
/** 车辆信息 */
|
||||||
|
orderVehicle: OrderVehicle;
|
||||||
|
/** 采购订单状态: 0_草稿;1_审核中;2_已完成;3_已驳回;4_已关闭; */
|
||||||
|
poState?:
|
||||||
|
| 'DRAFT'
|
||||||
|
| 'WAITING_AUDIT'
|
||||||
|
| 'COMPLETED'
|
||||||
|
| 'REJECTED'
|
||||||
|
| 'CLOSED';
|
||||||
|
/** 公司信息 */
|
||||||
|
orderCompany: OrderCompany;
|
||||||
|
/** 采购订单信息 */
|
||||||
|
purchaseOrderVO: PurchaseOrderVO;
|
||||||
|
/** 是否付款 */
|
||||||
|
isPaid?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
type OrderShip = {
|
type OrderShip = {
|
||||||
@ -3224,7 +3330,7 @@ declare namespace BusinessAPI {
|
|||||||
/** 产品名称 */
|
/** 产品名称 */
|
||||||
productName?: string;
|
productName?: string;
|
||||||
/** 关联费用id */
|
/** 关联费用id */
|
||||||
costIds?: string[];
|
costIds?: number[];
|
||||||
/** 成本模板 */
|
/** 成本模板 */
|
||||||
costTemplate?: string;
|
costTemplate?: string;
|
||||||
/** 是否已付定金 */
|
/** 是否已付定金 */
|
||||||
@ -3254,7 +3360,7 @@ declare namespace BusinessAPI {
|
|||||||
|
|
||||||
type OrderSupplierBatchInvoiceUploadCmd = {
|
type OrderSupplierBatchInvoiceUploadCmd = {
|
||||||
/** 供应商ID列表 */
|
/** 供应商ID列表 */
|
||||||
orderSupplierIdList: string[];
|
orderSupplierIdList: number[];
|
||||||
/** 是否上传票证 */
|
/** 是否上传票证 */
|
||||||
invoiceUpload?: boolean;
|
invoiceUpload?: boolean;
|
||||||
/** 发票照片 */
|
/** 发票照片 */
|
||||||
@ -3512,6 +3618,10 @@ declare namespace BusinessAPI {
|
|||||||
orderCostPageQry: OrderCostPageQry;
|
orderCostPageQry: OrderCostPageQry;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
type pageOrderRebateParams = {
|
||||||
|
orderRebatePageQry: OrderRebatePageQry;
|
||||||
|
};
|
||||||
|
|
||||||
type pageOrderShipParams = {
|
type pageOrderShipParams = {
|
||||||
orderShipPageQry: OrderShipPageQry;
|
orderShipPageQry: OrderShipPageQry;
|
||||||
};
|
};
|
||||||
@ -3770,6 +3880,19 @@ declare namespace BusinessAPI {
|
|||||||
totalPages?: number;
|
totalPages?: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
type PageResponseOrderRebateVO = {
|
||||||
|
success?: boolean;
|
||||||
|
errCode?: string;
|
||||||
|
errMessage?: string;
|
||||||
|
totalCount?: number;
|
||||||
|
pageSize?: number;
|
||||||
|
pageIndex?: number;
|
||||||
|
data?: OrderRebateVO[];
|
||||||
|
empty?: boolean;
|
||||||
|
notEmpty?: boolean;
|
||||||
|
totalPages?: number;
|
||||||
|
};
|
||||||
|
|
||||||
type PageResponseOrderShipVO = {
|
type PageResponseOrderShipVO = {
|
||||||
success?: boolean;
|
success?: boolean;
|
||||||
errCode?: string;
|
errCode?: string;
|
||||||
@ -4005,7 +4128,7 @@ declare namespace BusinessAPI {
|
|||||||
/** 产品名称 */
|
/** 产品名称 */
|
||||||
name: string;
|
name: string;
|
||||||
/** 关联成本费用id */
|
/** 关联成本费用id */
|
||||||
costIds?: string[];
|
costIds?: number[];
|
||||||
/** 成本模板 */
|
/** 成本模板 */
|
||||||
costTemplate?: string;
|
costTemplate?: string;
|
||||||
/** 备注 */
|
/** 备注 */
|
||||||
@ -4072,7 +4195,7 @@ declare namespace BusinessAPI {
|
|||||||
/** 产品名称 */
|
/** 产品名称 */
|
||||||
name: string;
|
name: string;
|
||||||
/** 关联成本费用id */
|
/** 关联成本费用id */
|
||||||
costIds?: string[];
|
costIds?: number[];
|
||||||
/** 成本模板 */
|
/** 成本模板 */
|
||||||
costTemplate?: string;
|
costTemplate?: string;
|
||||||
/** 备注 */
|
/** 备注 */
|
||||||
@ -4097,7 +4220,7 @@ declare namespace BusinessAPI {
|
|||||||
/** 状态:1_启用;0_禁用 */
|
/** 状态:1_启用;0_禁用 */
|
||||||
status: boolean;
|
status: boolean;
|
||||||
/** 成本ID集合 */
|
/** 成本ID集合 */
|
||||||
costIds?: string[];
|
costIds?: number[];
|
||||||
/** 成本费用 */
|
/** 成本费用 */
|
||||||
costVOList?: CostVO[];
|
costVOList?: CostVO[];
|
||||||
/** 成本模板 */
|
/** 成本模板 */
|
||||||
@ -4400,7 +4523,7 @@ declare namespace BusinessAPI {
|
|||||||
/** 角色详情 */
|
/** 角色详情 */
|
||||||
description?: string;
|
description?: string;
|
||||||
/** 角色id */
|
/** 角色id */
|
||||||
menuId: string[];
|
menuId: number[];
|
||||||
};
|
};
|
||||||
|
|
||||||
type RoleDestroyCmd = {
|
type RoleDestroyCmd = {
|
||||||
@ -4422,7 +4545,7 @@ declare namespace BusinessAPI {
|
|||||||
/** 角色编号 */
|
/** 角色编号 */
|
||||||
roleId?: string;
|
roleId?: string;
|
||||||
/** 应用角色Id */
|
/** 应用角色Id */
|
||||||
roleIdList?: string[];
|
roleIdList?: number[];
|
||||||
/** 平台Id */
|
/** 平台Id */
|
||||||
platformId?: string;
|
platformId?: string;
|
||||||
/** 平台Id */
|
/** 平台Id */
|
||||||
@ -4469,7 +4592,7 @@ declare namespace BusinessAPI {
|
|||||||
/** 角色详情 */
|
/** 角色详情 */
|
||||||
description?: string;
|
description?: string;
|
||||||
/** 角色id */
|
/** 角色id */
|
||||||
menuId: string[];
|
menuId: number[];
|
||||||
/** 角色ID */
|
/** 角色ID */
|
||||||
roleId: string;
|
roleId: string;
|
||||||
};
|
};
|
||||||
@ -4490,9 +4613,9 @@ declare namespace BusinessAPI {
|
|||||||
/** 平台 */
|
/** 平台 */
|
||||||
platformVO?: PlatformVO;
|
platformVO?: PlatformVO;
|
||||||
/** 权限列表 */
|
/** 权限列表 */
|
||||||
permissionId: string[];
|
permissionId: number[];
|
||||||
/** 菜单列表 */
|
/** 菜单列表 */
|
||||||
menuId: string[];
|
menuId: number[];
|
||||||
/** 创建时间 */
|
/** 创建时间 */
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
};
|
};
|
||||||
@ -4852,6 +4975,13 @@ declare namespace BusinessAPI {
|
|||||||
data?: MenuVO;
|
data?: MenuVO;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
type SingleResponseOrderCostVO = {
|
||||||
|
success?: boolean;
|
||||||
|
errCode?: string;
|
||||||
|
errMessage?: string;
|
||||||
|
data?: OrderCostVO;
|
||||||
|
};
|
||||||
|
|
||||||
type SingleResponseOrderShipVO = {
|
type SingleResponseOrderShipVO = {
|
||||||
success?: boolean;
|
success?: boolean;
|
||||||
errCode?: string;
|
errCode?: string;
|
||||||
@ -5157,7 +5287,7 @@ declare namespace BusinessAPI {
|
|||||||
/** 备注 */
|
/** 备注 */
|
||||||
remark?: string;
|
remark?: string;
|
||||||
/** 客户标签 */
|
/** 客户标签 */
|
||||||
labelId?: string[];
|
labelId?: number[];
|
||||||
};
|
};
|
||||||
|
|
||||||
type UserDestroyCmd = {
|
type UserDestroyCmd = {
|
||||||
@ -5179,7 +5309,7 @@ declare namespace BusinessAPI {
|
|||||||
/** 状态:1_启用;0_禁用; */
|
/** 状态:1_启用;0_禁用; */
|
||||||
status?: boolean;
|
status?: boolean;
|
||||||
/** 用户ID */
|
/** 用户ID */
|
||||||
userIdList?: string[];
|
userIdList?: number[];
|
||||||
/** 用户名 */
|
/** 用户名 */
|
||||||
name?: string;
|
name?: string;
|
||||||
};
|
};
|
||||||
@ -5222,9 +5352,9 @@ declare namespace BusinessAPI {
|
|||||||
/** 是否是管理员 */
|
/** 是否是管理员 */
|
||||||
isAdmin?: boolean;
|
isAdmin?: boolean;
|
||||||
/** 会员id列表 */
|
/** 会员id列表 */
|
||||||
userIdList?: string[];
|
userIdList?: number[];
|
||||||
/** 排除的用户id列表 */
|
/** 排除的用户id列表 */
|
||||||
excludeUserIdList?: string[];
|
excludeUserIdList?: number[];
|
||||||
/** 小区id */
|
/** 小区id */
|
||||||
communityId?: number;
|
communityId?: number;
|
||||||
offset?: number;
|
offset?: number;
|
||||||
@ -5234,7 +5364,7 @@ declare namespace BusinessAPI {
|
|||||||
/** 用户ID */
|
/** 用户ID */
|
||||||
userId: string;
|
userId: string;
|
||||||
/** 角色ID */
|
/** 角色ID */
|
||||||
roleIdList?: string[];
|
roleIdList?: number[];
|
||||||
/** 是否覆盖 */
|
/** 是否覆盖 */
|
||||||
cover: boolean;
|
cover: boolean;
|
||||||
};
|
};
|
||||||
@ -5279,7 +5409,7 @@ declare namespace BusinessAPI {
|
|||||||
/** 备注 */
|
/** 备注 */
|
||||||
remark?: string;
|
remark?: string;
|
||||||
/** 客户标签 */
|
/** 客户标签 */
|
||||||
labelId?: string[];
|
labelId?: number[];
|
||||||
/** 用户ID */
|
/** 用户ID */
|
||||||
userId: string;
|
userId: string;
|
||||||
};
|
};
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user