feat(order): 新增采购单相关组件及功能

- 新增 PurchaseOrderFormItem、PurchaseOrderModal 等采购单表单项组件
- 在 OrderCostList 和 OrderSupplierList 中集成采购单选择功能
- 新增 OrderRebateList 返利列表组件
- 实现采购单数据的展示与选择逻辑
- 添加采购单相关的搜索和筛选字段
- 支持采购单详情查看及关联数据显示
- 优化订单成本列表的创建表单结构
- 增加表格行选择和批量操作功能
- 完善采购单状态标签显示及样式处理
This commit is contained in:
shenyifei 2025-12-19 17:30:08 +08:00
parent 01521fc8c5
commit 3e24b86326
20 changed files with 927 additions and 346 deletions

View File

@ -863,7 +863,9 @@ export default function BizContainer<
orderId={purchaseOrderVO.orderId} orderId={purchaseOrderVO.orderId}
trigger={() => ( trigger={() => (
<Space> <Space>
<a>{purchaseOrderVO.orderSn}</a> <a>
{`${purchaseOrderVO.orderVehicle?.dealerName} - 第 ${purchaseOrderVO.orderVehicle?.vehicleNo || '暂无'} 车 - ${purchaseOrderVO.orderSn || '暂无'}`}
</a>
</Space> </Space>
)} )}
/> />

View File

@ -2,6 +2,7 @@ import {
BizContainer, BizContainer,
BizValueType, BizValueType,
DealerPaymentAccountList, DealerPaymentAccountList,
DealerPurchaseSetting,
DealerRebateCustomerList, DealerRebateCustomerList,
DeliveryTemplate, DeliveryTemplate,
ModeType, ModeType,
@ -11,10 +12,7 @@ import { useIntl } from '@@/exports';
import { CheckCircleOutlined, CloseCircleOutlined } from '@ant-design/icons'; import { CheckCircleOutlined, CloseCircleOutlined } from '@ant-design/icons';
import { import {
ProColumns, ProColumns,
ProFormDependency,
ProFormDigit,
ProFormRadio, ProFormRadio,
ProFormSwitch,
ProFormText, ProFormText,
} from '@ant-design/pro-components'; } from '@ant-design/pro-components';
import { ProDescriptionsItemProps } from '@ant-design/pro-descriptions'; import { ProDescriptionsItemProps } from '@ant-design/pro-descriptions';
@ -48,6 +46,20 @@ export default function DealerList(props: IDealerListProps) {
key: 'shortName', key: 'shortName',
renderText: (text: string) => <span className="font-medium">{text}</span>, renderText: (text: string) => <span className="font-medium">{text}</span>,
}, },
{
title: intl.formatMessage({ id: intlPrefix + '.column.dealerType' }),
dataIndex: 'dealerType',
key: 'dealerType',
valueType: 'select',
valueEnum: {
MARKET: intl.formatMessage({
id: intlPrefix + '.column.dealerType.enum.market',
}),
SUPERMARKET: intl.formatMessage({
id: intlPrefix + '.column.dealerType.enum.supermarket',
}),
},
},
{ {
title: intl.formatMessage({ title: intl.formatMessage({
id: intlPrefix + '.column.dealerPaymentAccountVOList', id: intlPrefix + '.column.dealerPaymentAccountVOList',
@ -170,6 +182,34 @@ export default function DealerList(props: IDealerListProps) {
</span> </span>
), ),
}, },
{
title: (
<Tooltip
title={intl.formatMessage({
id: intlPrefix + '.column.includeFreightFlag.tooltip',
})}
>
<span>
{intl.formatMessage({
id: intlPrefix + '.column.includeFreightFlag',
})}
</span>
</Tooltip>
),
dataIndex: 'includeFreightFlag',
key: 'includeFreightFlag',
valueType: 'switch',
search: false,
render: (_, record) => (
<span>
{record.includeFreightFlag ? (
<CheckCircleOutlined style={{ color: '#52c41a' }} />
) : (
<CloseCircleOutlined style={{ color: '#ff4d4f' }} />
)}
</span>
),
},
// 新增字段展示 - 计提税金 // 新增字段展示 - 计提税金
{ {
title: ( title: (
@ -298,236 +338,6 @@ export default function DealerList(props: IDealerListProps) {
}), }),
}} }}
/>, />,
<ProFormSwitch
key={'enableShare'}
name={'enableShare'}
label={intl.formatMessage({ id: intlPrefix + '.form.enableShare.label' })}
fieldProps={{
checkedChildren: intl.formatMessage({ id: 'common.yes' }),
unCheckedChildren: intl.formatMessage({ id: 'common.no' }),
}}
/>,
<ProFormDependency key={'enableShare'} name={['enableShare']}>
{({ enableShare }) => {
return (
enableShare && (
<>
<ProFormDigit
key={'shareRatio'}
name={'shareRatio'}
label={intl.formatMessage({
id: intlPrefix + '.form.shareRatio.label',
})}
fieldProps={{
precision: 2,
step: 0.01,
min: 0,
max: 100,
suffix: '%',
}}
placeholder={intl.formatMessage({
id: intlPrefix + '.form.shareRatio.placeholder',
})}
dependencies={['enableShare']}
rules={[
{
required: true,
message: intl.formatMessage({
id: intlPrefix + '.form.shareRatio.required',
}),
},
]}
/>
<ProFormSwitch
key={'shareAdjusted'}
name={'shareAdjusted'}
label={intl.formatMessage({
id: intlPrefix + '.form.shareAdjusted.label',
})}
fieldProps={{
checkedChildren: intl.formatMessage({ id: 'common.yes' }),
unCheckedChildren: intl.formatMessage({ id: 'common.no' }),
}}
/>
</>
)
);
}}
</ProFormDependency>,
<ProFormSwitch
key={'freightCostFlag'}
name={'freightCostFlag'}
label={intl.formatMessage({
id: intlPrefix + '.form.freightCostFlag.label',
})}
fieldProps={{
checkedChildren: intl.formatMessage({ id: 'common.yes' }),
unCheckedChildren: intl.formatMessage({ id: 'common.no' }),
}}
/>,
<ProFormSwitch
key={'strawMatCostFlag'}
name={'strawMatCostFlag'}
label={intl.formatMessage({
id: intlPrefix + '.form.strawMatCostFlag.label',
})}
fieldProps={{
checkedChildren: intl.formatMessage({ id: 'common.yes' }),
unCheckedChildren: intl.formatMessage({ id: 'common.no' }),
}}
/>,
<ProFormSwitch
key={'includePackingFlag'}
name={'includePackingFlag'}
label={intl.formatMessage({
id: intlPrefix + '.form.includePackingFlag.label',
})}
fieldProps={{
checkedChildren: intl.formatMessage({ id: 'common.yes' }),
unCheckedChildren: intl.formatMessage({ id: 'common.no' }),
}}
/>,
// 新增字段表单 - 计提税金
<ProFormSwitch
key={'enableAccrualTax'}
name={'enableAccrualTax'}
label={intl.formatMessage({
id: intlPrefix + '.form.enableAccrualTax.label',
})}
fieldProps={{
checkedChildren: intl.formatMessage({ id: 'common.yes' }),
unCheckedChildren: intl.formatMessage({ id: 'common.no' }),
}}
/>,
<ProFormDependency key={'enableAccrualTax'} name={['enableAccrualTax']}>
{({ enableAccrualTax }) => {
return (
enableAccrualTax && (
<ProFormDigit
key={'accrualTaxRatio'}
name={'accrualTaxRatio'}
label={intl.formatMessage({
id: intlPrefix + '.form.accrualTaxRatio.label',
})}
fieldProps={{
precision: 2,
step: 0.01,
min: 0,
max: 100,
suffix: '%',
}}
placeholder={intl.formatMessage({
id: intlPrefix + '.form.accrualTaxRatio.placeholder',
})}
dependencies={['enableAccrualTax']}
rules={[
{
required: true,
message: intl.formatMessage({
id: intlPrefix + '.form.accrualTaxRatio.required',
}),
},
]}
/>
)
);
}}
</ProFormDependency>,
// 新增字段表单 - 公司返点
<ProFormSwitch
key={'enableCompanyRebate'}
name={'enableCompanyRebate'}
label={intl.formatMessage({
id: intlPrefix + '.form.enableCompanyRebate.label',
})}
fieldProps={{
checkedChildren: intl.formatMessage({ id: 'common.yes' }),
unCheckedChildren: intl.formatMessage({ id: 'common.no' }),
}}
/>,
<ProFormDependency
key={'enableCompanyRebate'}
name={['enableCompanyRebate']}
>
{({ enableCompanyRebate }) => {
return (
enableCompanyRebate && (
<ProFormDigit
key={'companyRebateRatio'}
name={'companyRebateRatio'}
label={intl.formatMessage({
id: intlPrefix + '.form.companyRebateRatio.label',
})}
fieldProps={{
precision: 2,
step: 0.01,
min: 0,
max: 100,
suffix: '%',
}}
placeholder={intl.formatMessage({
id: intlPrefix + '.form.companyRebateRatio.placeholder',
})}
dependencies={['enableCompanyRebate']}
rules={[
{
required: true,
message: intl.formatMessage({
id: intlPrefix + '.form.companyRebateRatio.required',
}),
},
]}
/>
)
);
}}
</ProFormDependency>,
// 新增字段表单 - 产地损耗
<ProFormSwitch
key={'enableLoss'}
name={'enableLoss'}
label={intl.formatMessage({
id: intlPrefix + '.form.enableLoss.label',
})}
fieldProps={{
checkedChildren: intl.formatMessage({ id: 'common.yes' }),
unCheckedChildren: intl.formatMessage({ id: 'common.no' }),
}}
/>,
<ProFormDependency key={'enableLoss'} name={['enableLoss']}>
{({ enableLoss }) => {
return (
enableLoss && (
<ProFormDigit
key={'lossAmount'}
name={'lossAmount'}
label={intl.formatMessage({
id: intlPrefix + '.form.lossAmount.label',
})}
fieldProps={{
precision: 2,
step: 0.01,
min: 0,
max: 9999,
suffix: '元',
}}
placeholder={intl.formatMessage({
id: intlPrefix + '.form.lossAmount.placeholder',
})}
dependencies={['enableLoss']}
rules={[
{
required: true,
message: intl.formatMessage({
id: intlPrefix + '.form.lossAmount.required',
}),
},
]}
/>
)
);
}}
</ProFormDependency>,
]; ];
const detailColumns: ProDescriptionsItemProps< const detailColumns: ProDescriptionsItemProps<
@ -611,6 +421,14 @@ export default function DealerList(props: IDealerListProps) {
actionRef.current?.reload(); actionRef.current?.reload();
}} }}
/>, />,
<DealerPurchaseSetting
insertPosition={'after:view'}
key={'dealerPurchaseSetting'}
dealerVO={record}
onFinish={() => {
actionRef.current?.reload();
}}
/>,
]; ];
}, },
}} }}

View File

@ -0,0 +1,363 @@
import { ButtonAccess, InsertPosition } from '@/components';
import { business } from '@/services';
import { useIntl } from '@@/exports';
import {
DrawerForm,
ProFormDependency,
ProFormDigit,
ProFormSwitch,
ProFormText,
RouteContext,
RouteContextType,
} from '@ant-design/pro-components';
import { Card, Divider, message, Space } from 'antd';
interface IDealerPurchaseSettingProps {
insertPosition?: InsertPosition;
dealerVO: BusinessAPI.DealerVO;
onFinish?: () => void;
}
interface IFeatureCardProps {
title: string;
description?: string;
name: string;
children?: React.ReactNode;
checkedChildren?: string;
unCheckedChildren?: string;
}
// 功能卡片组件
const FeatureCard: React.FC<IFeatureCardProps> = ({
title,
description,
name,
children,
checkedChildren,
unCheckedChildren,
}) => {
return (
<Card
size="small"
style={{ marginBottom: 16 }}
bodyStyle={{ padding: '16px 20px' }}
>
<div
style={{
display: 'flex',
alignItems: 'flex-start',
justifyContent: 'space-between',
}}
>
<div style={{ flex: 1, marginRight: 16 }}>
<div style={{ fontSize: 14, fontWeight: 500, marginBottom: 4 }}>
{title}
</div>
{description && (
<div style={{ fontSize: 12, color: '#666', lineHeight: 1.4 }}>
{description}
</div>
)}
</div>
<div style={{ display: 'flex', alignItems: 'center' }}>
<ProFormSwitch
name={name}
fieldProps={{
checkedChildren,
unCheckedChildren,
}}
noStyle
/>
</div>
</div>
{children && (
<>
<Divider style={{ margin: '16px 0 12px 0' }} />
<div style={{ paddingLeft: 0 }}>{children}</div>
</>
)}
</Card>
);
};
export default function DealerPurchaseSetting(
props: IDealerPurchaseSettingProps,
) {
const { onFinish, dealerVO } = props;
const intl = useIntl();
const intlPrefix = 'dealer';
const commonYes = intl.formatMessage({ id: 'common.yes' });
const commonNo = intl.formatMessage({ id: 'common.no' });
return (
<RouteContext.Consumer>
{(value: RouteContextType) => {
const { isMobile } = value;
return (
<DrawerForm<BusinessAPI.DealerVO, BusinessAPI.DealerVO>
trigger={
<ButtonAccess permission={''} type="link">
</ButtonAccess>
}
title="采购设置"
layout="vertical"
width={isMobile ? '100%' : '45%'}
drawerProps={{
destroyOnHidden: true,
}}
request={async () => {
const { data } = await business.dealer.showDealer({
dealerShowQry: {
dealerId: dealerVO.dealerId,
},
});
return data!;
}}
onFinish={async (formData) => {
await business.dealer.updateDealer(formData);
onFinish?.();
message.success('更新经销商设置成功');
return true;
}}
>
<ProFormText name={'dealerId'} hidden={true} />
{/* 诚信志远分成功能卡片 */}
<FeatureCard
title={intl.formatMessage({
id: intlPrefix + '.form.enableShare.label',
})}
description="是否开启诚信志远分红比例设置"
name="enableShare"
checkedChildren={commonYes}
unCheckedChildren={commonNo}
>
<ProFormDependency name={['enableShare']}>
{({ enableShare }) => {
return enableShare ? (
<Space
direction="vertical"
size="middle"
style={{ width: '100%' }}
>
<ProFormDigit
name={'shareRatio'}
label={intl.formatMessage({
id: intlPrefix + '.form.shareRatio.label',
})}
fieldProps={{
precision: 2,
step: 0.01,
min: 0,
max: 100,
suffix: '%',
}}
placeholder={intl.formatMessage({
id: intlPrefix + '.form.shareRatio.placeholder',
})}
dependencies={['enableShare']}
rules={[
{
required: true,
message: intl.formatMessage({
id: intlPrefix + '.form.shareRatio.required',
}),
},
]}
/>
<ProFormSwitch
name={'shareAdjusted'}
label={intl.formatMessage({
id: intlPrefix + '.form.shareAdjusted.label',
})}
fieldProps={{
checkedChildren: commonYes,
unCheckedChildren: commonNo,
}}
/>
</Space>
) : null;
}}
</ProFormDependency>
</FeatureCard>
{/* 成本相关功能卡片 */}
<FeatureCard
title={intl.formatMessage({
id: intlPrefix + '.form.freightCostFlag.label',
})}
description="运费是否作为成本计算"
name="freightCostFlag"
checkedChildren={commonYes}
unCheckedChildren={commonNo}
/>
<FeatureCard
title={intl.formatMessage({
id: intlPrefix + '.form.strawMatCostFlag.label',
})}
description="草帘是否作为成本计算"
name="strawMatCostFlag"
checkedChildren={commonYes}
unCheckedChildren={commonNo}
/>
<FeatureCard
title={intl.formatMessage({
id: intlPrefix + '.form.includePackingFlag.label',
})}
description="发货单合计金额是否含包装费"
name="includePackingFlag"
checkedChildren={commonYes}
unCheckedChildren={commonNo}
/>
<FeatureCard
title={intl.formatMessage({
id: intlPrefix + '.form.includeFreightFlag.label',
})}
description="发货单合计金额是否含运费"
name="includeFreightFlag"
checkedChildren={commonYes}
unCheckedChildren={commonNo}
/>
{/* 计提税金功能卡片 */}
<FeatureCard
title={intl.formatMessage({
id: intlPrefix + '.form.enableAccrualTax.label',
})}
description="是否开启计提税金功能"
name="enableAccrualTax"
checkedChildren={commonYes}
unCheckedChildren={commonNo}
>
<ProFormDependency name={['enableAccrualTax']}>
{({ enableAccrualTax }) => {
return enableAccrualTax ? (
<ProFormDigit
name={'accrualTaxRatio'}
label={intl.formatMessage({
id: intlPrefix + '.form.accrualTaxRatio.label',
})}
fieldProps={{
precision: 2,
step: 0.01,
min: 0,
max: 100,
suffix: '%',
}}
placeholder={intl.formatMessage({
id: intlPrefix + '.form.accrualTaxRatio.placeholder',
})}
dependencies={['enableAccrualTax']}
rules={[
{
required: true,
message: intl.formatMessage({
id: intlPrefix + '.form.accrualTaxRatio.required',
}),
},
]}
/>
) : null;
}}
</ProFormDependency>
</FeatureCard>
{/* 公司返点功能卡片 */}
<FeatureCard
title={intl.formatMessage({
id: intlPrefix + '.form.enableCompanyRebate.label',
})}
description="是否开启公司返点功能"
name="enableCompanyRebate"
checkedChildren={commonYes}
unCheckedChildren={commonNo}
>
<ProFormDependency name={['enableCompanyRebate']}>
{({ enableCompanyRebate }) => {
return enableCompanyRebate ? (
<ProFormDigit
name={'companyRebateRatio'}
label={intl.formatMessage({
id: intlPrefix + '.form.companyRebateRatio.label',
})}
fieldProps={{
precision: 2,
step: 0.01,
min: 0,
max: 100,
suffix: '%',
}}
placeholder={intl.formatMessage({
id: intlPrefix + '.form.companyRebateRatio.placeholder',
})}
dependencies={['enableCompanyRebate']}
rules={[
{
required: true,
message: intl.formatMessage({
id:
intlPrefix + '.form.companyRebateRatio.required',
}),
},
]}
/>
) : null;
}}
</ProFormDependency>
</FeatureCard>
{/* 损耗功能卡片 */}
<FeatureCard
title={intl.formatMessage({
id: intlPrefix + '.form.enableLoss.label',
})}
description="是否开启损耗设置"
name="enableLoss"
checkedChildren={commonYes}
unCheckedChildren={commonNo}
>
<ProFormDependency name={['enableLoss']}>
{({ enableLoss }) => {
return enableLoss ? (
<ProFormDigit
name={'lossAmount'}
label={intl.formatMessage({
id: intlPrefix + '.form.lossAmount.label',
})}
fieldProps={{
precision: 2,
step: 0.01,
min: 0,
max: 9999,
suffix: '元',
}}
placeholder={intl.formatMessage({
id: intlPrefix + '.form.lossAmount.placeholder',
})}
dependencies={['enableLoss']}
rules={[
{
required: true,
message: intl.formatMessage({
id: intlPrefix + '.form.lossAmount.required',
}),
},
]}
/>
) : null;
}}
</ProFormDependency>
</FeatureCard>
</DrawerForm>
);
}}
</RouteContext.Consumer>
);
}

View File

@ -8,3 +8,4 @@ export { default as DealerSearch } from './DealerSearch';
export { default as DealerSelect } from './DealerSelect'; export { default as DealerSelect } from './DealerSelect';
export { default as DealerWarehouseList } from './DealerWarehouseList'; export { default as DealerWarehouseList } from './DealerWarehouseList';
export { default as DeliveryTemplate } from './DeliveryTemplate'; export { default as DeliveryTemplate } from './DeliveryTemplate';
export { default as DealerPurchaseSetting } from './DealerPurchaseSetting';

View File

@ -45,9 +45,11 @@ export default function OrderShipList(props: IOrderShipListProps) {
title: intl.formatMessage({ id: intlPrefix + '.column.vehicleNo' }), title: intl.formatMessage({ id: intlPrefix + '.column.vehicleNo' }),
dataIndex: ['orderVehicle', 'vehicleNo'], dataIndex: ['orderVehicle', 'vehicleNo'],
key: 'vehicleNo', key: 'vehicleNo',
render: (_, record) => ( render: (_, record) => {
<span> {record.orderVehicle?.vehicleNo} </span> return record.orderVehicle?.vehicleNo
), ? '第' + record.orderVehicle?.vehicleNo + '车'
: '-';
},
}, },
{ {
title: intl.formatMessage({ id: intlPrefix + '.column.shippingDate' }), title: intl.formatMessage({ id: intlPrefix + '.column.shippingDate' }),

View File

@ -0,0 +1,123 @@
import { BizContainer, BizValueType, ModeType } from '@/components';
import { business } from '@/services';
import { useIntl } from '@@/exports';
import { ProColumns, ProFormText } from '@ant-design/pro-components';
import { ProDescriptionsItemProps } from '@ant-design/pro-descriptions';
import React from 'react';
interface IExpenseCostListProps {
ghost?: boolean;
costId?: BusinessAPI.CostVO['costId'];
search?: boolean;
onValueChange?: () => void;
mode?: ModeType;
trigger?: () => React.ReactNode;
}
export default function ExpenseCostList(props: IExpenseCostListProps) {
const {
ghost = false,
costId,
search = true,
mode = 'drag',
trigger,
onValueChange,
} = props;
const intl = useIntl();
const intlPrefix = 'expenseCost';
const columns: ProColumns<BusinessAPI.CostVO, BizValueType>[] = [
{
title: intl.formatMessage({ id: intlPrefix + '.column.name' }),
dataIndex: 'name',
key: 'name',
renderText: (text: string) => <span className="font-medium">{text}</span>,
},
];
const formContext = [
<ProFormText key={'type'} name={'type'} hidden={true} />,
<ProFormText key={'belong'} name={'belong'} hidden={true} />,
<ProFormText key={'unit'} name={'unit'} hidden={true} />,
<ProFormText
key={'name'}
name={'name'}
label={intl.formatMessage({ id: intlPrefix + '.form.name.label' })}
required={true}
placeholder={intl.formatMessage({
id: intlPrefix + '.form.name.placeholder',
})}
rules={[
{
required: true,
message: intl.formatMessage({
id: intlPrefix + '.form.name.required',
}),
},
]}
/>,
];
const detailColumns: ProDescriptionsItemProps<
BusinessAPI.CostVO,
BizValueType
>[] = columns as ProDescriptionsItemProps<BusinessAPI.CostVO, BizValueType>[];
return (
<BizContainer<
typeof business.cost,
BusinessAPI.CostVO,
BusinessAPI.CostPageQry,
BusinessAPI.CostCreateCmd,
BusinessAPI.CostUpdateCmd
>
rowKey={'costId'}
permission={'operation-cost'}
func={business.cost}
method={'cost'}
methodUpper={'Cost'}
intlPrefix={intlPrefix}
modeType={mode}
onValueChange={onValueChange}
container={{
ghost,
}}
remark={{
mode: 'editor',
}}
status
drag={{
fieldProps: {
bordered: true,
ghost,
//@ts-ignore
search,
params: {
type: 'EXPENSE_TYPE',
},
},
columns,
}}
create={{
formType: 'drawer',
formContext,
initValues: {
type: 'EXPENSE_TYPE',
belong: 'NONE_TYPE',
status: true,
unit: '元',
},
}}
update={{
formType: 'drawer',
formContext,
}}
destroy={{}}
detail={{
rowId: costId,
formType: 'drawer',
columns: detailColumns,
trigger,
}}
/>
);
}

View File

@ -0,0 +1 @@
export { default as ExpenseCostList } from './ExpenseCostList';

View File

@ -18,8 +18,8 @@ import {
import { ProDescriptionsItemProps } from '@ant-design/pro-descriptions'; import { ProDescriptionsItemProps } from '@ant-design/pro-descriptions';
import { ProFormBizSelect } from '@chageable/components'; import { ProFormBizSelect } from '@chageable/components';
import { ProFormBizSelectHandles } from '@chageable/components/src'; import { ProFormBizSelectHandles } from '@chageable/components/src';
import React, { useRef, useState } from 'react';
import { Button, Space } from 'antd'; import { Button, Space } from 'antd';
import React, { useRef, useState } from 'react';
interface IOrderCostListProps { interface IOrderCostListProps {
ghost?: boolean; ghost?: boolean;
@ -46,6 +46,12 @@ export default function OrderCostList(props: IOrderCostListProps) {
const [activeKey, setActiveKey] = useState<string>('ALL'); const [activeKey, setActiveKey] = useState<string>('ALL');
const columns: ProColumns<BusinessAPI.OrderCostVO, BizValueType>[] = [ const columns: ProColumns<BusinessAPI.OrderCostVO, BizValueType>[] = [
{
title: intl.formatMessage({ id: intlPrefix + '.column.purchaseOrder' }),
dataIndex: 'purchaseOrderVO',
key: 'orderId',
valueType: 'purchaseOrder',
},
{ {
title: intl.formatMessage({ id: intlPrefix + '.column.name' }), title: intl.formatMessage({ id: intlPrefix + '.column.name' }),
dataIndex: 'name', dataIndex: 'name',
@ -92,19 +98,22 @@ export default function OrderCostList(props: IOrderCostListProps) {
key: 'belong', key: 'belong',
valueType: 'select', valueType: 'select',
valueEnum: { valueEnum: {
NONE_TYPE: intl.formatMessage({
id: intlPrefix + '.column.belong.enum.noneType',
}),
WORKER_TYPE: { WORKER_TYPE: {
text: intl.formatMessage({ text: intl.formatMessage({
id: intlPrefix + '.column.belong.workerType', id: intlPrefix + '.column.belong.enum.workerType',
}), }),
}, },
PRODUCTION_TYPE: { PRODUCTION_TYPE: {
text: intl.formatMessage({ text: intl.formatMessage({
id: intlPrefix + '.column.belong.productionType', id: intlPrefix + '.column.belong.enum.productionType',
}), }),
}, },
DRIVER_TYPE: { DRIVER_TYPE: {
text: intl.formatMessage({ text: intl.formatMessage({
id: intlPrefix + '.column.belong.driverType', id: intlPrefix + '.column.belong.enum.driverType',
}), }),
}, },
}, },
@ -116,24 +125,6 @@ export default function OrderCostList(props: IOrderCostListProps) {
valueType: 'money', valueType: 'money',
search: false, 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' }), title: intl.formatMessage({ id: intlPrefix + '.column.orderCompany' }),
dataIndex: 'orderCompany', dataIndex: 'orderCompany',
@ -173,13 +164,13 @@ export default function OrderCostList(props: IOrderCostListProps) {
valueEnum: { valueEnum: {
true: { true: {
text: intl.formatMessage({ text: intl.formatMessage({
id: intlPrefix + '.column.isPaid.paid', id: intlPrefix + '.column.isPaid.enum.paid',
}), }),
status: 'success', status: 'success',
}, },
false: { false: {
text: intl.formatMessage({ text: intl.formatMessage({
id: intlPrefix + '.column.isPaid.unpaid', id: intlPrefix + '.column.isPaid.enum.unpaid',
}), }),
status: 'processing', status: 'processing',
}, },
@ -362,10 +353,14 @@ export default function OrderCostList(props: IOrderCostListProps) {
isPaid: activeKey! as any, isPaid: activeKey! as any,
}), }),
poStates: ['COMPLETED'], poStates: ['COMPLETED'],
belongs: ['WORKER_TYPE', 'PRODUCTION_TYPE', 'DRIVER_TYPE'],
}, },
rowSelection: { rowSelection: {
type: 'checkbox',
preserveSelectedRowKeys: true,
onChange: (_, selectedRows) => setSelectedRows(selectedRows), onChange: (_, selectedRows) => setSelectedRows(selectedRows),
getCheckboxProps: (record: BusinessAPI.OrderCostVO) => ({
disabled: record.belong === 'NONE_TYPE',
}),
}, },
tableAlertOptionRender: (props) => { tableAlertOptionRender: (props) => {
return ( return (

View File

@ -35,6 +35,12 @@ export default function OrderRebateList(props: IOrderRebateListProps) {
const [activeKey, setActiveKey] = useState<string>('ALL'); const [activeKey, setActiveKey] = useState<string>('ALL');
const columns: ProColumns<BusinessAPI.OrderRebateVO, BizValueType>[] = [ const columns: ProColumns<BusinessAPI.OrderRebateVO, BizValueType>[] = [
{
title: intl.formatMessage({ id: intlPrefix + '.column.purchaseOrder' }),
dataIndex: 'purchaseOrderVO',
key: 'orderId',
valueType: 'purchaseOrder',
},
{ {
title: intl.formatMessage({ id: intlPrefix + '.column.name' }), title: intl.formatMessage({ id: intlPrefix + '.column.name' }),
dataIndex: 'name', dataIndex: 'name',
@ -84,24 +90,6 @@ export default function OrderRebateList(props: IOrderRebateListProps) {
valueType: 'money', valueType: 'money',
search: false, 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' }), title: intl.formatMessage({ id: intlPrefix + '.column.orderCompany' }),
dataIndex: 'orderCompany', dataIndex: 'orderCompany',

View File

@ -49,6 +49,12 @@ export default function OrderSupplierList(props: IOrderSupplierListProps) {
useState<BusinessAPI.OrderSupplierVO | null>(null); useState<BusinessAPI.OrderSupplierVO | null>(null);
const columns: ProColumns<BusinessAPI.OrderSupplierVO, BizValueType>[] = [ const columns: ProColumns<BusinessAPI.OrderSupplierVO, BizValueType>[] = [
{
title: intl.formatMessage({ id: intlPrefix + '.column.purchaseOrder' }),
dataIndex: 'purchaseOrderVO',
key: 'orderId',
valueType: 'purchaseOrder',
},
{ {
title: intl.formatMessage({ id: intlPrefix + '.column.name' }), title: intl.formatMessage({ id: intlPrefix + '.column.name' }),
dataIndex: 'name', dataIndex: 'name',
@ -167,41 +173,6 @@ export default function OrderSupplierList(props: IOrderSupplierListProps) {
</div> </div>
), ),
}, },
{
title: intl.formatMessage({ id: intlPrefix + '.column.purchaseOrder' }),
dataIndex: 'purchaseOrderVO',
key: 'orderId',
valueType: 'purchaseOrder',
},
{
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' }),
dataIndex: 'orderVehicle',
key: 'ovVehicleNo',
search: false,
render: (_, record) => {
return (
<span>
{record.orderVehicle.origin} {record.orderVehicle.destination}
</span>
);
},
},
{
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',

View File

@ -55,7 +55,11 @@ export default function PurchaseOrderList(props: IPurchaseOrderListProps) {
title: intl.formatMessage({ id: intlPrefix + '.column.vehicleNo' }), title: intl.formatMessage({ id: intlPrefix + '.column.vehicleNo' }),
dataIndex: ['orderVehicle', 'vehicleNo'], dataIndex: ['orderVehicle', 'vehicleNo'],
key: 'vehicleNo', key: 'vehicleNo',
render: (_, record) => <span> {record.orderVehicle.vehicleNo} </span>, render: (_, record) => {
return record.orderVehicle?.vehicleNo
? '第' + record.orderVehicle?.vehicleNo + '车'
: '-';
},
}, },
{ {
title: intl.formatMessage({ id: intlPrefix + '.column.plate' }), title: intl.formatMessage({ id: intlPrefix + '.column.plate' }),

View File

@ -75,6 +75,18 @@ export default function PurchaseOrderModal(props: IPurchaseOrderModalProps) {
title: intl.formatMessage({ id: intlPrefix + '.column.dealerName' }), title: intl.formatMessage({ id: intlPrefix + '.column.dealerName' }),
dataIndex: ['orderVehicle', 'dealerName'], dataIndex: ['orderVehicle', 'dealerName'],
key: 'dealerName', key: 'dealerName',
search: false,
},
{
title: intl.formatMessage({ id: intlPrefix + '.column.vehicleNo' }),
dataIndex: ['orderVehicle', 'vehicleNo'],
key: 'vehicleNo',
search: false,
render: (_, record) => {
return record.orderVehicle?.vehicleNo
? '第' + record.orderVehicle?.vehicleNo + '车'
: '-';
},
}, },
{ {
title: intl.formatMessage({ id: intlPrefix + '.column.plate' }), title: intl.formatMessage({ id: intlPrefix + '.column.plate' }),

View File

@ -20,3 +20,4 @@ export * from './Remark';
export * from './Role'; export * from './Role';
export * from './Setting'; export * from './Setting';
export * from './User'; export * from './User';
export * from './Expense';

View File

@ -684,6 +684,9 @@ export default {
}, },
column: { column: {
shortName: '经销商简称', shortName: '经销商简称',
dealerType: '经销商类型',
'dealerType.enum.market': '市场',
'dealerType.enum.supermarket': '超市',
dealerPaymentAccountVOList: '付款账户', dealerPaymentAccountVOList: '付款账户',
receivable: '应收金额', receivable: '应收金额',
share: '分成设置', share: '分成设置',
@ -697,6 +700,8 @@ export default {
'strawMatCostFlag.tooltip': '草帘是否作为成本', 'strawMatCostFlag.tooltip': '草帘是否作为成本',
includePackingFlag: '含包装费', includePackingFlag: '含包装费',
'includePackingFlag.tooltip': '发货单合计金额是否含包装费', 'includePackingFlag.tooltip': '发货单合计金额是否含包装费',
includeFreightFlag: '含运费',
'includeFreightFlag.tooltip': '发货单合计金额是否含运费',
enableAccrualTax: '计提税金', enableAccrualTax: '计提税金',
'enableAccrualTax.tooltip': '是否开启计提税金', 'enableAccrualTax.tooltip': '是否开启计提税金',
accrualTaxRatio: '计提税金比例', accrualTaxRatio: '计提税金比例',
@ -751,6 +756,11 @@ export default {
placeholder: '请选择发货单合计金额是否含包装费', placeholder: '请选择发货单合计金额是否含包装费',
required: '请选择发货单合计金额是否含包装费', required: '请选择发货单合计金额是否含包装费',
}, },
includeFreightFlag: {
label: '发货单合计金额是否含运费',
placeholder: '请选择发货单合计金额是否含运费',
required: '请选择发货单合计金额是否含运费',
},
enableAccrualTax: { enableAccrualTax: {
label: '是否开启计提税金', label: '是否开启计提税金',
}, },
@ -2152,7 +2162,7 @@ export default {
invoiceAmount: '应开发票金额(元)', invoiceAmount: '应开发票金额(元)',
depositAmount: '已付定金(元)', depositAmount: '已付定金(元)',
remainingAmount: '剩余付款金额(元)', remainingAmount: '剩余付款金额(元)',
purchaseOrder: '关联采购单', purchaseOrder: '采购单',
deliveryTime: '采购日期', deliveryTime: '采购日期',
dealerName: '经销商名称', dealerName: '经销商名称',
vehicleNo: '车次号', vehicleNo: '车次号',
@ -2202,16 +2212,17 @@ export default {
name: '费用名称', name: '费用名称',
principal: '收款方', principal: '收款方',
price: '待付款金额', price: '待付款金额',
purchaseOrder: '关联采购单', purchaseOrder: '采购单',
orderVehicle: '关联车辆', orderVehicle: '关联车辆',
orderCompany: '所属公司', orderCompany: '所属公司',
belong: '归属', belong: '归属',
'belong.workerType': '工头', 'belong.enum.noneType': '无归属',
'belong.productionType': '产地', 'belong.enum.workerType': '工头',
'belong.driverType': '司机', 'belong.enum.productionType': '产地',
'belong.enum.driverType': '司机',
isPaid: '是否付款', isPaid: '是否付款',
'isPaid.paid': '已付款', 'isPaid.enum.paid': '已付款',
'isPaid.unpaid': '待付款', 'isPaid.enum.unpaid': '待付款',
paidAt: '付款时间', paidAt: '付款时间',
createdAt: '创建时间', createdAt: '创建时间',
option: '操作', option: '操作',
@ -2275,7 +2286,7 @@ export default {
'calcMethod.notFixed': '不固定模式', 'calcMethod.notFixed': '不固定模式',
netWeight: '净重(斤)', netWeight: '净重(斤)',
unitPrice: '单价(元/斤)', unitPrice: '单价(元/斤)',
purchaseOrder: '关联采购单', purchaseOrder: '采购单',
orderVehicle: '关联车辆', orderVehicle: '关联车辆',
orderCompany: '所属公司', orderCompany: '所属公司',
isPaid: '是否付款', isPaid: '是否付款',
@ -2313,11 +2324,79 @@ export default {
}, },
}, },
expenseCost: {
column: {
name: '费用名称',
remark: '备注',
status: '状态',
'status.enum.enabled': '正常',
'status.enum.disabled': '禁用',
'status.placeholder': '请选择状态',
createdAt: '创建时间',
option: '操作',
},
form: {
name: {
label: '费用名称',
placeholder: '请输入费用名称',
required: '费用名称为必填项',
},
remark: {
label: '备注',
placeholder: '请输入备注',
},
status: {
label: '状态',
placeholder: '请选择状态',
required: '状态为必填项',
enum: {
enabled: '正常',
disabled: '禁用',
},
},
},
modal: {
create: {
title: '新增费用',
button: '新增费用',
success: '新增费用成功',
},
update: {
title: '更新费用',
button: '编辑',
success: '更新费用成功',
status: {
success: '修改状态成功',
},
},
delete: {
success: '删除费用成功',
button: '删除',
confirm: {
title: '确认删除',
content: '您确定要删除该费用吗?',
okText: '确定',
cancelText: '取消',
},
},
import: {
title: '导入费用',
button: '导入',
success: '导入费用成功',
},
view: {
title: '查看费用',
button: '查看',
},
},
},
form: { form: {
orderId: { orderId: {
label: '采购单', label: '采购单',
placeholder: '请选择关联采购单', placeholder: '请选择采购单',
required: '关联采购单为必选项', required: '采购单为必选项',
}, },
userId: { userId: {
label: '操作用户', label: '操作用户',

View File

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

View File

@ -100,7 +100,7 @@ declare namespace AuthAPI {
/** 用户ID */ /** 用户ID */
userId: string; userId: string;
/** 角色ID */ /** 角色ID */
roleIdList: string[]; roleIdList: number[];
/** 角色信息 */ /** 角色信息 */
userRoleList?: UserRoleVO[]; userRoleList?: UserRoleVO[];
}; };
@ -195,7 +195,7 @@ declare namespace AuthAPI {
type RoleMenuTreeQry = { type RoleMenuTreeQry = {
/** 角色权限 */ /** 角色权限 */
roleId?: string[]; roleId?: number[];
/** 平台ID */ /** 平台ID */
platformId: string; platformId: string;
}; };
@ -329,7 +329,7 @@ declare namespace AuthAPI {
/** 备注 */ /** 备注 */
remark?: string; remark?: string;
/** 客户标签 */ /** 客户标签 */
labelId?: string[]; labelId?: number[];
/** 用户ID */ /** 用户ID */
userId: string; userId: string;
}; };

View File

@ -0,0 +1,97 @@
// @ts-ignore
/* eslint-disable */
import request from '../request';
/** 创建花销统计记录 POST /operation/createExpenseRecord */
export async function createExpenseRecord(
body: BusinessAPI.ExpenseRecordCreateCmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.SingleResponseExpenseRecordVO>(
'/operation/createExpenseRecord',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
},
);
}
/** 花销统计记录列表 GET /operation/listExpenseRecord */
export async function listExpenseRecord(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: BusinessAPI.listExpenseRecordParams,
options?: { [key: string]: any },
) {
return request<BusinessAPI.MultiResponseExpenseRecordVO>(
'/operation/listExpenseRecord',
{
method: 'GET',
params: {
...params,
expenseRecordListQry: undefined,
...params['expenseRecordListQry'],
},
...(options || {}),
},
);
}
/** 花销统计记录详情 GET /operation/showExpenseRecord */
export async function showExpenseRecord(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: BusinessAPI.showExpenseRecordParams,
options?: { [key: string]: any },
) {
return request<BusinessAPI.SingleResponseExpenseRecordVO>(
'/operation/showExpenseRecord',
{
method: 'GET',
params: {
...params,
expenseRecordShowQry: undefined,
...params['expenseRecordShowQry'],
},
...(options || {}),
},
);
}
/** 花销统计记录更新 PUT /operation/updateExpenseRecord */
export async function updateExpenseRecord(
body: BusinessAPI.ExpenseRecordUpdateCmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.SingleResponseExpenseRecordVO>(
'/operation/updateExpenseRecord',
{
method: 'PUT',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
},
);
}
/** 花销统计记录更新 PATCH /operation/updateExpenseRecord */
export async function updateExpenseRecord1(
body: BusinessAPI.ExpenseRecordUpdateCmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.SingleResponseExpenseRecordVO>(
'/operation/updateExpenseRecord',
{
method: 'PATCH',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
},
);
}

View File

@ -17,6 +17,7 @@ import * as dealerRebateCustomer from './dealerRebateCustomer';
import * as dealerWarehouse from './dealerWarehouse'; import * as dealerWarehouse from './dealerWarehouse';
import * as dictionary from './dictionary'; import * as dictionary from './dictionary';
import * as employee from './employee'; import * as employee from './employee';
import * as expenseRecord from './expenseRecord';
import * as extraction from './extraction'; import * as extraction from './extraction';
import * as giftBox from './giftBox'; import * as giftBox from './giftBox';
import * as material from './material'; import * as material from './material';
@ -48,6 +49,7 @@ export default {
material, material,
materialCategory, materialCategory,
giftBox, giftBox,
expenseRecord,
employee, employee,
dictionary, dictionary,
dealer, dealer,

View File

@ -898,7 +898,8 @@ declare namespace BusinessAPI {
| 'ARTIFICIAL_TYPE' | 'ARTIFICIAL_TYPE'
| 'PRODUCTION_TYPE' | 'PRODUCTION_TYPE'
| 'OTHER_TYPE' | 'OTHER_TYPE'
| 'LOGISTICS_TYPE'; | 'LOGISTICS_TYPE'
| 'EXPENSE_TYPE';
/** 费用归属0_无归属1_工头2_产地3_司机 */ /** 费用归属0_无归属1_工头2_产地3_司机 */
belong: 'NONE_TYPE' | 'WORKER_TYPE' | 'PRODUCTION_TYPE' | 'DRIVER_TYPE'; belong: 'NONE_TYPE' | 'WORKER_TYPE' | 'PRODUCTION_TYPE' | 'DRIVER_TYPE';
/** 费用名称 */ /** 费用名称 */
@ -1061,13 +1062,16 @@ declare namespace BusinessAPI {
| 'ARTIFICIAL_TYPE' | 'ARTIFICIAL_TYPE'
| 'PRODUCTION_TYPE' | 'PRODUCTION_TYPE'
| 'OTHER_TYPE' | 'OTHER_TYPE'
| 'LOGISTICS_TYPE'; | 'LOGISTICS_TYPE'
| 'EXPENSE_TYPE';
/** 费用归属0_无归属1_工头2_产地3_司机 */ /** 费用归属0_无归属1_工头2_产地3_司机 */
belong?: belong?:
| 'NONE_TYPE' | 'NONE_TYPE'
| 'WORKER_TYPE' | 'WORKER_TYPE'
| 'PRODUCTION_TYPE' | 'PRODUCTION_TYPE'
| 'DRIVER_TYPE'; | 'DRIVER_TYPE';
/** 费用名称 */
name?: string;
}; };
type CostPageQry = { type CostPageQry = {
@ -1093,7 +1097,8 @@ declare namespace BusinessAPI {
| 'ARTIFICIAL_TYPE' | 'ARTIFICIAL_TYPE'
| 'PRODUCTION_TYPE' | 'PRODUCTION_TYPE'
| 'OTHER_TYPE' | 'OTHER_TYPE'
| 'LOGISTICS_TYPE'; | 'LOGISTICS_TYPE'
| 'EXPENSE_TYPE';
/** 费用归属0_无归属1_工头2_产地3_司机 */ /** 费用归属0_无归属1_工头2_产地3_司机 */
belong?: belong?:
| 'NONE_TYPE' | 'NONE_TYPE'
@ -1119,7 +1124,8 @@ declare namespace BusinessAPI {
| 'ARTIFICIAL_TYPE' | 'ARTIFICIAL_TYPE'
| 'PRODUCTION_TYPE' | 'PRODUCTION_TYPE'
| 'OTHER_TYPE' | 'OTHER_TYPE'
| 'LOGISTICS_TYPE'; | 'LOGISTICS_TYPE'
| 'EXPENSE_TYPE';
/** 费用归属0_无归属1_工头2_产地3_司机 */ /** 费用归属0_无归属1_工头2_产地3_司机 */
belong: 'NONE_TYPE' | 'WORKER_TYPE' | 'PRODUCTION_TYPE' | 'DRIVER_TYPE'; belong: 'NONE_TYPE' | 'WORKER_TYPE' | 'PRODUCTION_TYPE' | 'DRIVER_TYPE';
/** 费用名称 */ /** 费用名称 */
@ -1147,7 +1153,8 @@ declare namespace BusinessAPI {
| 'ARTIFICIAL_TYPE' | 'ARTIFICIAL_TYPE'
| 'PRODUCTION_TYPE' | 'PRODUCTION_TYPE'
| 'OTHER_TYPE' | 'OTHER_TYPE'
| 'LOGISTICS_TYPE'; | 'LOGISTICS_TYPE'
| 'EXPENSE_TYPE';
/** 费用归属0_无归属1_工头2_产地3_司机 */ /** 费用归属0_无归属1_工头2_产地3_司机 */
belong: 'NONE_TYPE' | 'WORKER_TYPE' | 'PRODUCTION_TYPE' | 'DRIVER_TYPE'; belong: 'NONE_TYPE' | 'WORKER_TYPE' | 'PRODUCTION_TYPE' | 'DRIVER_TYPE';
/** 费用名称 */ /** 费用名称 */
@ -1576,6 +1583,8 @@ declare namespace BusinessAPI {
strawMatCostFlag?: boolean; strawMatCostFlag?: boolean;
/** 发货单合计金额是否含包装费 */ /** 发货单合计金额是否含包装费 */
includePackingFlag?: boolean; includePackingFlag?: boolean;
/** 发货单合计金额是否含包运费 */
includeFreightFlag?: boolean;
/** 应收金额 */ /** 应收金额 */
receivable?: number; receivable?: number;
/** 备注 */ /** 备注 */
@ -1942,6 +1951,95 @@ declare namespace BusinessAPI {
userRoleList?: UserRoleVO[]; userRoleList?: UserRoleVO[];
}; };
type ExpenseCost = {
/** 明细ID */
expenseCostId: string;
/** 花销统计记录ID */
expenseRecordId: string;
/** 费用类型ID */
costId: string;
/** 费用类型名称 */
costName: string;
/** 花销金额 */
expenseAmount: string;
/** 备注(可填员工、事由等) */
remark?: string;
};
type ExpenseProvision = {
/** 明细ID */
expenseProvisionId: string;
/** 花销统计记录ID */
expenseRecordId: string;
/** 经销商名称 */
dealerName?: string;
/** 车次号 */
vehicleNo?: string;
/** 计提金额 */
provisionAmount: string;
/** 采购单ID */
orderId?: string;
};
type ExpenseRecordCreateCmd = {
/** 记录日期YYYY-MM-DD */
recordDate?: string;
/** 花销费用明细 */
expenseCostList?: ExpenseCost[];
/** 花销计提明细 */
expenseProvisionList?: ExpenseProvision[];
};
type ExpenseRecordListQry = {
/** 状态1_启用0_禁用 */
status?: boolean;
/** 开始日期 */
startDate?: string;
/** 结束日期 */
endDate?: string;
};
type ExpenseRecordShowQry = {
/** 状态1_启用0_禁用 */
status?: boolean;
/** 花销统计记录ID */
expenseRecordId?: string;
/** 记录日期YYYY-MM-DD */
recordDate?: string;
};
type ExpenseRecordUpdateCmd = {
/** 记录日期YYYY-MM-DD */
recordDate?: string;
/** 花销费用明细 */
expenseCostList?: ExpenseCost[];
/** 花销计提明细 */
expenseProvisionList?: ExpenseProvision[];
/** 花销统计记录ID */
expenseRecordId: string;
};
type ExpenseRecordVO = {
/** 记录ID */
expenseRecordId: string;
/** 记录日期YYYY-MM-DD */
recordDate?: string;
/** 计提车次数量 */
totalVehicleCount?: number;
/** 计提总金额 */
totalProvision?: number;
/** 花销总额 */
totalExpense?: number;
/** 日常利润 */
dailyProfit?: number;
/** 花销计提明细 */
expenseProvisionList?: ExpenseProvision[];
/** 花销费用明细 */
expenseCostList?: ExpenseCost[];
/** 创建时间 */
createdAt?: string;
};
type getLastVehicleNoParams = { type getLastVehicleNoParams = {
lastVehicleNoQry: LastVehicleNoQry; lastVehicleNoQry: LastVehicleNoQry;
}; };
@ -2107,6 +2205,10 @@ declare namespace BusinessAPI {
employeeListQry: EmployeeListQry; employeeListQry: EmployeeListQry;
}; };
type listExpenseRecordParams = {
expenseRecordListQry: ExpenseRecordListQry;
};
type listGiftBoxParams = { type listGiftBoxParams = {
giftBoxListQry: GiftBoxListQry; giftBoxListQry: GiftBoxListQry;
}; };
@ -2510,6 +2612,15 @@ declare namespace BusinessAPI {
notEmpty?: boolean; notEmpty?: boolean;
}; };
type MultiResponseExpenseRecordVO = {
success?: boolean;
errCode?: string;
errMessage?: string;
data?: ExpenseRecordVO[];
empty?: boolean;
notEmpty?: boolean;
};
type MultiResponseGiftBoxVO = { type MultiResponseGiftBoxVO = {
success?: boolean; success?: boolean;
errCode?: string; errCode?: string;
@ -2678,7 +2789,8 @@ declare namespace BusinessAPI {
| 'ARTIFICIAL_TYPE' | 'ARTIFICIAL_TYPE'
| 'PRODUCTION_TYPE' | 'PRODUCTION_TYPE'
| 'OTHER_TYPE' | 'OTHER_TYPE'
| 'LOGISTICS_TYPE'; | 'LOGISTICS_TYPE'
| 'EXPENSE_TYPE';
/** 关联项目id */ /** 关联项目id */
costItemIds?: number[]; costItemIds?: number[];
/** 是否选中 */ /** 是否选中 */
@ -2714,7 +2826,8 @@ declare namespace BusinessAPI {
| 'ARTIFICIAL_TYPE' | 'ARTIFICIAL_TYPE'
| 'PRODUCTION_TYPE' | 'PRODUCTION_TYPE'
| 'OTHER_TYPE' | 'OTHER_TYPE'
| 'LOGISTICS_TYPE'; | 'LOGISTICS_TYPE'
| 'EXPENSE_TYPE';
/** 关联项目id */ /** 关联项目id */
costItemIds?: number[]; costItemIds?: number[];
/** 是否付款 */ /** 是否付款 */
@ -2816,13 +2929,12 @@ declare namespace BusinessAPI {
| 'ARTIFICIAL_TYPE' | 'ARTIFICIAL_TYPE'
| 'PRODUCTION_TYPE' | 'PRODUCTION_TYPE'
| 'OTHER_TYPE' | 'OTHER_TYPE'
| 'LOGISTICS_TYPE'; | 'LOGISTICS_TYPE'
| 'EXPENSE_TYPE';
/** 关联项目id */ /** 关联项目id */
costItemIds?: number[]; costItemIds?: number[];
/** 创建时间 */ /** 创建时间 */
createdAt: string; createdAt: string;
/** 车辆信息 */
orderVehicle: OrderVehicle;
/** 采购订单状态: 0_草稿1_审核中2_已完成3_已驳回4_已关闭 */ /** 采购订单状态: 0_草稿1_审核中2_已完成3_已驳回4_已关闭 */
poState?: poState?:
| 'DRAFT' | 'DRAFT'
@ -2992,8 +3104,6 @@ declare namespace BusinessAPI {
amount?: number; amount?: number;
/** 创建时间 */ /** 创建时间 */
createdAt: string; createdAt: string;
/** 车辆信息 */
orderVehicle: OrderVehicle;
/** 采购订单状态: 0_草稿1_审核中2_已完成3_已驳回4_已关闭 */ /** 采购订单状态: 0_草稿1_审核中2_已完成3_已驳回4_已关闭 */
poState?: poState?:
| 'DRAFT' | 'DRAFT'
@ -3341,8 +3451,6 @@ declare namespace BusinessAPI {
isPaid?: boolean; isPaid?: boolean;
/** 采购订单包装箱信息 */ /** 采购订单包装箱信息 */
orderPackageList?: OrderPackage[]; orderPackageList?: OrderPackage[];
/** 采购订单车辆信息 */
orderVehicle?: OrderVehicle;
/** 采购订单公司信息 */ /** 采购订单公司信息 */
orderCompany?: OrderCompany; orderCompany?: OrderCompany;
/** 是否选中 */ /** 是否选中 */
@ -3489,8 +3597,6 @@ declare namespace BusinessAPI {
contractImg: UploadFileItem[]; contractImg: UploadFileItem[];
/** 创建时间 */ /** 创建时间 */
createdAt: string; createdAt: string;
/** 车辆信息 */
orderVehicle: OrderVehicle;
/** 采购订单状态: 0_草稿1_审核中2_已完成3_已驳回4_已关闭 */ /** 采购订单状态: 0_草稿1_审核中2_已完成3_已驳回4_已关闭 */
poState?: poState?:
| 'DRAFT' | 'DRAFT'
@ -4783,6 +4889,10 @@ declare namespace BusinessAPI {
employeeShowQry: EmployeeShowQry; employeeShowQry: EmployeeShowQry;
}; };
type showExpenseRecordParams = {
expenseRecordShowQry: ExpenseRecordShowQry;
};
type showGiftBoxParams = { type showGiftBoxParams = {
giftBoxShowQry: GiftBoxShowQry; giftBoxShowQry: GiftBoxShowQry;
}; };
@ -4947,6 +5057,13 @@ declare namespace BusinessAPI {
data?: EmployeeVO; data?: EmployeeVO;
}; };
type SingleResponseExpenseRecordVO = {
success?: boolean;
errCode?: string;
errMessage?: string;
data?: ExpenseRecordVO;
};
type SingleResponseGiftBoxVO = { type SingleResponseGiftBoxVO = {
success?: boolean; success?: boolean;
errCode?: string; errCode?: string;

File diff suppressed because one or more lines are too long