Compare commits

..

2 Commits

Author SHA1 Message Date
shenyifei
da1200716a feat(basic-data): 新增档口管理功能并优化瓜农列表
- 移除箱产品列表中的农夫箱类型选项
- 新增 MelonStallList 组件用于档口信息管理
- 重构 MelonFarmerList 组件国际化前缀及参数传递逻辑
- 导出 MelonStallList 组件便于页面引用
- 在基础数据索引文件中添加档口列表导出
- 更新采购订单列表组件支持自定义查询参数
- 添加产地采购和市场采购订单页面
- 完善档口相关国际化文案配置
- 调整供应商类型枚举值及采购订单类型字段
- 优化左侧菜单匹配逻辑以支持子菜单展开显示
- 修改部分接口字段类型定义提升数据准确性
2025-12-20 00:57:33 +08:00
shenyifei
3e24b86326 feat(order): 新增采购单相关组件及功能
- 新增 PurchaseOrderFormItem、PurchaseOrderModal 等采购单表单项组件
- 在 OrderCostList 和 OrderSupplierList 中集成采购单选择功能
- 新增 OrderRebateList 返利列表组件
- 实现采购单数据的展示与选择逻辑
- 添加采购单相关的搜索和筛选字段
- 支持采购单详情查看及关联数据显示
- 优化订单成本列表的创建表单结构
- 增加表格行选择和批量操作功能
- 完善采购单状态标签显示及样式处理
2025-12-19 17:30:08 +08:00
28 changed files with 1340 additions and 365 deletions

View File

@ -244,12 +244,6 @@ export default function BoxProductList(props: IBoxProductListProps) {
id: intlPrefix + '.type.thirdPartyBox', id: intlPrefix + '.type.thirdPartyBox',
}), }),
}, },
{
key: 'FARMER_BOX',
tab: intl.formatMessage({
id: intlPrefix + '.type.farmerBox',
}),
},
], ],
}, },
}} }}

View File

@ -5,8 +5,10 @@ import {
ModeType, ModeType,
} from '@/components'; } from '@/components';
import { business } from '@/services'; import { business } from '@/services';
import { formatBankCard, formatIdCard, formatPhone } from '@/utils/format';
import { formatParam } from '@/utils/formatParam'; import { formatParam } from '@/utils/formatParam';
import { useIntl } from '@@/exports'; import { useIntl } from '@@/exports';
import { EyeInvisibleOutlined, EyeTwoTone } from '@ant-design/icons';
import { import {
ActionType, ActionType,
ProColumns, ProColumns,
@ -15,8 +17,6 @@ import {
import { ProDescriptionsItemProps } from '@ant-design/pro-descriptions'; import { ProDescriptionsItemProps } from '@ant-design/pro-descriptions';
import { ProFormUploadMaterial } from '@chageable/components'; import { ProFormUploadMaterial } from '@chageable/components';
import React, { useRef, useState } from 'react'; import React, { useRef, useState } from 'react';
import { EyeInvisibleOutlined, EyeTwoTone } from '@ant-design/icons';
import { formatBankCard, formatIdCard, formatPhone } from '@/utils/format';
interface IMelonFarmerListProps { interface IMelonFarmerListProps {
ghost?: boolean; ghost?: boolean;
@ -37,7 +37,7 @@ export default function MelonFarmerList(props: IMelonFarmerListProps) {
onValueChange, onValueChange,
} = props; } = props;
const intl = useIntl(); const intl = useIntl();
const intlPrefix = 'supplier'; const intlPrefix = 'melonFarmer';
const actionRef = useRef<ActionType>(); const actionRef = useRef<ActionType>();
const [showIdCard, setShowIdCard] = useState<Record<string, boolean>>({}); const [showIdCard, setShowIdCard] = useState<Record<string, boolean>>({});
@ -142,6 +142,8 @@ export default function MelonFarmerList(props: IMelonFarmerListProps) {
]; ];
const formContext = [ const formContext = [
<ProFormText key={'type'} name={'type'} hidden={true} />,
<ProFormText key={'payeeName'} name={'payeeName'} hidden={true} />,
<ProFormText <ProFormText
key={'name'} key={'name'}
name={'name'} name={'name'}
@ -150,6 +152,12 @@ export default function MelonFarmerList(props: IMelonFarmerListProps) {
placeholder={intl.formatMessage({ placeholder={intl.formatMessage({
id: intlPrefix + '.form.name.placeholder', id: intlPrefix + '.form.name.placeholder',
})} })}
transform={(value) => {
return {
name: value,
payeeName: value,
};
}}
rules={[ rules={[
{ {
required: true, required: true,
@ -289,6 +297,9 @@ export default function MelonFarmerList(props: IMelonFarmerListProps) {
ghost, ghost,
//@ts-ignore //@ts-ignore
search, search,
params: {
type: 'FARMER',
},
}, },
columns, columns,
}} }}
@ -297,6 +308,7 @@ export default function MelonFarmerList(props: IMelonFarmerListProps) {
formContext, formContext,
initValues: { initValues: {
status: true, status: true,
type: 'FARMER',
}, },
}} }}
update={{ update={{

View File

@ -0,0 +1,253 @@
import {
BizContainer,
BizValueType,
MaterialList,
ModeType,
} from '@/components';
import { business } from '@/services';
import { formatBankCard } from '@/utils/format';
import { formatParam } from '@/utils/formatParam';
import { useIntl } from '@@/exports';
import { EyeInvisibleOutlined, EyeTwoTone } from '@ant-design/icons';
import {
ActionType,
ProColumns,
ProFormText,
} from '@ant-design/pro-components';
import { ProDescriptionsItemProps } from '@ant-design/pro-descriptions';
import { ProFormUploadMaterial } from '@chageable/components';
import React, { useRef, useState } from 'react';
interface IMelonStallListProps {
ghost?: boolean;
supplierId?: BusinessAPI.SupplierVO['supplierId'];
search?: boolean;
onValueChange?: () => void;
mode?: ModeType;
trigger?: () => React.ReactNode;
}
export default function MelonStallList(props: IMelonStallListProps) {
const {
ghost = false,
supplierId,
search = true,
mode = 'page',
trigger,
onValueChange,
} = props;
const intl = useIntl();
const intlPrefix = 'melonStall';
const actionRef = useRef<ActionType>();
const [showBankCard, setShowBankCard] = useState<Record<string, boolean>>({});
const columns: ProColumns<BusinessAPI.SupplierVO, BizValueType>[] = [
{
title: intl.formatMessage({ id: intlPrefix + '.column.name' }),
dataIndex: 'name',
key: 'name',
renderText: (text: string) => <span className="font-medium">{text}</span>,
},
{
title: intl.formatMessage({ id: intlPrefix + '.column.payeeName' }),
dataIndex: 'payeeName',
key: 'payeeName',
},
{
title: intl.formatMessage({ id: intlPrefix + '.column.bankCard' }),
dataIndex: 'bankCard',
key: 'bankCard',
render: (_, record) => (
<div className="flex items-center">
<span>
{formatBankCard(record.bankCard, showBankCard[record.supplierId])}
</span>
<span
className="ml-2 cursor-pointer"
onClick={() => {
setShowBankCard((prev) => ({
...prev,
[record.supplierId]: !prev[record.supplierId],
}));
}}
>
{showBankCard[record.supplierId] ? (
<EyeTwoTone />
) : (
<EyeInvisibleOutlined />
)}
</span>
</div>
),
},
{
title: intl.formatMessage({ id: intlPrefix + '.column.wechatQr' }),
dataIndex: 'wechatQr',
valueType: 'image',
key: 'wechatQr',
search: false,
},
];
const formContext = [
<ProFormText key={'type'} name={'type'} hidden={true} />,
<ProFormText key={'payeeName'} name={'payeeName'} 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',
}),
},
]}
/>,
<ProFormText
key={'payeeName'}
name={'payeeName'}
label={intl.formatMessage({ id: intlPrefix + '.form.payeeName.label' })}
required={true}
placeholder={intl.formatMessage({
id: intlPrefix + '.form.payeeName.placeholder',
})}
rules={[
{
required: true,
message: intl.formatMessage({
id: intlPrefix + '.form.payeeName.required',
}),
},
]}
/>,
<ProFormText
key={'bankCard'}
name={'bankCard'}
label={intl.formatMessage({ id: intlPrefix + '.form.bankCard.label' })}
required={true}
placeholder={intl.formatMessage({
id: intlPrefix + '.form.bankCard.placeholder',
})}
rules={[
{
required: true,
message: intl.formatMessage({
id: intlPrefix + '.form.bankCard.required',
}),
},
]}
/>,
<ProFormUploadMaterial
key={'wechatQr'}
label={intl.formatMessage({
id: intlPrefix + '.form.wechatQr.label',
})}
name={'wechatQrList'}
transform={(value) => {
return {
wechatQrList: value,
wechatQr: value[0],
};
}}
fieldProps={{
maxCount: 1,
actionRef: actionRef,
toolBarRender: () => [
<MaterialList
key={'create'}
ghost={true}
mode={'create'}
search={false}
onValueChange={() => actionRef.current?.reload()}
/>,
],
request: async (params, sorter, filter) => {
const { data, success, totalCount } =
await business.material.pageMaterial({
materialPageQry: formatParam<typeof params>(
params,
sorter,
filter,
),
});
return {
data: data || [],
total: totalCount,
success,
};
},
}}
/>,
];
const detailColumns: ProDescriptionsItemProps<
BusinessAPI.SupplierVO,
BizValueType
>[] = columns as ProDescriptionsItemProps<
BusinessAPI.SupplierVO,
BizValueType
>[];
return (
<BizContainer<
typeof business.supplier,
BusinessAPI.SupplierVO,
BusinessAPI.SupplierPageQry,
BusinessAPI.SupplierCreateCmd,
BusinessAPI.SupplierUpdateCmd
>
rowKey={'supplierId'}
permission={'operation-supplier'}
func={business.supplier}
method={'supplier'}
methodUpper={'Supplier'}
intlPrefix={intlPrefix}
modeType={mode}
onValueChange={onValueChange}
container={{}}
remark={{
mode: 'editor',
}}
status
page={{
fieldProps: {
bordered: true,
ghost,
//@ts-ignore
search,
params: {
type: 'STALL',
},
},
columns,
}}
create={{
formType: 'drawer',
formContext,
initValues: {
status: true,
type: 'STALL',
},
}}
update={{
formType: 'drawer',
formContext,
}}
destroy={{}}
detail={{
rowId: supplierId,
formType: 'drawer',
columns: detailColumns,
trigger,
}}
/>
);
}

View File

@ -1,4 +1,5 @@
export { default as MelonFarmerList } from './MelonFarmerList'; export { default as MelonFarmerList } from './MelonFarmerList';
export { default as MelonStallList } from './MelonStallList';
export { default as BoxProductList } from './BoxProductList' export { default as BoxProductList } from './BoxProductList'
export { default as BoxBrandList } from './BoxBrandList'; export { default as BoxBrandList } from './BoxBrandList';
export { default as CostList } from './CostList'; export { default as CostList } from './CostList';

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

@ -13,6 +13,7 @@ interface IPurchaseOrderListProps {
onValueChange?: () => void; onValueChange?: () => void;
mode?: ModeType; mode?: ModeType;
trigger?: () => React.ReactNode; trigger?: () => React.ReactNode;
params?: BusinessAPI.PurchaseOrderPageQry;
} }
export default function PurchaseOrderList(props: IPurchaseOrderListProps) { export default function PurchaseOrderList(props: IPurchaseOrderListProps) {
@ -23,6 +24,7 @@ export default function PurchaseOrderList(props: IPurchaseOrderListProps) {
mode = 'page', mode = 'page',
trigger, trigger,
onValueChange, onValueChange,
params,
} = props; } = props;
const intl = useIntl(); const intl = useIntl();
const intlPrefix = 'purchaseOrder'; const intlPrefix = 'purchaseOrder';
@ -55,7 +57,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' }),
@ -150,6 +156,7 @@ export default function PurchaseOrderList(props: IPurchaseOrderListProps) {
...(activeKey !== 'ALL' && { ...(activeKey !== 'ALL' && {
state: activeKey! as BusinessAPI.PurchaseOrderVO['state'], state: activeKey! as BusinessAPI.PurchaseOrderVO['state'],
}), }),
...params,
}, },
toolbar: { toolbar: {
menu: { menu: {

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: '是否开启计提税金',
}, },
@ -1107,9 +1117,9 @@ export default {
}, },
}, },
}, },
supplier: { melonFarmer: {
column: { column: {
name: '姓名', name: '瓜农姓名',
idCard: '身份证号', idCard: '身份证号',
phone: '手机号', phone: '手机号',
bankCard: '银行卡号', bankCard: '银行卡号',
@ -1197,6 +1207,90 @@ export default {
}, },
}, },
}, },
melonStall: {
column: {
name: '档口名称',
payeeName: '收款人姓名',
bankCard: '银行卡号',
wechatQr: '微信收款码',
remark: '备注',
status: '状态',
'status.enum.enabled': '正常',
'status.enum.disabled': '禁用',
'status.placeholder': '请选择状态',
createdAt: '创建时间',
option: '操作',
},
form: {
name: {
label: '档口名称',
placeholder: '请输入档口名称',
required: '档口名称为必填项',
},
payeeName: {
label: '收款人姓名',
placeholder: '请输收款人姓名',
required: '收款人姓名为必填项',
},
bankCard: {
label: '银行卡号',
placeholder: '请输入银行卡号',
required: '银行卡号为必填项',
},
wechatQr: {
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: '查看',
},
},
},
boxSpec: { boxSpec: {
column: { column: {
name: '规格名称', name: '规格名称',
@ -1347,8 +1441,7 @@ export default {
type: { type: {
all: '全部', all: '全部',
ourBox: '自产箱', ourBox: '自产箱',
farmerBox: '农夫箱', thirdPartyBox: '无利润箱',
thirdPartyBox: '第三方箱',
giftBox: '礼盒', giftBox: '礼盒',
}, },
column: { column: {
@ -2152,7 +2245,7 @@ export default {
invoiceAmount: '应开发票金额(元)', invoiceAmount: '应开发票金额(元)',
depositAmount: '已付定金(元)', depositAmount: '已付定金(元)',
remainingAmount: '剩余付款金额(元)', remainingAmount: '剩余付款金额(元)',
purchaseOrder: '关联采购单', purchaseOrder: '采购单',
deliveryTime: '采购日期', deliveryTime: '采购日期',
dealerName: '经销商名称', dealerName: '经销商名称',
vehicleNo: '车次号', vehicleNo: '车次号',
@ -2202,16 +2295,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 +2369,7 @@ export default {
'calcMethod.notFixed': '不固定模式', 'calcMethod.notFixed': '不固定模式',
netWeight: '净重(斤)', netWeight: '净重(斤)',
unitPrice: '单价(元/斤)', unitPrice: '单价(元/斤)',
purchaseOrder: '关联采购单', purchaseOrder: '采购单',
orderVehicle: '关联车辆', orderVehicle: '关联车辆',
orderCompany: '所属公司', orderCompany: '所属公司',
isPaid: '是否付款', isPaid: '是否付款',
@ -2313,11 +2407,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

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

View File

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

View File

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

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';
/** 费用名称 */ /** 费用名称 */
@ -1211,6 +1218,8 @@ declare namespace BusinessAPI {
strawMatCostFlag?: boolean; strawMatCostFlag?: boolean;
/** 发货单合计金额是否含包装费 */ /** 发货单合计金额是否含包装费 */
includePackingFlag?: boolean; includePackingFlag?: boolean;
/** 发货单合计金额是否含包运费 */
includeFreightFlag?: boolean;
/** 应收金额 */ /** 应收金额 */
receivable?: number; receivable?: number;
/** 备注 */ /** 备注 */
@ -1533,6 +1542,8 @@ declare namespace BusinessAPI {
strawMatCostFlag?: boolean; strawMatCostFlag?: boolean;
/** 发货单合计金额是否含包装费 */ /** 发货单合计金额是否含包装费 */
includePackingFlag?: boolean; includePackingFlag?: boolean;
/** 发货单合计金额是否含包运费 */
includeFreightFlag?: boolean;
/** 应收金额 */ /** 应收金额 */
receivable?: number; receivable?: number;
/** 备注 */ /** 备注 */
@ -1576,6 +1587,8 @@ declare namespace BusinessAPI {
strawMatCostFlag?: boolean; strawMatCostFlag?: boolean;
/** 发货单合计金额是否含包装费 */ /** 发货单合计金额是否含包装费 */
includePackingFlag?: boolean; includePackingFlag?: boolean;
/** 发货单合计金额是否含包运费 */
includeFreightFlag?: boolean;
/** 应收金额 */ /** 应收金额 */
receivable?: number; receivable?: number;
/** 备注 */ /** 备注 */
@ -1942,6 +1955,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: number;
/** 采购单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 +2209,10 @@ declare namespace BusinessAPI {
employeeListQry: EmployeeListQry; employeeListQry: EmployeeListQry;
}; };
type listExpenseRecordParams = {
expenseRecordListQry: ExpenseRecordListQry;
};
type listGiftBoxParams = { type listGiftBoxParams = {
giftBoxListQry: GiftBoxListQry; giftBoxListQry: GiftBoxListQry;
}; };
@ -2510,6 +2616,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 +2793,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 +2830,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 +2933,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'
@ -2859,6 +2975,8 @@ declare namespace BusinessAPI {
strawMatCostFlag?: boolean; strawMatCostFlag?: boolean;
/** 发货单合计金额是否含包装费 */ /** 发货单合计金额是否含包装费 */
includePackingFlag?: boolean; includePackingFlag?: boolean;
/** 发货单合计金额是否含包运费 */
includeFreightFlag?: boolean;
/** 是否开启计提税金 */ /** 是否开启计提税金 */
enableAccrualTax?: boolean; enableAccrualTax?: boolean;
/** 计提税金比例 */ /** 计提税金比例 */
@ -2992,8 +3110,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'
@ -3289,6 +3405,8 @@ declare namespace BusinessAPI {
phone: string; phone: string;
/** 微信二维码 */ /** 微信二维码 */
wechatQr?: string; wechatQr?: string;
/** 供应商类型1_瓜农2_档口 */
type: 'FARMER' | 'STALL';
/** 是否最后一家 */ /** 是否最后一家 */
isLast: boolean; isLast: boolean;
/** 空磅是否包含纸箱 */ /** 空磅是否包含纸箱 */
@ -3341,8 +3459,6 @@ declare namespace BusinessAPI {
isPaid?: boolean; isPaid?: boolean;
/** 采购订单包装箱信息 */ /** 采购订单包装箱信息 */
orderPackageList?: OrderPackage[]; orderPackageList?: OrderPackage[];
/** 采购订单车辆信息 */
orderVehicle?: OrderVehicle;
/** 采购订单公司信息 */ /** 采购订单公司信息 */
orderCompany?: OrderCompany; orderCompany?: OrderCompany;
/** 是否选中 */ /** 是否选中 */
@ -3443,6 +3559,8 @@ declare namespace BusinessAPI {
phone: string; phone: string;
/** 微信二维码 */ /** 微信二维码 */
wechatQr: string; wechatQr: string;
/** 供应商类型1_瓜农2_档口 */
type: 'FARMER' | 'STALL';
/** 是否最后一家 */ /** 是否最后一家 */
isLast: boolean; isLast: boolean;
/** 空磅是否包含纸箱 */ /** 空磅是否包含纸箱 */
@ -3489,8 +3607,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'
@ -4277,6 +4393,8 @@ declare namespace BusinessAPI {
| 'BOSS_APPROVED' | 'BOSS_APPROVED'
| 'QUOTE_REJECTED' | 'QUOTE_REJECTED'
| 'BOSS_REJECTED'; | 'BOSS_REJECTED';
/** 采购类型1_产地采购2_市场采购 */
type?: 'PRODUCTION_PURCHASE' | 'MARKET_PURCHASE';
}; };
type PurchaseOrderCreateCmd = { type PurchaseOrderCreateCmd = {
@ -4352,6 +4470,8 @@ declare namespace BusinessAPI {
| 'BOSS_APPROVED' | 'BOSS_APPROVED'
| 'QUOTE_REJECTED' | 'QUOTE_REJECTED'
| 'BOSS_REJECTED'; | 'BOSS_REJECTED';
/** 采购类型1_产地采购2_市场采购 */
type?: 'PRODUCTION_PURCHASE' | 'MARKET_PURCHASE';
/** 供应商名称 */ /** 供应商名称 */
supplierName?: string; supplierName?: string;
/** 经销商ID */ /** 经销商ID */
@ -4472,6 +4592,8 @@ declare namespace BusinessAPI {
| 'BOSS_APPROVED' | 'BOSS_APPROVED'
| 'QUOTE_REJECTED' | 'QUOTE_REJECTED'
| 'BOSS_REJECTED'; | 'BOSS_REJECTED';
/** 采购类型1_产地采购2_市场采购 */
type?: 'PRODUCTION_PURCHASE' | 'MARKET_PURCHASE';
/** 备注 */ /** 备注 */
remark?: string; remark?: string;
/** 创建人ID */ /** 创建人ID */
@ -4783,6 +4905,10 @@ declare namespace BusinessAPI {
employeeShowQry: EmployeeShowQry; employeeShowQry: EmployeeShowQry;
}; };
type showExpenseRecordParams = {
expenseRecordShowQry: ExpenseRecordShowQry;
};
type showGiftBoxParams = { type showGiftBoxParams = {
giftBoxShowQry: GiftBoxShowQry; giftBoxShowQry: GiftBoxShowQry;
}; };
@ -4947,6 +5073,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;
@ -5137,6 +5270,8 @@ declare namespace BusinessAPI {
supplierId?: string; supplierId?: string;
/** 供应商名称 */ /** 供应商名称 */
name?: string; name?: string;
/** 供应商类型1_瓜农2_档口 */
type?: 'FARMER' | 'STALL';
}; };
type SupplierPackageUsage = { type SupplierPackageUsage = {
@ -5171,6 +5306,8 @@ declare namespace BusinessAPI {
phone?: string; phone?: string;
/** 银行卡号 */ /** 银行卡号 */
bankCard?: string; bankCard?: string;
/** 供应商类型1_瓜农2_档口 */
type?: 'FARMER' | 'STALL';
offset?: number; offset?: number;
}; };
@ -5213,6 +5350,8 @@ declare namespace BusinessAPI {
bankCard: string; bankCard: string;
/** 微信收款码URL */ /** 微信收款码URL */
wechatQr?: string; wechatQr?: string;
/** 供应商类型1_瓜农2_档口 */
type: 'FARMER' | 'STALL';
/** 备注 */ /** 备注 */
remark?: string; remark?: string;
/** 状态1_启用0_禁用 */ /** 状态1_启用0_禁用 */

View File

@ -74,11 +74,14 @@ const LeftMenu: React.FC<ILeftMenuProps> = (props) => {
}); });
// 通过循环 moduleMenu 判断 history.location.pathname 是否包含 key // 通过循环 moduleMenu 判断 history.location.pathname 是否包含 key
const activeMenu = getMatchMenu(pathname, menuData); const activeMenu = getMatchMenu(pathname, menuData, true);
// pluck activeMenu key // pluck activeMenu key
const activeMenuKey = activeMenu.map( const activeMenuKey = activeMenu.map(
(item: MenuDataItem) => item.key as string, (item: MenuDataItem) => item.key as string,
); );
const openKeys = activeMenu.flatMap((item: MenuDataItem) => item.children).map(
(item: any) => item?.key as string,
);
let subMenu: MenuItemType[] = []; let subMenu: MenuItemType[] = [];
if (activeMenu[0]?.children) { if (activeMenu[0]?.children) {
@ -114,6 +117,7 @@ const LeftMenu: React.FC<ILeftMenuProps> = (props) => {
items={subMenu} items={subMenu}
className={styles.subMenu} className={styles.subMenu}
selectedKeys={activeMenuKey} selectedKeys={activeMenuKey}
openKeys={openKeys}
mode="inline" mode="inline"
inlineIndent={12} inlineIndent={12}
onClick={(item) => { onClick={(item) => {

File diff suppressed because one or more lines are too long