feat(biz): 添加公司和付款任务类型支持

- 在BizContainer中新增company和paymentTask类型的支持
- 添加ProFormSelect组件用于公司选择
- 实现公司列表和付款任务列表的渲染功能
- 更新typing.ts中支持新的valueType类型
- 集成business服务的公司列表API
- 添加PaymentTaskFormItem和PaymentTaskList组件导出
- 优化付款任务创建和支付流程
- 修复付款凭证字段名称和数据结构
- 添加完整的付款记录列表页面和组件
- 更新本地化文件中的付款相关文案
- 修正数据类型定义中的ID字段类型
- 添加付款记录的统计和筛选功能
This commit is contained in:
shenyifei 2026-01-07 15:20:17 +08:00
parent 7260b089e9
commit b98026b9b7
23 changed files with 1550 additions and 105 deletions

View File

@ -13,11 +13,14 @@ import {
BizTree,
BizUpdate,
BizValueType,
CompanyList,
DealerFormItem,
DealerList,
OrderFormItem,
OrderList,
PageContainer,
PaymentTaskFormItem,
PaymentTaskList,
Remark,
RemarkFormItem,
SmartActionBar,
@ -26,6 +29,7 @@ import {
UserFormItem,
UserList,
} from '@/components';
import { business } from '@/services';
import { useIntl } from '@@/exports';
import { UserOutlined } from '@ant-design/icons';
import {
@ -33,6 +37,7 @@ import {
ParamsType,
ProColumns,
ProFormDependency,
ProFormSelect,
ProFormSwitch,
ProFormTextArea,
ProProvider,
@ -849,6 +854,72 @@ export default function BizContainer<
);
},
},
company: {
renderFormItem: (_, props) => {
return (
<ProFormSelect
{...props}
{...props?.fieldProps}
request={async (params) => {
const { data } = await business.company.listCompany({
companyListQry: {
...params,
},
});
return (
data?.map((item) => {
return {
label: item.fullName,
value: item.companyId,
};
}) || []
);
}}
/>
);
},
render: (companyVO: BusinessAPI.CompanyVO) => {
return (
companyVO && (
<CompanyList
ghost={true}
mode={'detail'}
companyId={companyVO.companyId}
trigger={() => (
<Space>
<a>{companyVO.shortName}</a>
</Space>
)}
/>
)
);
},
},
paymentTask: {
renderFormItem: (_, props) => {
return (
<PaymentTaskFormItem {...props} {...props?.fieldProps} />
);
},
render: (paymentTaskVO: BusinessAPI.PaymentTaskVO) => {
console.log('paymentTaskVO', paymentTaskVO);
return (
paymentTaskVO && (
<PaymentTaskList
ghost={true}
mode={'detail'}
paymentTaskId={paymentTaskVO.paymentTaskId}
trigger={() => (
<Space>
<a>{paymentTaskVO.paymentTaskSn}</a>
</Space>
)}
/>
)
);
},
},
supplier: {
renderFormItem: (_, props) => {
return (

View File

@ -22,6 +22,8 @@ export type BizValueType =
| 'remark'
| 'order'
| 'dealer'
| 'paymentTask'
| 'company'
| 'supplier';
export type FormType = 'modal' | 'drawer' | 'step';
export type ModeType =

View File

@ -56,6 +56,10 @@ export default function CompanyPaymentAccountSearch(
onFinish={async (accountList) => {
if (accountList.length > 0) {
const account = accountList[0];
console.log('accountList', account, {
companyPaymentAccountId: account?.accountId,
companyPaymentAccountVO: account,
});
form.setFieldsValue({
companyPaymentAccountId: account?.accountId,
companyPaymentAccountVO: account,

View File

@ -14,6 +14,7 @@ export default function CompanyPaymentAccountSelect(
props: ICompanyPaymentAccountSelectProps,
) {
const intl = useIntl();
console.log('props', props);
return (
<ProFormDependency name={['companyPaymentAccountVO', 'canChangeAccount']}>
@ -31,12 +32,6 @@ export default function CompanyPaymentAccountSelect(
label={intl.formatMessage({
id: 'form.companyPaymentAccountId.label',
})}
transform={(account) => {
return {
companyPaymentAccountVO: account,
companyPaymentAccountId: account?.accountId,
};
}}
name={'companyPaymentAccountVO'}
required={true}
placeholder={intl.formatMessage({

View File

@ -0,0 +1,385 @@
import { BizContainer, BizValueType, ModeType } from '@/components';
import { business } from '@/services';
import { formatCurrency } from '@/utils/format';
import { useIntl } from '@@/exports';
import { ActionType, ProColumns } from '@ant-design/pro-components';
import { ProDescriptionsItemProps } from '@ant-design/pro-descriptions';
import { Space } from 'antd';
import React, { useRef, useState } from 'react';
interface IPaymentRecordListProps {
ghost?: boolean;
paymentRecordId?: BusinessAPI.PaymentRecordVO['paymentRecordId'];
search?: boolean;
onValueChange?: () => void;
mode?: ModeType;
trigger?: () => React.ReactNode;
}
export default function PaymentRecordList(props: IPaymentRecordListProps) {
const {
ghost = false,
paymentRecordId,
search = true,
mode = 'page',
trigger,
onValueChange,
} = props;
const intl = useIntl();
const intlPrefix = 'paymentRecord';
const actionRef = useRef<ActionType>();
const [activeKey, setActiveKey] = useState<
BusinessAPI.PaymentRecordPageQry['paidState'] | 'ALL'
>('ALL');
// const [totalCount, setTotalCount] = useState(0);
// const [draftCount, setDraftCount] = useState(0);
// const [paidCount, setPaidCount] = useState(0);
/** 状态文本映射 */
const stateMap: Record<string, { text: string; color: string }> = {
DRAFT: {
text: intl.formatMessage({ id: intlPrefix + '.state.draft' }),
color: 'orange',
},
PAID: {
text: intl.formatMessage({ id: intlPrefix + '.state.paid' }),
color: 'green',
},
};
/** 付款对象类型映射 */
const targetTypeMap: Record<string, { text: string }> = {
SUPPLIER: {
text: intl.formatMessage({ id: intlPrefix + '.targetType.supplier' }),
},
COST: {
text: intl.formatMessage({ id: intlPrefix + '.targetType.cost' }),
},
};
/** 付款对象类型映射 */
const accountCategoryMap: Record<string, { text: string }> = {
COMPANY_ACCOUNT: {
text: intl.formatMessage({ id: intlPrefix + '.accountCategory.company' }),
},
PRIVATE_ACCOUNT: {
text: intl.formatMessage({ id: intlPrefix + '.accountCategory.private' }),
},
};
/** 账户类型映射 */
const accountTypeMap: Record<string, { text: string; color?: string }> = {
BANK_CARD: {
text: intl.formatMessage({ id: intlPrefix + '.accountType.bankCard' }),
color: 'blue',
},
ALIPAY: {
text: intl.formatMessage({ id: intlPrefix + '.accountType.alipay' }),
color: 'cyan',
},
WECHAT: {
text: intl.formatMessage({ id: intlPrefix + '.accountType.wechat' }),
color: 'green',
},
};
const columns: ProColumns<BusinessAPI.PaymentRecordVO, BizValueType>[] = [
{
title: intl.formatMessage({ id: intlPrefix + '.column.paymentRecordSn' }),
dataIndex: 'paymentRecordSn',
key: 'paymentRecordSn',
},
{
title: intl.formatMessage({ id: intlPrefix + '.column.paymentTask' }),
dataIndex: 'paymentTaskVO',
key: 'paymentTask',
valueType: 'paymentTask',
},
{
title: intl.formatMessage({ id: intlPrefix + '.column.supplier' }),
dataIndex: 'supplierVO',
key: 'supplier',
valueType: 'supplier',
},
{
title: intl.formatMessage({ id: intlPrefix + '.column.company' }),
dataIndex: 'companyVO',
key: 'companyId',
valueType: 'company',
},
{
title: intl.formatMessage({ id: intlPrefix + '.column.accountType' }),
dataIndex: 'accountType',
key: 'accountType',
valueType: 'select',
valueEnum: accountTypeMap,
},
{
title: intl.formatMessage({ id: intlPrefix + '.column.accountCategory' }),
dataIndex: 'accountCategory',
key: 'accountCategory',
valueType: 'select',
valueEnum: accountCategoryMap,
},
{
title: intl.formatMessage({ id: intlPrefix + '.column.accountName' }),
dataIndex: 'accountName',
key: 'accountName',
},
{
title: intl.formatMessage({ id: intlPrefix + '.column.accountNumber' }),
dataIndex: 'accountNumber',
key: 'accountNumber',
ellipsis: true,
width: 180,
},
{
title: intl.formatMessage({ id: intlPrefix + '.column.paidAmount' }),
dataIndex: 'paidAmount',
key: 'paidAmount',
valueType: 'money',
search: false,
renderText: (value: number) => formatCurrency(value),
},
{
title: intl.formatMessage({ id: intlPrefix + '.column.paidAt' }),
dataIndex: 'paidAt',
key: 'paidAt',
valueType: 'dateTime',
search: false,
},
{
title: intl.formatMessage({ id: intlPrefix + '.column.paidState' }),
dataIndex: 'paidState',
key: 'paidState',
valueType: 'select',
search: false,
valueEnum: {
false: { text: stateMap.DRAFT.text, status: 'Warning' },
true: { text: stateMap.PAID.text, status: 'Success' },
},
render: (_, record) => {
const stateInfo = record.paidState ? stateMap.PAID : stateMap.DRAFT;
return <span style={{ color: stateInfo.color }}>{stateInfo.text}</span>;
},
},
];
const detailColumns: ProDescriptionsItemProps<
BusinessAPI.PaymentRecordVO,
BizValueType
>[] = [
{
title: intl.formatMessage({ id: intlPrefix + '.column.paymentRecordSn' }),
dataIndex: 'paymentRecordSn',
},
{
title: intl.formatMessage({ id: intlPrefix + '.column.targetType' }),
dataIndex: 'targetType',
valueEnum: targetTypeMap,
},
{
title: intl.formatMessage({ id: intlPrefix + '.column.accountType' }),
dataIndex: 'accountType',
valueEnum: accountTypeMap,
},
{
title: intl.formatMessage({ id: intlPrefix + '.column.accountCategory' }),
dataIndex: 'accountCategory',
valueType: 'select',
valueEnum: {
COMPANY_ACCOUNT: {
text: intl.formatMessage({
id: intlPrefix + '.accountCategory.company',
}),
},
PRIVATE_ACCOUNT: {
text: intl.formatMessage({
id: intlPrefix + '.accountCategory.private',
}),
},
},
},
{
title: intl.formatMessage({ id: intlPrefix + '.column.bankName' }),
dataIndex: 'bankName',
},
{
title: intl.formatMessage({ id: intlPrefix + '.column.branchName' }),
dataIndex: 'branchName',
},
{
title: intl.formatMessage({ id: intlPrefix + '.column.accountName' }),
dataIndex: 'accountName',
},
{
title: intl.formatMessage({ id: intlPrefix + '.column.accountNumber' }),
dataIndex: 'accountNumber',
},
{
title: intl.formatMessage({ id: intlPrefix + '.column.paidAmount' }),
dataIndex: 'paidAmount',
render: (_, record) => formatCurrency(record.paidAmount),
},
{
title: intl.formatMessage({ id: intlPrefix + '.column.paidAt' }),
dataIndex: 'paidAt',
valueType: 'dateTime',
},
{
title: intl.formatMessage({ id: intlPrefix + '.column.paidState' }),
dataIndex: 'paidState',
valueType: 'select',
valueEnum: {
false: { text: stateMap.DRAFT.text },
true: { text: stateMap.PAID.text },
},
render: (_, record) => {
const stateInfo = record.paidState ? stateMap.PAID : stateMap.DRAFT;
return (
<Space>
<span
style={{
display: 'inline-block',
width: 8,
height: 8,
borderRadius: '50%',
backgroundColor: stateInfo.color,
}}
/>
<span>{stateInfo.text}</span>
</Space>
);
},
},
{
title: intl.formatMessage({ id: intlPrefix + '.column.paidCredentials' }),
dataIndex: 'paidCredentials',
valueType: 'image',
},
];
return (
<BizContainer<
typeof business.paymentRecord,
BusinessAPI.PaymentRecordVO,
BusinessAPI.PaymentRecordPageQry,
BusinessAPI.PaymentRecordCreateCmd,
BusinessAPI.PaymentRecordUpdateCmd
>
rowKey={'paymentRecordId'}
permission={'operation-payment-record'}
func={business.paymentRecord}
method={'paymentRecord'}
methodUpper={'PaymentRecord'}
intlPrefix={intlPrefix}
modeType={mode}
onValueChange={onValueChange}
container={{
fieldProps: {
ghost,
},
}}
remark={{
mode: 'editor',
}}
page={{
fieldProps: {
actionRef: actionRef,
bordered: true,
...(!ghost &&
{
// tableExtraRender: () => (
// <StatisticCard.Group className={'statistics'}>
// <StatisticCard
// statistic={{
// title: intl.formatMessage({
// id: intlPrefix + '.statistics.total',
// }),
// value: totalCount,
// }}
// />
// <StatisticCard.Operation>=</StatisticCard.Operation>
// <StatisticCard
// statistic={{
// title: intl.formatMessage({
// id: intlPrefix + '.statistics.draft',
// }),
// value: draftCount,
// }}
// style={{ color: stateMap.DRAFT.color }}
// />
// <StatisticCard.Operation>+</StatisticCard.Operation>
// <StatisticCard
// statistic={{
// title: intl.formatMessage({
// id: intlPrefix + '.statistics.paid',
// }),
// value: paidCount,
// }}
// style={{ color: stateMap.PAID.color }}
// />
// </StatisticCard.Group>
// ),
}),
ghost,
//@ts-ignore
search,
params: {
...(activeKey !== 'ALL' && {
paidState: activeKey,
}),
targetType: 'SUPPLIER',
},
toolbar: {
menu: {
type: 'tab',
activeKey: activeKey,
items: [
{
key: 'ALL',
label: intl.formatMessage({
id: intlPrefix + '.tab.all',
}),
},
{
key: 'DRAFT',
label: intl.formatMessage({
id: intlPrefix + '.tab.draft',
}),
},
{
key: 'PAID',
label: intl.formatMessage({
id: intlPrefix + '.tab.paid',
}),
},
],
onChange: (key) => {
setActiveKey(key as any);
},
},
},
},
columns,
options: () => {
return [];
},
}}
create={false}
update={{
formType: 'drawer',
formContext: [],
}}
destroy={{}}
detail={{
rowId: paymentRecordId,
formType: 'drawer',
columns: detailColumns,
formContextMode: 'flat',
trigger,
}}
/>
);
}

View File

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

View File

@ -70,7 +70,6 @@ export default function PaymentTaskCreate(props: IPaymentTaskCreateProps) {
const paymentTaskData: BusinessAPI.PaymentTaskCreateCmd = {
taskName: formData.taskName,
taskType: 'MELON_FARMER', // 瓜农付款任务
paymentCode: `PAY-${Date.now()}`, // 生成付款编码
targetId: selectedSupplier.supplierId,
totalAmount: totalAmount,
paidAmount: 0,

View File

@ -0,0 +1,62 @@
import { PaymentTaskModal } from '@/components';
import { ProFormSelect } from '@ant-design/pro-components';
import { ProFieldFCRenderProps } from '@ant-design/pro-provider';
import { useState } from 'react';
export interface IPaymentTaskFormItemProps extends Omit<
ProFieldFCRenderProps,
'value' | 'onChange'
> {
value?: BusinessAPI.PaymentTaskVO['paymentTaskId'];
onChange?: (value?: BusinessAPI.PaymentTaskVO['paymentTaskId']) => void;
}
export default function PaymentTaskFormItem(props: IPaymentTaskFormItemProps) {
const { value, onChange } = props;
const [showPaymentTaskModal, setShowPaymentTaskModal] =
useState<boolean>(false);
const [paymentTaskList, setPaymentTaskList] =
useState<(BusinessAPI.PaymentTaskVO | undefined)[]>();
return (
<>
<ProFormSelect
fieldProps={{
open: false,
onClear: () => {
onChange?.(undefined);
},
onClick: () => {
setShowPaymentTaskModal(true);
},
value: value,
placeholder: '请选择付款任务',
options: paymentTaskList?.map(
(paymentTaskVO?: BusinessAPI.PaymentTaskVO) => {
return {
value: paymentTaskVO?.paymentTaskId,
label: paymentTaskVO?.taskName || paymentTaskVO?.paymentTaskSn,
};
},
),
}}
/>
<PaymentTaskModal
title={'选择付款任务'}
open={showPaymentTaskModal}
onOk={() => setShowPaymentTaskModal(false)}
onCancel={() => setShowPaymentTaskModal(false)}
onFinish={async (paymentTaskVOList) => {
if (paymentTaskVOList.length > 0) {
const paymentTaskVO = paymentTaskVOList[0];
onChange?.(paymentTaskVO?.paymentTaskId);
setPaymentTaskList(paymentTaskVOList);
setShowPaymentTaskModal(false);
}
}}
type={'radio'}
/>
</>
);
}

View File

@ -82,9 +82,9 @@ export default function PaymentTaskList(props: IPaymentTaskListProps) {
const columns: ProColumns<BusinessAPI.PaymentTaskVO, BizValueType>[] = [
{
title: intl.formatMessage({ id: intlPrefix + '.column.paymentCode' }),
dataIndex: 'paymentCode',
key: 'paymentCode',
title: intl.formatMessage({ id: intlPrefix + '.column.paymentTaskSn' }),
dataIndex: 'paymentTaskSn',
key: 'paymentTaskSn',
},
{
title: intl.formatMessage({ id: intlPrefix + '.column.taskName' }),
@ -436,8 +436,8 @@ export default function PaymentTaskList(props: IPaymentTaskListProps) {
modeType={mode}
onValueChange={onValueChange}
container={{
fieldProps: {
ghost,
fieldProps: {
loading,
},
}}

View File

@ -0,0 +1,291 @@
import { SelectModal } from '@/components';
import { business } from '@/services';
import { formatParam } from '@/utils/formatParam';
import { pagination } from '@/utils/pagination';
import { useIntl } from '@@/exports';
import {
ActionType,
LightFilter,
ProColumns,
} from '@ant-design/pro-components';
import { Alert, ModalProps, Row, Space, Tag } from 'antd';
import React, { useEffect, useRef, useState } from 'react';
export interface IPaymentTaskModalProps extends ModalProps {
title: string;
selectedList?: BusinessAPI.PaymentTaskVO[];
onFinish: (paymentTaskVOList: BusinessAPI.PaymentTaskVO[]) => void;
type: 'checkbox' | 'radio' | undefined;
params?: BusinessAPI.PaymentTaskPageQry;
num?: number;
tips?: string;
extraFilter?: React.ReactNode[];
extraColumns?: ProColumns<BusinessAPI.PaymentTaskVO>[];
}
export default function PaymentTaskModal(props: IPaymentTaskModalProps) {
const {
title,
onFinish,
type,
selectedList,
params: initParams,
num = 10,
tips,
extraFilter = [],
extraColumns: initExtraColumns = [],
...rest
} = props;
const actionRef = useRef<ActionType>();
const sessionKey = `paymentTaskList`;
const [params, setParams] = useState<BusinessAPI.PaymentTaskPageQry>(
initParams || {},
);
useEffect(() => {
if (initParams) {
setParams({
...params,
...initParams,
});
}
}, [initParams]);
const intl = useIntl();
const intlPrefix = 'paymentTask';
const columns: ProColumns<BusinessAPI.PaymentTaskVO>[] = [
{
title: intl.formatMessage({ id: intlPrefix + '.column.taskName' }),
dataIndex: 'taskName',
key: 'taskName',
renderText: (text: string) => <span className="font-medium">{text}</span>,
},
{
title: intl.formatMessage({ id: intlPrefix + '.column.paymentTaskSn' }),
dataIndex: 'paymentTaskSn',
key: 'paymentTaskSn',
},
{
title: intl.formatMessage({ id: intlPrefix + '.column.state' }),
dataIndex: 'state',
key: 'state',
valueType: 'select',
valueEnum: {
PENDING: intl.formatMessage({
id: intlPrefix + '.column.state.enum.pending',
}),
PARTIAL: intl.formatMessage({
id: intlPrefix + '.column.state.enum.partial',
}),
COMPLETED: intl.formatMessage({
id: intlPrefix + '.column.state.enum.completed',
}),
CANCELLED: intl.formatMessage({
id: intlPrefix + '.column.state.enum.cancelled',
}),
},
},
{
title: intl.formatMessage({ id: intlPrefix + '.column.totalAmount' }),
dataIndex: 'totalAmount',
key: 'totalAmount',
valueType: 'money',
},
{
title: intl.formatMessage({ id: intlPrefix + '.column.paidAmount' }),
dataIndex: 'paidAmount',
key: 'paidAmount',
valueType: 'money',
},
...(initExtraColumns || []),
];
function setPaymentTaskVOStorage(paymentTaskVO: BusinessAPI.PaymentTaskVO) {
const localPaymentTaskList = localStorage.getItem(sessionKey);
const paymentTaskList = localPaymentTaskList
? JSON.parse(localPaymentTaskList)
: [];
paymentTaskList.forEach(
(item: BusinessAPI.PaymentTaskVO, index: number) => {
if (item.paymentTaskId === paymentTaskVO.paymentTaskId) {
paymentTaskList.splice(index, 1);
}
},
);
if (paymentTaskList.length < 5) {
paymentTaskList.unshift(paymentTaskVO);
localStorage.setItem(sessionKey, JSON.stringify(paymentTaskList));
} else {
paymentTaskList.pop();
paymentTaskList.unshift(paymentTaskVO);
localStorage.setItem(sessionKey, JSON.stringify(paymentTaskList));
}
}
return (
<SelectModal<BusinessAPI.PaymentTaskVO, BusinessAPI.PaymentTaskPageQry>
rowKey={'paymentTaskId'}
modalProps={{
title: title || '选择付款任务',
...rest,
destroyOnHidden: true,
afterOpenChange: (open) => {
if (!open) {
setParams({
...initParams,
});
}
},
}}
selectedList={selectedList}
tableProps={{
rowKey: 'paymentTaskId',
columns: columns,
columnsState: {
persistenceType: 'sessionStorage',
persistenceKey: 'paymentTaskModalColumnStateKey',
},
params: {
...params,
},
request: async (params, sorter, filter) => {
const { data, success, totalCount } =
await business.paymentTask.pagePaymentTask({
paymentTaskPageQry: formatParam<typeof params>(
params,
sorter,
filter,
),
});
return {
data: data || [],
total: totalCount,
success,
};
},
pagination: {
...pagination(),
position: ['bottomRight'],
},
tableAlertRender: ({ selectedRowKeys, selectedRows }) => {
// selectedRows 和 selectedList 组合在一起,去重,
const selectedRowsMap = new Map<string, BusinessAPI.PaymentTaskVO>();
selectedRows.forEach((item: BusinessAPI.PaymentTaskVO) => {
if (item) {
if (!selectedRowsMap.has(item.paymentTaskId)) {
selectedRowsMap.set(item.paymentTaskId, item);
}
}
});
selectedList?.forEach((item: BusinessAPI.PaymentTaskVO) => {
if (!selectedRowsMap.has(item.paymentTaskId)) {
selectedRowsMap.set(item.paymentTaskId, item);
}
});
let selectedTempList: BusinessAPI.PaymentTaskVO[] = [];
selectedRowsMap.forEach((item: BusinessAPI.PaymentTaskVO) => {
if (selectedRowKeys.includes(item.paymentTaskId)) {
selectedTempList.push(item);
}
});
return (
<Space size={12}>
<span> {selectedRowKeys.length} </span>
<Space wrap={true}>
{selectedTempList?.map((item: BusinessAPI.PaymentTaskVO) => {
return (
item && (
<span key={item.paymentTaskId}>{item.taskName}</span>
)
);
})}
</Space>
</Space>
);
},
...(tips && {
tableExtraRender: () => {
return tips && <Alert type={'info'} message={tips} />;
},
}),
...(type === 'radio' && {
tableExtraRender: () => {
const localPaymentTaskList = localStorage.getItem(sessionKey);
if (localPaymentTaskList) {
const paymentTaskList = JSON.parse(localPaymentTaskList);
return (
<>
{tips && <Alert type={'info'} message={tips} />}
<Row gutter={16}>
{paymentTaskList.map((item: BusinessAPI.PaymentTaskVO) => {
return (
<Tag
style={{
cursor: 'pointer',
}}
onClick={async () => {
const { data: paymentTaskVO } =
await business.paymentTask.showPaymentTask({
paymentTaskShowQry: {
paymentTaskId: item.paymentTaskId,
},
});
if (paymentTaskVO) {
onFinish([paymentTaskVO]);
setPaymentTaskVOStorage(paymentTaskVO);
}
}}
key={item.paymentTaskId}
>
({item.taskName}) {item.paymentTaskSn}
</Tag>
);
})}
</Row>
</>
);
}
},
}),
actionRef: actionRef,
toolbar: {
filter: (
<LightFilter
onFinish={async (values) => {
setParams({
...initParams,
...values,
});
}}
>
{extraFilter}
</LightFilter>
),
search: {
placeholder: '请输入付款任务名称/付款编码',
onSearch: async (value: string) => {
setParams({
...params,
taskName: value,
});
},
},
},
}}
onFinish={(paymentTaskVOList) => {
if (type === 'radio') {
if (paymentTaskVOList.length > 0) {
setPaymentTaskVOStorage(paymentTaskVOList[0]);
}
}
onFinish(paymentTaskVOList);
}}
num={num}
type={type}
/>
);
}

View File

@ -22,7 +22,8 @@ import {
RouteContext,
RouteContextType,
} from '@ant-design/pro-components';
import { Col, Row, Space, Table } from 'antd';
import { Col, message, Row, Space, Table } from 'antd';
import dayjs from 'dayjs';
export interface IPaymentTaskPayProps {
insertPosition?: InsertPosition;
@ -41,16 +42,38 @@ export default function PaymentTaskPay(props: IPaymentTaskPayProps) {
const handleSubmit = async (formData: any) => {
console.log('付款数据:', formData);
// TODO: 调用付款接口
// const { success } = await business.paymentTask.pay({
// ...formData,
// });
// if (success) {
// message.success('付款成功');
// 获取选中账户的详细信息
const { data: accountData } =
await business.companyPaymentAccount.showCompanyPaymentAccount({
companyPaymentAccountShowQry: {
accountId: formData.companyPaymentAccountId,
},
});
if (!accountData) {
message.error('获取账户信息失败');
return false;
}
// 构建符合接口要求的数据结构
const payData: BusinessAPI.PaymentTaskPayCmd = {
paymentTaskId: paymentTaskVO.paymentTaskId,
paidAmount: formData.paidAmount,
...accountData,
paidAt: dayjs().format('YYYY-MM-DD HH:mm:ss'),
paidCredentials: formData.paidCredentials || [],
remark: formData.remark,
};
console.log('转换后的付款数据:', payData);
const { success } = await business.paymentTask.payPaymentTask(payData);
if (success) {
message.success('付款成功');
onFinish();
// }
// return success;
return true;
}
return success;
};
return (
@ -75,7 +98,10 @@ export default function PaymentTaskPay(props: IPaymentTaskPayProps) {
paymentTaskShowQry: params,
});
return data;
return {
...data,
paidAmount: undefined,
};
}}
trigger={
<ButtonAccess
@ -156,11 +182,11 @@ export default function PaymentTaskPay(props: IPaymentTaskPayProps) {
<div>
<div style={{ color: '#999', marginBottom: 4 }}>
{intl.formatMessage({
id: intlPrefix + '.modal.pay.taskInfo.paymentCode',
id: intlPrefix + '.modal.pay.taskInfo.paymentTaskSn',
})}
</div>
<div style={{ fontWeight: 'bold' }}>
{paymentTaskVO.paymentCode}
{paymentTaskVO.paymentTaskSn}
</div>
</div>
</Col>
@ -277,7 +303,7 @@ export default function PaymentTaskPay(props: IPaymentTaskPayProps) {
{/* 模块3本次付款 */}
<ProFormMoney
name="paymentAmount"
name="paidAmount"
label={intl.formatMessage({
id: intlPrefix + '.modal.pay.currentPayment.amount',
})}
@ -352,17 +378,11 @@ export default function PaymentTaskPay(props: IPaymentTaskPayProps) {
{/* 上传付款凭证 */}
<ProFormUploadMaterial
key={'backgroundImageUrl'}
key={'paidCredentials'}
label={intl.formatMessage({
id: intlPrefix + '.form.backgroundImageUrl.label',
id: intlPrefix + '.form.paidCredentials.label',
})}
name={'backgroundImageUrlList'}
transform={(value) => {
return {
backgroundImageUrlList: value,
backgroundImageUrl: value[0],
};
}}
name={'paidCredentials'}
fieldProps={{
maxCount: 9,
}}

View File

@ -0,0 +1,69 @@
import { IPaymentTaskModalProps, PaymentTaskModal } from '@/components';
import {
FormInstance,
ProFormSelect,
ProFormSelectProps,
} from '@ant-design/pro-components';
import { useState } from 'react';
export interface IPaymentTaskSearchProps extends ProFormSelectProps {
form: FormInstance;
selectedList?: IPaymentTaskModalProps['selectedList'];
onFinish?: (paymentTaskVOList: BusinessAPI.PaymentTaskVO[]) => void;
params: BusinessAPI.PaymentTaskPageQry;
}
export default function PaymentTaskSearch(props: IPaymentTaskSearchProps) {
const { form, selectedList, onFinish, params, ...rest } = props;
const [showPaymentTaskModal, setShowPaymentTaskModal] =
useState<boolean>(false);
const [paymentTaskList, setPaymentTaskList] =
useState<(BusinessAPI.PaymentTaskVO | undefined)[]>();
return (
<>
<ProFormSelect
{...rest}
fieldProps={{
open: false,
onClick: () => {
setShowPaymentTaskModal(true);
},
placeholder: '请选择付款任务',
options: paymentTaskList?.map(
(paymentTaskVO?: BusinessAPI.PaymentTaskVO) => {
console.log('paymentTaskVO', paymentTaskVO);
return {
value: paymentTaskVO?.paymentTaskId,
label: paymentTaskVO?.taskName || paymentTaskVO?.paymentTaskSn,
};
},
),
}}
/>
<PaymentTaskModal
title={'选择付款任务'}
open={showPaymentTaskModal}
onOk={() => setShowPaymentTaskModal(false)}
onCancel={() => setShowPaymentTaskModal(false)}
selectedList={selectedList}
onFinish={async (paymentTaskVOList) => {
if (paymentTaskVOList.length > 0) {
const paymentTaskVO = paymentTaskVOList[0];
form.setFieldsValue({
paymentTaskId: paymentTaskVO?.paymentTaskId,
paymentTaskVO: paymentTaskVO,
});
form.validateFields(['paymentTaskId', 'paymentTaskVO']);
setPaymentTaskList(paymentTaskVOList);
setShowPaymentTaskModal(false);
onFinish?.(paymentTaskVOList);
}
}}
type={'radio'}
params={params}
/>
</>
);
}

View File

@ -0,0 +1,59 @@
import { PaymentTaskSearch } from '@/components';
import { useIntl } from '@@/exports';
import {
ProFormDependency,
ProFormSelectProps,
} from '@ant-design/pro-components';
export type IPaymentTaskSelectProps = {
onFinish?: (paymentTaskVOList: BusinessAPI.PaymentTaskVO[]) => void;
} & ProFormSelectProps;
export default function PaymentTaskSelect(props: IPaymentTaskSelectProps) {
const intl = useIntl();
return (
<ProFormDependency name={['paymentTaskVO', 'canChangePaymentTask']}>
{({ paymentTaskVO, canChangePaymentTask }, form) => {
return (
<PaymentTaskSearch
{...(canChangePaymentTask !== undefined && {
readonly: !canChangePaymentTask,
})}
className={'payment-task-select'}
form={form}
{...(paymentTaskVO && { selectedList: [paymentTaskVO] })}
label={intl.formatMessage({
id: 'form.paymentTaskId.label',
})}
transform={(paymentTaskVO) => {
return {
paymentTaskVO: paymentTaskVO,
paymentTaskId: paymentTaskVO.paymentTaskId,
};
}}
name={'paymentTaskVO'}
required={true}
convertValue={(paymentTaskVO) => {
return paymentTaskVO
? `${paymentTaskVO?.taskName || paymentTaskVO?.paymentTaskSn}`
: undefined;
}}
placeholder={intl.formatMessage({
id: 'form.paymentTaskId.placeholder',
})}
rules={[
{
required: true,
message: intl.formatMessage({
id: 'form.paymentTaskId.required',
}),
},
]}
{...props}
/>
);
}}
</ProFormDependency>
);
}

View File

@ -1,5 +1,10 @@
export { default as InvoicerStatisticCard } from './InvoicerStatisticCard';
export { default as OrderSupplierInvoiceList } from './OrderSupplierInvoiceList';
export { default as PaymentTaskCreate } from './PaymentTaskCreate';
export { default as PaymentTaskFormItem } from './PaymentTaskFormItem';
export { default as PaymentTaskList } from './PaymentTaskList';
export { default as PaymentTaskModal } from './PaymentTaskModal';
export type { IPaymentTaskModalProps } from './PaymentTaskModal';
export { default as PaymentTaskPay } from './PaymentTaskPay';
export { default as PaymentTaskSearch } from './PaymentTaskSearch';
export { default as PaymentTaskSelect } from './PaymentTaskSelect';

View File

@ -24,6 +24,7 @@ export * from './Menu';
export * from './Modal';
export { SelectModal, TMapModal } from './Modal';
export * from './Order';
export * from './PaymentRecord';
export * from './PaymentTask';
export * from './Permission';
export * from './Platform';

View File

@ -2615,13 +2615,17 @@ export default {
paymentTask: {
column: {
taskName: '任务名称',
paymentCode: '付款编码',
paymentTaskSn: '付款编码',
supplier: '瓜农信息',
totalAmount: '付款总金额(元)',
paidAmount: '已付金额(元)',
unpaidAmount: '未付金额(元)',
orderCount: '订单数量',
state: '付款状态',
'state.enum.pending': '待付款',
'state.enum.partial': '部分付款',
'state.enum.completed': '已完成',
'state.enum.cancelled': '已取消',
createdAt: '创建时间',
remark: '备注',
option: '操作',
@ -2672,7 +2676,7 @@ export default {
label: '任务备注',
placeholder: '请输入任务备注',
},
backgroundImageUrl: {
paidCredentials: {
label: '付款凭证',
},
},
@ -2716,7 +2720,7 @@ export default {
totalAmount: '总应付金额',
paidAmount: '已付金额',
unpaidAmount: '剩余付款金额',
paymentCode: '任务编号',
paymentRecordSn: '任务编号',
taskName: '任务名称',
},
currentPayment: {
@ -2746,6 +2750,81 @@ export default {
},
},
},
paymentRecord: {
column: {
paymentRecordSn: '付款编码',
paymentTask: '付款任务',
supplier: '收款瓜农',
company: '付款公司',
targetType: '付款对象类型',
accountType: '账户类型',
accountCategory: '账户类别',
bankName: '银行名称',
branchName: '支行名称',
accountName: '账户名称',
accountNumber: '账号',
paidAmount: '付款金额',
paidAt: '支付时间',
paidState: '支付状态',
remark: '备注',
paidCredentials: '支付凭证',
createdAt: '创建时间',
option: '操作',
},
tab: {
all: '全部',
draft: '草稿',
paid: '已支付',
},
state: {
draft: '草稿',
paid: '已支付',
},
targetType: {
supplier: '瓜农',
cost: '成本项',
},
accountType: {
bankCard: '银行卡',
alipay: '支付宝',
wechat: '微信',
},
accountCategory: {
company: '对公账户',
private: '私人账户',
},
statistics: {
total: '全部',
draft: '草稿数量',
paid: '已支付数量',
},
modal: {
create: {
title: '创建付款记录',
button: '创建付款记录',
success: '创建付款记录成功',
},
update: {
title: '更新付款记录',
button: '编辑',
success: '更新付款记录成功',
},
delete: {
success: '删除付款记录成功',
button: '删除',
confirm: {
title: '确认删除',
content: '您确定要删除该付款记录吗?',
okText: '确定',
cancelText: '取消',
},
},
view: {
title: '查看付款记录',
button: '详情',
},
},
},
supplierStall: {
column: {
@ -2871,5 +2950,10 @@ export default {
placeholder: '请选择付款账户',
required: '付款账户为必填项',
},
paymentTaskId: {
label: '付款任务',
placeholder: '请选择付款任务',
required: '付款任务为必填项',
},
},
};

View File

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

View File

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

View File

@ -29,6 +29,7 @@ import * as orderCost from './orderCost';
import * as orderRebate from './orderRebate';
import * as orderShip from './orderShip';
import * as orderSupplier from './orderSupplier';
import * as paymentRecord from './paymentRecord';
import * as paymentTask from './paymentTask';
import * as permission from './permission';
import * as platform from './platform';
@ -46,6 +47,7 @@ export default {
product,
platform,
paymentTask,
paymentRecord,
order,
orderSupplier,
orderShip,

View File

@ -0,0 +1,132 @@
// @ts-ignore
/* eslint-disable */
import request from '../request';
/** 创建付款记录 POST /operation/createPaymentRecord */
export async function createPaymentRecord(
body: BusinessAPI.PaymentRecordCreateCmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.SingleResponsePaymentRecordVO>(
'/operation/createPaymentRecord',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
},
);
}
/** 付款记录删除 DELETE /operation/destroyPaymentRecord */
export async function destroyPaymentRecord(
body: BusinessAPI.PaymentRecordDestroyCmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.Response>('/operation/destroyPaymentRecord', {
method: 'DELETE',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}
/** 付款记录列表 GET /operation/listPaymentRecord */
export async function listPaymentRecord(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: BusinessAPI.listPaymentRecordParams,
options?: { [key: string]: any },
) {
return request<BusinessAPI.MultiResponsePaymentRecordVO>(
'/operation/listPaymentRecord',
{
method: 'GET',
params: {
...params,
paymentRecordListQry: undefined,
...params['paymentRecordListQry'],
},
...(options || {}),
},
);
}
/** 付款记录列表 GET /operation/pagePaymentRecord */
export async function pagePaymentRecord(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: BusinessAPI.pagePaymentRecordParams,
options?: { [key: string]: any },
) {
return request<BusinessAPI.PageResponsePaymentRecordVO>(
'/operation/pagePaymentRecord',
{
method: 'GET',
params: {
...params,
paymentRecordPageQry: undefined,
...params['paymentRecordPageQry'],
},
...(options || {}),
},
);
}
/** 付款记录详情 GET /operation/showPaymentRecord */
export async function showPaymentRecord(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: BusinessAPI.showPaymentRecordParams,
options?: { [key: string]: any },
) {
return request<BusinessAPI.SingleResponsePaymentRecordVO>(
'/operation/showPaymentRecord',
{
method: 'GET',
params: {
...params,
paymentRecordShowQry: undefined,
...params['paymentRecordShowQry'],
},
...(options || {}),
},
);
}
/** 付款记录更新 PUT /operation/updatePaymentRecord */
export async function updatePaymentRecord(
body: BusinessAPI.PaymentRecordUpdateCmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.SingleResponsePaymentRecordVO>(
'/operation/updatePaymentRecord',
{
method: 'PUT',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
},
);
}
/** 付款记录更新 PATCH /operation/updatePaymentRecord */
export async function updatePaymentRecord1(
body: BusinessAPI.PaymentRecordUpdateCmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.SingleResponsePaymentRecordVO>(
'/operation/updatePaymentRecord',
{
method: 'PATCH',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
},
);
}

View File

@ -75,6 +75,24 @@ export async function pagePaymentTask(
);
}
/** 付款任务付款 POST /operation/payPaymentTask */
export async function payPaymentTask(
body: BusinessAPI.PaymentTaskPayCmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.SingleResponsePaymentTaskVO>(
'/operation/payPaymentTask',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
},
);
}
/** 付款任务详情 GET /operation/showPaymentTask */
export async function showPaymentTask(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)

View File

@ -208,7 +208,7 @@ declare namespace BusinessAPI {
/** 品牌图片URL */
image?: string;
/** 纸箱规格ID */
specIds?: string[];
specIds?: number[];
/** 备注 */
remark?: string;
/** 状态1_启用0_禁用 */
@ -279,7 +279,7 @@ declare namespace BusinessAPI {
/** 品牌图片URL */
image?: string;
/** 纸箱规格ID */
specIds?: string[];
specIds?: number[];
/** 备注 */
remark?: string;
/** 状态1_启用0_禁用 */
@ -296,7 +296,7 @@ declare namespace BusinessAPI {
/** 品牌图片URL */
image?: string;
/** 纸箱规格ID */
specIds?: string[];
specIds?: number[];
/** 备注 */
remark?: string;
/** 状态1_启用0_禁用 */
@ -1021,7 +1021,7 @@ declare namespace BusinessAPI {
/** 状态1_启用0_禁用 */
status: boolean;
/** 成本项ID */
costItemIds?: string[];
costItemIds?: number[];
};
type CostDestroyCmd = {
@ -1249,7 +1249,7 @@ declare namespace BusinessAPI {
/** 状态1_启用0_禁用 */
status: boolean;
/** 成本项ID */
costItemIds?: string[];
costItemIds?: number[];
};
type CostVO = {
@ -1280,7 +1280,7 @@ declare namespace BusinessAPI {
/** 状态1_启用0_禁用 */
status: boolean;
/** 项目id集合 */
costItemIds?: string[];
costItemIds?: number[];
/** 创建时间 */
createdAt?: string;
/** 项目列表 */
@ -1961,7 +1961,7 @@ declare namespace BusinessAPI {
/** 登录密码 */
password: string;
/** 角色ID */
roleId: string[];
roleId: number[];
};
type EmployeeDestroyCmd = {
@ -2054,7 +2054,7 @@ declare namespace BusinessAPI {
/** 用户ID */
userId: string;
/** 角色ID */
roleIdList: string[];
roleIdList: number[];
/** 角色信息 */
userRoleList?: UserRoleVO[];
};
@ -2335,6 +2335,10 @@ declare namespace BusinessAPI {
orderShipListQry: OrderShipListQry;
};
type listPaymentRecordParams = {
paymentRecordListQry: PaymentRecordListQry;
};
type listPaymentTaskParams = {
paymentTaskListQry: PaymentTaskListQry;
};
@ -2483,7 +2487,7 @@ declare namespace BusinessAPI {
/** 平台id */
platformId: string;
/** 角色Id */
roleId?: string[];
roleId?: number[];
/** 是否隐藏 */
hideInMenu?: boolean;
/** 权限Id */
@ -2556,7 +2560,7 @@ declare namespace BusinessAPI {
/** 平台id */
platformId: string;
/** 角色Id */
roleId?: string[];
roleId?: number[];
/** 是否隐藏 */
hideInMenu?: boolean;
/** 权限Id */
@ -2784,6 +2788,15 @@ declare namespace BusinessAPI {
notEmpty?: boolean;
};
type MultiResponsePaymentRecordVO = {
success?: boolean;
errCode?: string;
errMessage?: string;
data?: PaymentRecordVO[];
empty?: boolean;
notEmpty?: boolean;
};
type MultiResponsePaymentTaskVO = {
success?: boolean;
errCode?: string;
@ -2965,7 +2978,7 @@ declare namespace BusinessAPI {
| 'LOGISTICS_TYPE'
| 'EXPENSE_TYPE';
/** 关联项目id */
costItemIds?: string[];
costItemIds?: number[];
/** 是否选中 */
selected: boolean;
/** 是否已付款 */
@ -3002,7 +3015,7 @@ declare namespace BusinessAPI {
| 'LOGISTICS_TYPE'
| 'EXPENSE_TYPE';
/** 关联项目id */
costItemIds?: string[];
costItemIds?: number[];
/** 是否付款 */
isPaid?: boolean;
};
@ -3101,7 +3114,7 @@ declare namespace BusinessAPI {
| 'LOGISTICS_TYPE'
| 'EXPENSE_TYPE';
/** 关联项目id */
costItemIds?: string[];
costItemIds?: number[];
/** 创建时间 */
createdAt: string;
/** 采购订单状态: 0_草稿1_审核中2_已完成3_已关闭 */
@ -3823,7 +3836,7 @@ declare namespace BusinessAPI {
/** 产品名称 */
productName?: string;
/** 关联费用id */
costIds?: string[];
costIds?: number[];
/** 成本模板 */
costTemplate?: string;
/** 是否已付定金 */
@ -4226,6 +4239,10 @@ declare namespace BusinessAPI {
orderSupplierPageQry: OrderSupplierPageQry;
};
type pagePaymentRecordParams = {
paymentRecordPageQry: PaymentRecordPageQry;
};
type pagePaymentTaskParams = {
paymentTaskPageQry: PaymentTaskPageQry;
};
@ -4251,8 +4268,8 @@ declare namespace BusinessAPI {
pageIndex?: number;
data?: AgreementVO[];
empty?: boolean;
totalPages?: number;
notEmpty?: boolean;
totalPages?: number;
};
type PageResponseAuditVO = {
@ -4264,8 +4281,8 @@ declare namespace BusinessAPI {
pageIndex?: number;
data?: AuditVO[];
empty?: boolean;
totalPages?: number;
notEmpty?: boolean;
totalPages?: number;
};
type PageResponseBoxBrandVO = {
@ -4277,8 +4294,8 @@ declare namespace BusinessAPI {
pageIndex?: number;
data?: BoxBrandVO[];
empty?: boolean;
totalPages?: number;
notEmpty?: boolean;
totalPages?: number;
};
type PageResponseBoxProductVO = {
@ -4290,8 +4307,8 @@ declare namespace BusinessAPI {
pageIndex?: number;
data?: BoxProductVO[];
empty?: boolean;
totalPages?: number;
notEmpty?: boolean;
totalPages?: number;
};
type PageResponseBoxSpecVO = {
@ -4303,8 +4320,8 @@ declare namespace BusinessAPI {
pageIndex?: number;
data?: BoxSpecVO[];
empty?: boolean;
totalPages?: number;
notEmpty?: boolean;
totalPages?: number;
};
type PageResponseChannelVO = {
@ -4316,8 +4333,8 @@ declare namespace BusinessAPI {
pageIndex?: number;
data?: ChannelVO[];
empty?: boolean;
totalPages?: number;
notEmpty?: boolean;
totalPages?: number;
};
type PageResponseCompanyPaymentAccountVO = {
@ -4329,8 +4346,8 @@ declare namespace BusinessAPI {
pageIndex?: number;
data?: CompanyPaymentAccountVO[];
empty?: boolean;
totalPages?: number;
notEmpty?: boolean;
totalPages?: number;
};
type PageResponseCompanyVO = {
@ -4342,8 +4359,8 @@ declare namespace BusinessAPI {
pageIndex?: number;
data?: CompanyVO[];
empty?: boolean;
totalPages?: number;
notEmpty?: boolean;
totalPages?: number;
};
type PageResponseCostItemVO = {
@ -4355,8 +4372,8 @@ declare namespace BusinessAPI {
pageIndex?: number;
data?: CostItemVO[];
empty?: boolean;
totalPages?: number;
notEmpty?: boolean;
totalPages?: number;
};
type PageResponseCostVO = {
@ -4368,8 +4385,8 @@ declare namespace BusinessAPI {
pageIndex?: number;
data?: CostVO[];
empty?: boolean;
totalPages?: number;
notEmpty?: boolean;
totalPages?: number;
};
type PageResponseDealerPaymentAccountVO = {
@ -4381,8 +4398,8 @@ declare namespace BusinessAPI {
pageIndex?: number;
data?: DealerPaymentAccountVO[];
empty?: boolean;
totalPages?: number;
notEmpty?: boolean;
totalPages?: number;
};
type PageResponseDealerRebateCustomerVO = {
@ -4394,8 +4411,8 @@ declare namespace BusinessAPI {
pageIndex?: number;
data?: DealerRebateCustomerVO[];
empty?: boolean;
totalPages?: number;
notEmpty?: boolean;
totalPages?: number;
};
type PageResponseDealerVO = {
@ -4407,8 +4424,8 @@ declare namespace BusinessAPI {
pageIndex?: number;
data?: DealerVO[];
empty?: boolean;
totalPages?: number;
notEmpty?: boolean;
totalPages?: number;
};
type PageResponseDealerWarehouseVO = {
@ -4420,8 +4437,8 @@ declare namespace BusinessAPI {
pageIndex?: number;
data?: DealerWarehouseVO[];
empty?: boolean;
totalPages?: number;
notEmpty?: boolean;
totalPages?: number;
};
type PageResponseDictionaryVO = {
@ -4433,8 +4450,8 @@ declare namespace BusinessAPI {
pageIndex?: number;
data?: DictionaryVO[];
empty?: boolean;
totalPages?: number;
notEmpty?: boolean;
totalPages?: number;
};
type PageResponseEmployeeVO = {
@ -4446,8 +4463,8 @@ declare namespace BusinessAPI {
pageIndex?: number;
data?: EmployeeVO[];
empty?: boolean;
totalPages?: number;
notEmpty?: boolean;
totalPages?: number;
};
type PageResponseGiftBoxVO = {
@ -4459,8 +4476,8 @@ declare namespace BusinessAPI {
pageIndex?: number;
data?: GiftBoxVO[];
empty?: boolean;
totalPages?: number;
notEmpty?: boolean;
totalPages?: number;
};
type PageResponseMaterialVO = {
@ -4472,8 +4489,8 @@ declare namespace BusinessAPI {
pageIndex?: number;
data?: MaterialVO[];
empty?: boolean;
totalPages?: number;
notEmpty?: boolean;
totalPages?: number;
};
type PageResponseOrderCostVO = {
@ -4485,8 +4502,8 @@ declare namespace BusinessAPI {
pageIndex?: number;
data?: OrderCostVO[];
empty?: boolean;
totalPages?: number;
notEmpty?: boolean;
totalPages?: number;
};
type PageResponseOrderRebateVO = {
@ -4498,8 +4515,8 @@ declare namespace BusinessAPI {
pageIndex?: number;
data?: OrderRebateVO[];
empty?: boolean;
totalPages?: number;
notEmpty?: boolean;
totalPages?: number;
};
type PageResponseOrderShipVO = {
@ -4511,8 +4528,8 @@ declare namespace BusinessAPI {
pageIndex?: number;
data?: OrderShipVO[];
empty?: boolean;
totalPages?: number;
notEmpty?: boolean;
totalPages?: number;
};
type PageResponseOrderSupplierVO = {
@ -4524,8 +4541,8 @@ declare namespace BusinessAPI {
pageIndex?: number;
data?: OrderSupplierVO[];
empty?: boolean;
totalPages?: number;
notEmpty?: boolean;
totalPages?: number;
};
type PageResponseOrderVO = {
@ -4537,8 +4554,21 @@ declare namespace BusinessAPI {
pageIndex?: number;
data?: OrderVO[];
empty?: boolean;
totalPages?: number;
notEmpty?: boolean;
totalPages?: number;
};
type PageResponsePaymentRecordVO = {
success?: boolean;
errCode?: string;
errMessage?: string;
totalCount?: number;
pageSize?: number;
pageIndex?: number;
data?: PaymentRecordVO[];
empty?: boolean;
notEmpty?: boolean;
totalPages?: number;
};
type PageResponsePaymentTaskVO = {
@ -4550,8 +4580,8 @@ declare namespace BusinessAPI {
pageIndex?: number;
data?: PaymentTaskVO[];
empty?: boolean;
totalPages?: number;
notEmpty?: boolean;
totalPages?: number;
};
type PageResponsePermissionVO = {
@ -4563,8 +4593,8 @@ declare namespace BusinessAPI {
pageIndex?: number;
data?: PermissionVO[];
empty?: boolean;
totalPages?: number;
notEmpty?: boolean;
totalPages?: number;
};
type PageResponsePlatformVO = {
@ -4576,8 +4606,8 @@ declare namespace BusinessAPI {
pageIndex?: number;
data?: PlatformVO[];
empty?: boolean;
totalPages?: number;
notEmpty?: boolean;
totalPages?: number;
};
type PageResponseProductVO = {
@ -4589,8 +4619,8 @@ declare namespace BusinessAPI {
pageIndex?: number;
data?: ProductVO[];
empty?: boolean;
totalPages?: number;
notEmpty?: boolean;
totalPages?: number;
};
type PageResponseRoleVO = {
@ -4602,8 +4632,8 @@ declare namespace BusinessAPI {
pageIndex?: number;
data?: RoleVO[];
empty?: boolean;
totalPages?: number;
notEmpty?: boolean;
totalPages?: number;
};
type PageResponseSupplierInvoiceVO = {
@ -4615,8 +4645,8 @@ declare namespace BusinessAPI {
pageIndex?: number;
data?: SupplierInvoiceVO[];
empty?: boolean;
totalPages?: number;
notEmpty?: boolean;
totalPages?: number;
};
type PageResponseSupplierVO = {
@ -4628,8 +4658,8 @@ declare namespace BusinessAPI {
pageIndex?: number;
data?: SupplierVO[];
empty?: boolean;
totalPages?: number;
notEmpty?: boolean;
totalPages?: number;
};
type PageResponseUserVO = {
@ -4641,8 +4671,8 @@ declare namespace BusinessAPI {
pageIndex?: number;
data?: UserVO[];
empty?: boolean;
totalPages?: number;
notEmpty?: boolean;
totalPages?: number;
};
type pageRoleParams = {
@ -4661,6 +4691,178 @@ declare namespace BusinessAPI {
userPageQry: UserPageQry;
};
type PaymentRecordCreateCmd = {
/** 付款记录ID */
paymentRecordId: string;
/** 付款编码 */
paymentRecordSn: string;
/** 付款任务ID */
paymentTaskId?: string;
/** 付款对象ID */
targetId: string;
/** 付款对象类型1_瓜农2_成本项 */
targetType: 'SUPPLIER' | 'COST';
/** 付款公司ID */
companyId: string;
/** 账户类别1_对公账户2_私人账户 */
accountCategory: 'COMPANY_ACCOUNT' | 'PRIVATE_ACCOUNT';
/** 账户类型1_银行卡2_支付宝3_微信 */
accountType: 'BANK_CARD' | 'ALIPAY' | 'WECHAT';
/** 银行名称 */
bankName?: string;
/** 支行名称 */
branchName?: string;
/** 开户公司名称&#x2F;支付宝昵称&#x2F;微信号 */
accountName: string;
/** 银行账号&#x2F;支付宝账号&#x2F;微信账号 */
accountNumber: string;
/** 支付时间 */
paidAt: string;
/** 付款金额 */
paidAmount: number;
/** 支付状态1_草稿2_已支付 */
paidState: 'DRAFT' | 'PAID';
/** 支付凭证 */
paidCredentials?: string[];
/** 备注 */
remark?: string;
};
type PaymentRecordDestroyCmd = {
/** 付款记录ID */
paymentRecordId: string;
};
type PaymentRecordListQry = {
/** 状态1_启用0_禁用 */
status?: boolean;
/** 付款记录ID */
paymentRecordId?: string;
};
type PaymentRecordPageQry = {
pageSize?: number;
pageIndex?: number;
orderBy?: string;
orderDirection?: string;
groupBy?: string;
needTotalCount?: boolean;
/** 自定义字段key */
customFieldKey?: string;
/** 自定义字段value */
customFieldValue?: string;
/** 备注 */
remark?: string;
/** 状态1_启用0_禁用 */
status?: boolean;
/** 付款记录ID */
paymentRecordId?: string;
/** 付款对象类型1_瓜农2_成本项 */
targetType?: 'SUPPLIER' | 'COST';
/** 支付状态1_草稿2_已支付 */
paidState?: 'DRAFT' | 'PAID';
/** 支付时间 */
paidAt?: string;
/** 付款公司ID */
companyId?: string;
/** 付款编码 */
paymentRecordSn?: string;
/** 付款任务ID */
paymentTaskId?: string;
/** 账户类别1_对公账户2_私人账户 */
accountCategory?: 'COMPANY_ACCOUNT' | 'PRIVATE_ACCOUNT';
/** 账户类型1_银行卡2_支付宝3_微信 */
accountType?: 'BANK_CARD' | 'ALIPAY' | 'WECHAT';
offset?: number;
};
type PaymentRecordShowQry = {
/** 状态1_启用0_禁用 */
status?: boolean;
/** 付款记录ID */
paymentRecordId?: string;
};
type PaymentRecordUpdateCmd = {
/** 付款记录ID */
paymentRecordId: string;
/** 付款编码 */
paymentRecordSn: string;
/** 付款任务ID */
paymentTaskId?: string;
/** 付款对象ID */
targetId: string;
/** 付款对象类型1_瓜农2_成本项 */
targetType: 'SUPPLIER' | 'COST';
/** 付款公司ID */
companyId: string;
/** 账户类别1_对公账户2_私人账户 */
accountCategory: 'COMPANY_ACCOUNT' | 'PRIVATE_ACCOUNT';
/** 账户类型1_银行卡2_支付宝3_微信 */
accountType: 'BANK_CARD' | 'ALIPAY' | 'WECHAT';
/** 银行名称 */
bankName?: string;
/** 支行名称 */
branchName?: string;
/** 开户公司名称&#x2F;支付宝昵称&#x2F;微信号 */
accountName: string;
/** 银行账号&#x2F;支付宝账号&#x2F;微信账号 */
accountNumber: string;
/** 支付时间 */
paidAt: string;
/** 付款金额 */
paidAmount: number;
/** 支付状态1_草稿2_已支付 */
paidState: 'DRAFT' | 'PAID';
/** 支付凭证 */
paidCredentials?: string[];
/** 备注 */
remark?: string;
};
type PaymentRecordVO = {
/** 付款记录ID */
paymentRecordId: string;
/** 付款编码 */
paymentRecordSn: string;
/** 付款任务ID */
paymentTaskId?: string;
/** 付款对象ID */
targetId: string;
/** 付款对象类型1_瓜农2_成本项 */
targetType: 'SUPPLIER' | 'COST';
/** 付款公司ID */
companyId: string;
/** 账户类别1_对公账户2_私人账户 */
accountCategory: 'COMPANY_ACCOUNT' | 'PRIVATE_ACCOUNT';
/** 账户类型1_银行卡2_支付宝3_微信 */
accountType: 'BANK_CARD' | 'ALIPAY' | 'WECHAT';
/** 银行名称 */
bankName?: string;
/** 支行名称 */
branchName?: string;
/** 开户公司名称&#x2F;支付宝昵称&#x2F;微信号 */
accountName: string;
/** 银行账号&#x2F;支付宝账号&#x2F;微信账号 */
accountNumber: string;
/** 支付时间 */
paidAt: string;
/** 付款金额 */
paidAmount: number;
/** 支付状态1_草稿2_已支付 */
paidState: 'DRAFT' | 'PAID';
/** 支付凭证 */
paidCredentials?: string[];
/** 备注 */
remark?: string;
/** 创建时间 */
createdAt: string;
/** 付款任务信息 */
paymentTaskVO?: PaymentTaskVO;
/** 供应商信息 */
supplierVO?: SupplierVO;
};
type PaymentTaskCreateCmd = {
/** 付款任务ID */
paymentTaskId?: string;
@ -4669,7 +4871,7 @@ declare namespace BusinessAPI {
/** 任务类型1-瓜农付款任务 */
taskType: 'MELON_FARMER';
/** 付款编码 */
paymentCode: string;
paymentTaskSn: string;
/** 付款任务对象ID */
targetId: string;
/** 付款总金额 */
@ -4720,7 +4922,7 @@ declare namespace BusinessAPI {
/** 任务类型1-瓜农付款任务 */
taskType?: 'MELON_FARMER';
/** 付款编码 */
paymentCode?: string;
paymentTaskSn?: string;
/** 付款状态0-待付款任务1-部分付款任务2-已完成任务3-已取消任务 */
state?: 'PENDING' | 'PARTIAL' | 'COMPLETED' | 'CANCELLED';
/** 供应商ID */
@ -4728,6 +4930,33 @@ declare namespace BusinessAPI {
offset?: number;
};
type PaymentTaskPayCmd = {
/** 付款任务ID */
paymentTaskId: string;
/** 付款金额 */
paidAmount: number;
/** 付款公司ID */
companyId: string;
/** 账户类别1_对公账户2_私人账户 */
accountCategory: 'COMPANY_ACCOUNT' | 'PRIVATE_ACCOUNT';
/** 账户类型1_银行卡2_支付宝3_微信 */
accountType: 'BANK_CARD' | 'ALIPAY' | 'WECHAT';
/** 银行名称 */
bankName?: string;
/** 支行名称 */
branchName?: string;
/** 开户公司名称/支付宝昵称/微信号 */
accountName: string;
/** 银行账号/支付宝账号/微信账号 */
accountNumber: string;
/** 支付时间 */
paidAt: string;
/** 支付凭证 */
paidCredentials?: string[];
/** 备注 */
remark?: string;
};
type PaymentTaskShowQry = {
/** 状态1_启用0_禁用 */
status?: boolean;
@ -4763,7 +4992,7 @@ declare namespace BusinessAPI {
/** 任务类型1-瓜农付款任务 */
taskType: 'MELON_FARMER';
/** 付款编码 */
paymentCode: string;
paymentTaskSn: string;
/** 付款任务对象ID */
targetId: string;
/** 付款总金额 */
@ -4788,7 +5017,7 @@ declare namespace BusinessAPI {
/** 任务类型1-瓜农付款任务 */
taskType: 'MELON_FARMER';
/** 付款编码 */
paymentCode: string;
paymentTaskSn: string;
/** 付款任务对象ID */
targetId: string;
/** 付款总金额 */
@ -4915,7 +5144,7 @@ declare namespace BusinessAPI {
/** 产品名称 */
name: string;
/** 关联成本费用id */
costIds?: string[];
costIds?: number[];
/** 成本模板 */
costTemplate?: string;
/** 备注 */
@ -4982,7 +5211,7 @@ declare namespace BusinessAPI {
/** 产品名称 */
name: string;
/** 关联成本费用id */
costIds?: string[];
costIds?: number[];
/** 成本模板 */
costTemplate?: string;
/** 备注 */
@ -5007,7 +5236,7 @@ declare namespace BusinessAPI {
/** 状态1_启用0_禁用 */
status: boolean;
/** 成本ID集合 */
costIds?: string[];
costIds?: number[];
/** 成本费用 */
costVOList?: CostVO[];
/** 成本模板 */
@ -5034,7 +5263,7 @@ declare namespace BusinessAPI {
/** 角色详情 */
description?: string;
/** 角色id */
menuId: string[];
menuId: number[];
};
type RoleDestroyCmd = {
@ -5056,7 +5285,7 @@ declare namespace BusinessAPI {
/** 角色编号 */
roleId?: string;
/** 应用角色Id */
roleIdList?: string[];
roleIdList?: number[];
/** 平台Id */
platformId?: string;
/** 平台Id */
@ -5103,7 +5332,7 @@ declare namespace BusinessAPI {
/** 角色详情 */
description?: string;
/** 角色id */
menuId: string[];
menuId: number[];
/** 角色ID */
roleId: string;
};
@ -5124,9 +5353,9 @@ declare namespace BusinessAPI {
/** 平台 */
platformVO?: PlatformVO;
/** 权限列表 */
permissionId: string[];
permissionId: number[];
/** 菜单列表 */
menuId: string[];
menuId: number[];
/** 创建时间 */
createdAt: string;
};
@ -5326,6 +5555,10 @@ declare namespace BusinessAPI {
orderShipShowQry: OrderShipShowQry;
};
type showPaymentRecordParams = {
paymentRecordShowQry: PaymentRecordShowQry;
};
type showPaymentTaskParams = {
paymentTaskShowQry: PaymentTaskShowQry;
};
@ -5551,6 +5784,13 @@ declare namespace BusinessAPI {
data?: OssTokenVO;
};
type SingleResponsePaymentRecordVO = {
success?: boolean;
errCode?: string;
errMessage?: string;
data?: PaymentRecordVO;
};
type SingleResponsePaymentTaskStatisticsVO = {
success?: boolean;
errCode?: string;
@ -5979,7 +6219,7 @@ declare namespace BusinessAPI {
/** 备注 */
remark?: string;
/** 客户标签 */
labelId?: string[];
labelId?: number[];
};
type UserDestroyCmd = {
@ -6001,7 +6241,7 @@ declare namespace BusinessAPI {
/** 状态1_启用0_禁用 */
status?: boolean;
/** 用户ID */
userIdList?: string[];
userIdList?: number[];
/** 用户名 */
name?: string;
};
@ -6044,9 +6284,9 @@ declare namespace BusinessAPI {
/** 是否是管理员 */
isAdmin?: boolean;
/** 会员id列表 */
userIdList?: string[];
userIdList?: number[];
/** 排除的用户id列表 */
excludeUserIdList?: string[];
excludeUserIdList?: number[];
/** 小区id */
communityId?: number;
offset?: number;
@ -6056,7 +6296,7 @@ declare namespace BusinessAPI {
/** 用户ID */
userId: string;
/** 角色ID */
roleIdList?: string[];
roleIdList?: number[];
/** 是否覆盖 */
cover: boolean;
};
@ -6101,7 +6341,7 @@ declare namespace BusinessAPI {
/** 备注 */
remark?: string;
/** 客户标签 */
labelId?: string[];
labelId?: number[];
/** 用户ID */
userId: string;
};

File diff suppressed because one or more lines are too long