feat(biz): 添加供应商发票功能并优化表格组件
- 在BizProvider中新增supplierInvoice类型支持 - 添加SupplierInvoiceList组件用于显示供应商发票信息 - 为经销商显示添加市场/超市标识区分 - 更新公司支付账户模态框类型定义以支持业务值类型 - 优化订单成本列表中的公司字段显示方式 - 在订单供应商列表中新增发票上传状态显示 - 为订单供应商模态框添加开票状态逻辑处理 - 更新多个模态框的列配置以支持业务值类型 - 调整选择模态框布局大小和分页配置 - 移除支付记录列表的编辑删除功能 - 优化订单供应商选择列表的发票相关字段显示
This commit is contained in:
parent
8b79f1bda7
commit
f5feec84e3
@ -11,6 +11,7 @@ import {
|
|||||||
RemarkFormItem,
|
RemarkFormItem,
|
||||||
SupplierFarmerList,
|
SupplierFarmerList,
|
||||||
SupplierFormItem,
|
SupplierFormItem,
|
||||||
|
SupplierInvoiceList,
|
||||||
UserFormItem,
|
UserFormItem,
|
||||||
UserList,
|
UserList,
|
||||||
} from '@/components';
|
} from '@/components';
|
||||||
@ -43,7 +44,7 @@ export default function BizProvider(props: any) {
|
|||||||
dealerId={dealerVO.dealerId}
|
dealerId={dealerVO.dealerId}
|
||||||
trigger={() => (
|
trigger={() => (
|
||||||
<Space>
|
<Space>
|
||||||
<a>{dealerVO.shortName}</a>
|
<a>{`${dealerVO?.dealerType === 'MARKET' ? '市场' : '超市'} | ${dealerVO?.shortName}`}</a>
|
||||||
</Space>
|
</Space>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
@ -95,6 +96,49 @@ export default function BizProvider(props: any) {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
supplierInvoice: {
|
||||||
|
renderFormItem: (_, props) => {
|
||||||
|
return (
|
||||||
|
<ProFormSelect
|
||||||
|
{...props}
|
||||||
|
{...props?.fieldProps}
|
||||||
|
request={async (params) => {
|
||||||
|
const { data } =
|
||||||
|
await business.supplierInvoice.listSupplierInvoice({
|
||||||
|
supplierInvoiceListQry: {
|
||||||
|
...params,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
return (
|
||||||
|
data?.map((item) => {
|
||||||
|
return {
|
||||||
|
label: `${item.supplierName} | ${item.invoiceSn}`,
|
||||||
|
value: item.supplierInvoiceId,
|
||||||
|
};
|
||||||
|
}) || []
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
render: (supplierInvoiceVO: BusinessAPI.SupplierInvoiceVO) => {
|
||||||
|
return (
|
||||||
|
<SupplierInvoiceList
|
||||||
|
ghost={true}
|
||||||
|
mode={'detail'}
|
||||||
|
supplierInvoiceId={supplierInvoiceVO.supplierInvoiceId}
|
||||||
|
trigger={() => (
|
||||||
|
<Space>
|
||||||
|
<a>
|
||||||
|
{`${supplierInvoiceVO.supplierName} | ${supplierInvoiceVO.invoiceSn}`}
|
||||||
|
</a>
|
||||||
|
</Space>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
orderCost: {
|
orderCost: {
|
||||||
renderFormItem: (_, props) => {
|
renderFormItem: (_, props) => {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@ -25,6 +25,7 @@ export type BizValueType =
|
|||||||
| 'paymentTask'
|
| 'paymentTask'
|
||||||
| 'company'
|
| 'company'
|
||||||
| 'orderCost'
|
| 'orderCost'
|
||||||
|
| 'supplierInvoice'
|
||||||
| 'supplier';
|
| 'supplier';
|
||||||
export type FormType = 'modal' | 'drawer' | 'step';
|
export type FormType = 'modal' | 'drawer' | 'step';
|
||||||
export type ModeType =
|
export type ModeType =
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
import { SelectModal } from '@/components';
|
import { BizValueType, SelectModal } from '@/components';
|
||||||
import { business } from '@/services';
|
import { business } from '@/services';
|
||||||
import { formatParam } from '@/utils/formatParam';
|
import { formatParam } from '@/utils/formatParam';
|
||||||
import { pagination } from '@/utils/pagination';
|
|
||||||
import { useIntl } from '@@/exports';
|
import { useIntl } from '@@/exports';
|
||||||
import {
|
import {
|
||||||
ActionType,
|
ActionType,
|
||||||
@ -20,7 +19,10 @@ export interface ICompanyPaymentAccountModalProps extends ModalProps {
|
|||||||
num?: number;
|
num?: number;
|
||||||
tips?: string;
|
tips?: string;
|
||||||
extraFilter?: React.ReactNode[];
|
extraFilter?: React.ReactNode[];
|
||||||
extraColumns?: ProColumns<BusinessAPI.CompanyPaymentAccountVO>[];
|
extraColumns?: ProColumns<
|
||||||
|
BusinessAPI.CompanyPaymentAccountVO,
|
||||||
|
BizValueType
|
||||||
|
>[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function CompanyPaymentAccountModal(
|
export default function CompanyPaymentAccountModal(
|
||||||
@ -61,97 +63,101 @@ export default function CompanyPaymentAccountModal(
|
|||||||
const intlPrefix = 'companyPaymentAccount';
|
const intlPrefix = 'companyPaymentAccount';
|
||||||
|
|
||||||
// 公司账户列配置
|
// 公司账户列配置
|
||||||
const companyAccountColumns: ProColumns<BusinessAPI.CompanyPaymentAccountVO>[] =
|
const companyAccountColumns: ProColumns<
|
||||||
[
|
BusinessAPI.CompanyPaymentAccountVO,
|
||||||
{
|
BizValueType
|
||||||
title: intl.formatMessage({
|
>[] = [
|
||||||
id: intlPrefix + '.column.accountName',
|
{
|
||||||
}),
|
title: intl.formatMessage({
|
||||||
dataIndex: 'accountName',
|
id: intlPrefix + '.column.accountName',
|
||||||
key: 'accountName',
|
}),
|
||||||
search: false,
|
dataIndex: 'accountName',
|
||||||
},
|
key: 'accountName',
|
||||||
{
|
search: false,
|
||||||
title: intl.formatMessage({
|
},
|
||||||
id: intlPrefix + '.column.bankName',
|
{
|
||||||
}),
|
title: intl.formatMessage({
|
||||||
dataIndex: 'bankName',
|
id: intlPrefix + '.column.bankName',
|
||||||
key: 'bankName',
|
}),
|
||||||
search: false,
|
dataIndex: 'bankName',
|
||||||
},
|
key: 'bankName',
|
||||||
{
|
search: false,
|
||||||
title: intl.formatMessage({
|
},
|
||||||
id: intlPrefix + '.column.branchName',
|
{
|
||||||
}),
|
title: intl.formatMessage({
|
||||||
dataIndex: 'branchName',
|
id: intlPrefix + '.column.branchName',
|
||||||
key: 'branchName',
|
}),
|
||||||
search: false,
|
dataIndex: 'branchName',
|
||||||
},
|
key: 'branchName',
|
||||||
{
|
search: false,
|
||||||
title: intl.formatMessage({
|
},
|
||||||
id: intlPrefix + '.column.accountNumber',
|
{
|
||||||
}),
|
title: intl.formatMessage({
|
||||||
dataIndex: 'accountNumber',
|
id: intlPrefix + '.column.accountNumber',
|
||||||
key: 'accountNumber',
|
}),
|
||||||
search: false,
|
dataIndex: 'accountNumber',
|
||||||
ellipsis: true,
|
key: 'accountNumber',
|
||||||
},
|
search: false,
|
||||||
...(initExtraColumns || []),
|
ellipsis: true,
|
||||||
];
|
},
|
||||||
|
...(initExtraColumns || []),
|
||||||
|
];
|
||||||
|
|
||||||
// 私人账户列配置
|
// 私人账户列配置
|
||||||
const privateAccountColumns: ProColumns<BusinessAPI.CompanyPaymentAccountVO>[] =
|
const privateAccountColumns: ProColumns<
|
||||||
[
|
BusinessAPI.CompanyPaymentAccountVO,
|
||||||
{
|
BizValueType
|
||||||
title: intl.formatMessage({
|
>[] = [
|
||||||
id: intlPrefix + '.column.accountName',
|
{
|
||||||
|
title: intl.formatMessage({
|
||||||
|
id: intlPrefix + '.column.accountName',
|
||||||
|
}),
|
||||||
|
dataIndex: 'accountName',
|
||||||
|
key: 'accountName',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: intl.formatMessage({
|
||||||
|
id: intlPrefix + '.column.accountType',
|
||||||
|
}),
|
||||||
|
dataIndex: 'accountType',
|
||||||
|
key: 'accountType',
|
||||||
|
valueType: 'select',
|
||||||
|
valueEnum: {
|
||||||
|
BANK_CARD: intl.formatMessage({
|
||||||
|
id: intlPrefix + '.column.accountType.enum.bankCard',
|
||||||
}),
|
}),
|
||||||
dataIndex: 'accountName',
|
ALIPAY: intl.formatMessage({
|
||||||
key: 'accountName',
|
id: intlPrefix + '.column.accountType.enum.alipay',
|
||||||
search: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: intl.formatMessage({
|
|
||||||
id: intlPrefix + '.column.accountType',
|
|
||||||
}),
|
}),
|
||||||
dataIndex: 'accountType',
|
WECHAT: intl.formatMessage({
|
||||||
key: 'accountType',
|
id: intlPrefix + '.column.accountType.enum.wechat',
|
||||||
valueType: 'select',
|
|
||||||
valueEnum: {
|
|
||||||
BANK_CARD: intl.formatMessage({
|
|
||||||
id: intlPrefix + '.column.accountType.enum.bankCard',
|
|
||||||
}),
|
|
||||||
ALIPAY: intl.formatMessage({
|
|
||||||
id: intlPrefix + '.column.accountType.enum.alipay',
|
|
||||||
}),
|
|
||||||
WECHAT: intl.formatMessage({
|
|
||||||
id: intlPrefix + '.column.accountType.enum.wechat',
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: intl.formatMessage({
|
|
||||||
id: intlPrefix + '.column.bankName',
|
|
||||||
}),
|
}),
|
||||||
dataIndex: 'bankName',
|
|
||||||
key: 'bankName',
|
|
||||||
search: false,
|
|
||||||
},
|
},
|
||||||
{
|
},
|
||||||
title: intl.formatMessage({
|
{
|
||||||
id: intlPrefix + '.column.accountNumber',
|
title: intl.formatMessage({
|
||||||
}),
|
id: intlPrefix + '.column.bankName',
|
||||||
dataIndex: 'accountNumber',
|
}),
|
||||||
key: 'accountNumber',
|
dataIndex: 'bankName',
|
||||||
search: false,
|
key: 'bankName',
|
||||||
ellipsis: true,
|
search: false,
|
||||||
},
|
},
|
||||||
...(initExtraColumns || []),
|
{
|
||||||
];
|
title: intl.formatMessage({
|
||||||
|
id: intlPrefix + '.column.accountNumber',
|
||||||
|
}),
|
||||||
|
dataIndex: 'accountNumber',
|
||||||
|
key: 'accountNumber',
|
||||||
|
search: false,
|
||||||
|
ellipsis: true,
|
||||||
|
},
|
||||||
|
...(initExtraColumns || []),
|
||||||
|
];
|
||||||
|
|
||||||
// 根据 Tab 获取当前列配置
|
// 根据 Tab 获取当前列配置
|
||||||
const getCurrentColumns = ():
|
const getCurrentColumns = ():
|
||||||
| ProColumns<BusinessAPI.CompanyPaymentAccountVO>[]
|
| ProColumns<BusinessAPI.CompanyPaymentAccountVO, BizValueType>[]
|
||||||
| undefined => {
|
| undefined => {
|
||||||
if (activeKey === 'COMPANY_ACCOUNT') {
|
if (activeKey === 'COMPANY_ACCOUNT') {
|
||||||
return companyAccountColumns;
|
return companyAccountColumns;
|
||||||
@ -226,10 +232,6 @@ export default function CompanyPaymentAccountModal(
|
|||||||
success,
|
success,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
pagination: {
|
|
||||||
...pagination(),
|
|
||||||
position: ['bottomRight'],
|
|
||||||
},
|
|
||||||
tableAlertRender: ({ selectedRowKeys, selectedRows }) => {
|
tableAlertRender: ({ selectedRowKeys, selectedRows }) => {
|
||||||
const selectedRowsMap = new Map<
|
const selectedRowsMap = new Map<
|
||||||
string,
|
string,
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
import { DealerList, SelectModal } from '@/components';
|
import { BizValueType, DealerList, SelectModal } from '@/components';
|
||||||
import { business } from '@/services';
|
import { business } from '@/services';
|
||||||
import { formatParam } from '@/utils/formatParam';
|
import { formatParam } from '@/utils/formatParam';
|
||||||
import { pagination } from '@/utils/pagination';
|
|
||||||
import { useIntl } from '@@/exports';
|
import { useIntl } from '@@/exports';
|
||||||
import {
|
import {
|
||||||
ActionType,
|
ActionType,
|
||||||
@ -20,7 +19,7 @@ export interface IDealerModalProps extends ModalProps {
|
|||||||
num?: number;
|
num?: number;
|
||||||
tips?: string;
|
tips?: string;
|
||||||
extraFilter?: React.ReactNode[];
|
extraFilter?: React.ReactNode[];
|
||||||
extraColumns?: ProColumns<BusinessAPI.DealerVO>[];
|
extraColumns?: ProColumns<BusinessAPI.DealerVO, BizValueType>[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function DealerModal(props: IDealerModalProps) {
|
export default function DealerModal(props: IDealerModalProps) {
|
||||||
@ -54,7 +53,7 @@ export default function DealerModal(props: IDealerModalProps) {
|
|||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
const intlPrefix = 'dealer';
|
const intlPrefix = 'dealer';
|
||||||
|
|
||||||
const columns: ProColumns<BusinessAPI.DealerVO>[] = [
|
const columns: ProColumns<BusinessAPI.DealerVO, BizValueType>[] = [
|
||||||
{
|
{
|
||||||
title: intl.formatMessage({ id: intlPrefix + '.column.shortName' }),
|
title: intl.formatMessage({ id: intlPrefix + '.column.shortName' }),
|
||||||
dataIndex: 'shortName',
|
dataIndex: 'shortName',
|
||||||
@ -134,10 +133,6 @@ export default function DealerModal(props: IDealerModalProps) {
|
|||||||
success,
|
success,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
pagination: {
|
|
||||||
...pagination(),
|
|
||||||
position: ['bottomRight'],
|
|
||||||
},
|
|
||||||
tableAlertRender: ({ selectedRowKeys, selectedRows }) => {
|
tableAlertRender: ({ selectedRowKeys, selectedRows }) => {
|
||||||
// selectedRows 和 selectedList 组合在一起,去重,
|
// selectedRows 和 selectedList 组合在一起,去重,
|
||||||
const selectedRowsMap = new Map<string, BusinessAPI.DealerVO>();
|
const selectedRowsMap = new Map<string, BusinessAPI.DealerVO>();
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
import { Remark, SelectModal } from '@/components';
|
import { BizValueType, Remark, SelectModal } from '@/components';
|
||||||
import { business } from '@/services';
|
import { business } from '@/services';
|
||||||
import { formatParam } from '@/utils/formatParam';
|
import { formatParam } from '@/utils/formatParam';
|
||||||
import { pagination } from '@/utils/pagination';
|
|
||||||
import {
|
import {
|
||||||
ActionType,
|
ActionType,
|
||||||
LightFilter,
|
LightFilter,
|
||||||
@ -34,7 +33,7 @@ export default function MaterialModal(props: IMaterialModalProps) {
|
|||||||
setFileList(initialFileList || []);
|
setFileList(initialFileList || []);
|
||||||
}, [initialFileList]);
|
}, [initialFileList]);
|
||||||
|
|
||||||
const columns: ProColumns<BusinessAPI.MaterialVO>[] = [
|
const columns: ProColumns<BusinessAPI.MaterialVO, BizValueType>[] = [
|
||||||
{
|
{
|
||||||
title: '素材名称',
|
title: '素材名称',
|
||||||
dataIndex: 'name',
|
dataIndex: 'name',
|
||||||
@ -167,10 +166,6 @@ export default function MaterialModal(props: IMaterialModalProps) {
|
|||||||
</LightFilter>
|
</LightFilter>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
pagination: {
|
|
||||||
...pagination(),
|
|
||||||
position: ['bottomRight'],
|
|
||||||
},
|
|
||||||
}}
|
}}
|
||||||
onFinish={onFinish}
|
onFinish={onFinish}
|
||||||
num={(maxCount || 1) - fileList.length}
|
num={(maxCount || 1) - fileList.length}
|
||||||
|
|||||||
@ -1,3 +1,6 @@
|
|||||||
|
import { BizValueType } from '@/components';
|
||||||
|
import BizProvider from '@/components/Biz/BizProvider';
|
||||||
|
import { pagination } from '@/utils/pagination';
|
||||||
import { ProTable, ProTableProps } from '@ant-design/pro-components';
|
import { ProTable, ProTableProps } from '@ant-design/pro-components';
|
||||||
import type { ParamsType } from '@ant-design/pro-provider';
|
import type { ParamsType } from '@ant-design/pro-provider';
|
||||||
import { Modal, ModalProps, type TableProps } from 'antd';
|
import { Modal, ModalProps, type TableProps } from 'antd';
|
||||||
@ -18,7 +21,7 @@ export interface ISelectModalProps<
|
|||||||
num?: number;
|
num?: number;
|
||||||
selectedList?: DataType[];
|
selectedList?: DataType[];
|
||||||
modalProps: ModalProps;
|
modalProps: ModalProps;
|
||||||
tableProps: ProTableProps<DataType, Params>;
|
tableProps: ProTableProps<DataType, Params, BizValueType>;
|
||||||
ghost?: boolean;
|
ghost?: boolean;
|
||||||
disabled?: (record: DataType) => boolean;
|
disabled?: (record: DataType) => boolean;
|
||||||
}
|
}
|
||||||
@ -113,56 +116,65 @@ const SelectModal = forwardRef<
|
|||||||
|
|
||||||
const renderTable = () => {
|
const renderTable = () => {
|
||||||
return (
|
return (
|
||||||
<ProTable<DataType, Params>
|
<BizProvider>
|
||||||
ghost={true}
|
<ProTable<DataType, Params, BizValueType>
|
||||||
search={false}
|
ghost={true}
|
||||||
scroll={{ x: 'max-content' }}
|
search={false}
|
||||||
onRow={(data) => ({
|
scroll={{ x: 'max-content' }}
|
||||||
onClick: () => {
|
onRow={(data) => ({
|
||||||
if (disabled?.(data)) {
|
onClick: () => {
|
||||||
return;
|
if (disabled?.(data)) {
|
||||||
}
|
|
||||||
if (selectType === 'radio') {
|
|
||||||
setSelectedRowKeys([data[rowKey]]);
|
|
||||||
setSelectedList([data]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (selectType === 'checkbox') {
|
|
||||||
if (selectedList.length >= (num || 1)) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (selectedRowKeys.length === 0) {
|
if (selectType === 'radio') {
|
||||||
setSelectedRowKeys([data[rowKey]]);
|
setSelectedRowKeys([data[rowKey]]);
|
||||||
setSelectedList([data]);
|
setSelectedList([data]);
|
||||||
} else {
|
}
|
||||||
if (selectedRowKeys.includes(data[rowKey])) {
|
|
||||||
setSelectedRowKeys(
|
if (selectType === 'checkbox') {
|
||||||
selectedRowKeys
|
if (selectedList.length >= (num || 1)) {
|
||||||
.filter((v) => v !== data[rowKey])
|
return;
|
||||||
.slice(0, num || 1),
|
}
|
||||||
);
|
if (selectedRowKeys.length === 0) {
|
||||||
setSelectedList(
|
setSelectedRowKeys([data[rowKey]]);
|
||||||
selectedList
|
setSelectedList([data]);
|
||||||
.filter((v) => v?.[rowKey] !== data[rowKey])
|
|
||||||
.slice(0, num || 1),
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
setSelectedRowKeys(
|
if (selectedRowKeys.includes(data[rowKey])) {
|
||||||
[...selectedRowKeys, data[rowKey]].slice(0, num || 1),
|
setSelectedRowKeys(
|
||||||
);
|
selectedRowKeys
|
||||||
setSelectedList([...selectedList, data].slice(0, num || 1));
|
.filter((v) => v !== data[rowKey])
|
||||||
|
.slice(0, num || 1),
|
||||||
|
);
|
||||||
|
setSelectedList(
|
||||||
|
selectedList
|
||||||
|
.filter((v) => v?.[rowKey] !== data[rowKey])
|
||||||
|
.slice(0, num || 1),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
setSelectedRowKeys(
|
||||||
|
[...selectedRowKeys, data[rowKey]].slice(0, num || 1),
|
||||||
|
);
|
||||||
|
setSelectedList(
|
||||||
|
[...selectedList, data].slice(0, num || 1),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (ghost) {
|
if (ghost) {
|
||||||
onFinish([data]);
|
onFinish([data]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})}
|
})}
|
||||||
rowSelection={rowSelection}
|
rowSelection={rowSelection}
|
||||||
{...tableProps}
|
{...tableProps}
|
||||||
/>
|
pagination={{
|
||||||
|
...pagination(),
|
||||||
|
position: ['bottomRight'],
|
||||||
|
defaultPageSize: 10,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</BizProvider>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -172,7 +184,7 @@ const SelectModal = forwardRef<
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
width={1000}
|
width={1200}
|
||||||
{...modalProps}
|
{...modalProps}
|
||||||
open={open}
|
open={open}
|
||||||
onOk={async (event) => {
|
onOk={async (event) => {
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
import {
|
import {
|
||||||
BizContainer,
|
BizContainer,
|
||||||
BizValueType,
|
BizValueType,
|
||||||
CompanyList,
|
|
||||||
CostList,
|
CostList,
|
||||||
ModeType,
|
ModeType,
|
||||||
OrderCostPay,
|
OrderCostPay,
|
||||||
@ -128,33 +127,8 @@ export default function OrderCostList(props: IOrderCostListProps) {
|
|||||||
{
|
{
|
||||||
title: intl.formatMessage({ id: intlPrefix + '.column.orderCompany' }),
|
title: intl.formatMessage({ id: intlPrefix + '.column.orderCompany' }),
|
||||||
dataIndex: 'orderCompany',
|
dataIndex: 'orderCompany',
|
||||||
valueType: 'select',
|
key: 'companyId',
|
||||||
request: async (params) => {
|
valueType: 'company',
|
||||||
const { data } = await business.company.listCompany({
|
|
||||||
companyListQry: {
|
|
||||||
...params,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
|
||||||
data?.map((item) => {
|
|
||||||
return {
|
|
||||||
label: item.fullName,
|
|
||||||
value: item.companyId,
|
|
||||||
};
|
|
||||||
}) || []
|
|
||||||
);
|
|
||||||
},
|
|
||||||
render: (_, record) => {
|
|
||||||
return (
|
|
||||||
<CompanyList
|
|
||||||
ghost={true}
|
|
||||||
mode={'detail'}
|
|
||||||
companyId={record.orderCompany.companyId}
|
|
||||||
trigger={() => <a href={'#'}>{record.orderCompany.fullName}</a>}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: intl.formatMessage({ id: intlPrefix + '.column.isPaid' }),
|
title: intl.formatMessage({ id: intlPrefix + '.column.isPaid' }),
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
import { SelectModal } from '@/components';
|
import { BizValueType, DealerFormItem, SelectModal } from '@/components';
|
||||||
import { business } from '@/services';
|
import { business } from '@/services';
|
||||||
import { formatParam } from '@/utils/formatParam';
|
import { formatParam } from '@/utils/formatParam';
|
||||||
import { pagination } from '@/utils/pagination';
|
|
||||||
import { useIntl } from '@@/exports';
|
import { useIntl } from '@@/exports';
|
||||||
import {
|
import {
|
||||||
ActionType,
|
ActionType,
|
||||||
@ -21,7 +20,7 @@ export interface IOrderModalProps extends ModalProps {
|
|||||||
num?: number;
|
num?: number;
|
||||||
tips?: string;
|
tips?: string;
|
||||||
extraFilter?: React.ReactNode[];
|
extraFilter?: React.ReactNode[];
|
||||||
extraColumns?: ProColumns<BusinessAPI.OrderVO>[];
|
extraColumns?: ProColumns<BusinessAPI.OrderVO, BizValueType>[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function OrderModal(props: IOrderModalProps) {
|
export default function OrderModal(props: IOrderModalProps) {
|
||||||
@ -41,7 +40,7 @@ export default function OrderModal(props: IOrderModalProps) {
|
|||||||
const sessionKey = `orderList`;
|
const sessionKey = `orderList`;
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
const intlPrefix = 'order';
|
const intlPrefix = 'order';
|
||||||
const [params, setParams] = useState<BusinessAPI.DealerPageQry>(
|
const [params, setParams] = useState<BusinessAPI.OrderPageQry>(
|
||||||
initParams || {},
|
initParams || {},
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -54,7 +53,7 @@ export default function OrderModal(props: IOrderModalProps) {
|
|||||||
}
|
}
|
||||||
}, [initParams]);
|
}, [initParams]);
|
||||||
|
|
||||||
const columns: ProColumns<BusinessAPI.OrderVO>[] = [
|
const columns: ProColumns<BusinessAPI.OrderVO, BizValueType>[] = [
|
||||||
{
|
{
|
||||||
title: intl.formatMessage({ id: intlPrefix + '.column.order' }),
|
title: intl.formatMessage({ id: intlPrefix + '.column.order' }),
|
||||||
key: 'orderId',
|
key: 'orderId',
|
||||||
@ -176,10 +175,6 @@ export default function OrderModal(props: IOrderModalProps) {
|
|||||||
success,
|
success,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
pagination: {
|
|
||||||
...pagination(),
|
|
||||||
position: ['bottomRight'],
|
|
||||||
},
|
|
||||||
tableAlertRender: ({ selectedRowKeys, selectedRows }) => {
|
tableAlertRender: ({ selectedRowKeys, selectedRows }) => {
|
||||||
// selectedRows 和 selectedList 组合在一起,去重,
|
// selectedRows 和 selectedList 组合在一起,去重,
|
||||||
const selectedRowsMap = new Map<string, BusinessAPI.OrderVO>();
|
const selectedRowsMap = new Map<string, BusinessAPI.OrderVO>();
|
||||||
@ -269,6 +264,22 @@ export default function OrderModal(props: IOrderModalProps) {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{extraFilter}
|
{extraFilter}
|
||||||
|
<DealerFormItem
|
||||||
|
fieldProps={{
|
||||||
|
showSearch: true,
|
||||||
|
allowClear: true,
|
||||||
|
autoClearSearchValue: true,
|
||||||
|
}}
|
||||||
|
value={params.dealerId}
|
||||||
|
mode={'read'}
|
||||||
|
text={'选择经销商'}
|
||||||
|
onChange={(dealerId) => {
|
||||||
|
setParams({
|
||||||
|
...params,
|
||||||
|
dealerId: dealerId,
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
/>
|
||||||
<ProFormSelect
|
<ProFormSelect
|
||||||
label={'采购单状态'}
|
label={'采购单状态'}
|
||||||
name={'state'}
|
name={'state'}
|
||||||
|
|||||||
@ -288,7 +288,7 @@ export default function OrderShipList(props: IOrderShipListProps) {
|
|||||||
},
|
},
|
||||||
companyVO: {
|
companyVO: {
|
||||||
companyId: orderShip.companyId,
|
companyId: orderShip.companyId,
|
||||||
shortName: orderShip.companyName,
|
fullName: orderShip.companyName,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
@ -2,7 +2,6 @@ import { SelectModal } from '@/components';
|
|||||||
import { business } from '@/services';
|
import { business } from '@/services';
|
||||||
import { formatCurrency } from '@/utils/format';
|
import { formatCurrency } from '@/utils/format';
|
||||||
import { formatParam } from '@/utils/formatParam';
|
import { formatParam } from '@/utils/formatParam';
|
||||||
import { pagination } from '@/utils/pagination';
|
|
||||||
import { useIntl } from '@@/exports';
|
import { useIntl } from '@@/exports';
|
||||||
import {
|
import {
|
||||||
ActionType,
|
ActionType,
|
||||||
@ -271,7 +270,7 @@ export default function OrderShipModal(props: IOrderShipModalProps) {
|
|||||||
},
|
},
|
||||||
companyVO: {
|
companyVO: {
|
||||||
companyId: orderShip.companyId,
|
companyId: orderShip.companyId,
|
||||||
shortName: orderShip.companyName,
|
fullName: orderShip.companyName,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}) || [],
|
}) || [],
|
||||||
@ -279,10 +278,6 @@ export default function OrderShipModal(props: IOrderShipModalProps) {
|
|||||||
success,
|
success,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
pagination: {
|
|
||||||
...pagination(),
|
|
||||||
position: ['bottomRight'],
|
|
||||||
},
|
|
||||||
tableAlertRender: ({ selectedRowKeys, selectedRows }) => {
|
tableAlertRender: ({ selectedRowKeys, selectedRows }) => {
|
||||||
const selectedRowsMap = new Map<string, BusinessAPI.OrderShipVO>();
|
const selectedRowsMap = new Map<string, BusinessAPI.OrderShipVO>();
|
||||||
selectedRows.forEach((item: BusinessAPI.OrderShipVO) => {
|
selectedRows.forEach((item: BusinessAPI.OrderShipVO) => {
|
||||||
|
|||||||
@ -2,7 +2,6 @@ import {
|
|||||||
BizContainer,
|
BizContainer,
|
||||||
BizValueType,
|
BizValueType,
|
||||||
ButtonAccess,
|
ButtonAccess,
|
||||||
CompanyList,
|
|
||||||
ModeType,
|
ModeType,
|
||||||
} from '@/components';
|
} from '@/components';
|
||||||
import { business } from '@/services';
|
import { business } from '@/services';
|
||||||
@ -173,33 +172,8 @@ export default function OrderSupplierList(props: IOrderSupplierListProps) {
|
|||||||
{
|
{
|
||||||
title: intl.formatMessage({ id: intlPrefix + '.column.orderCompany' }),
|
title: intl.formatMessage({ id: intlPrefix + '.column.orderCompany' }),
|
||||||
dataIndex: 'orderCompany',
|
dataIndex: 'orderCompany',
|
||||||
valueType: 'select',
|
key: 'companyId',
|
||||||
request: async (params) => {
|
valueType: 'company',
|
||||||
const { data } = await business.company.listCompany({
|
|
||||||
companyListQry: {
|
|
||||||
...params,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
|
||||||
data?.map((item) => {
|
|
||||||
return {
|
|
||||||
label: item.fullName,
|
|
||||||
value: item.companyId,
|
|
||||||
};
|
|
||||||
}) || []
|
|
||||||
);
|
|
||||||
},
|
|
||||||
render: (_, record) => {
|
|
||||||
return (
|
|
||||||
<CompanyList
|
|
||||||
ghost={true}
|
|
||||||
mode={'detail'}
|
|
||||||
companyId={record.orderCompany.companyId}
|
|
||||||
trigger={() => <a href={'#'}>{record.orderCompany.fullName}</a>}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: intl.formatMessage({ id: intlPrefix + '.column.isPaid' }),
|
title: intl.formatMessage({ id: intlPrefix + '.column.isPaid' }),
|
||||||
@ -264,7 +238,7 @@ export default function OrderSupplierList(props: IOrderSupplierListProps) {
|
|||||||
isPaid: activeKey! as any,
|
isPaid: activeKey! as any,
|
||||||
}),
|
}),
|
||||||
poStates: ['COMPLETED'],
|
poStates: ['COMPLETED'],
|
||||||
type: 'OTHER_STALL'
|
type: 'OTHER_STALL',
|
||||||
},
|
},
|
||||||
rowSelection: {
|
rowSelection: {
|
||||||
onChange: (_, selectedRows) => setSelectedRows(selectedRows),
|
onChange: (_, selectedRows) => setSelectedRows(selectedRows),
|
||||||
|
|||||||
@ -2,7 +2,6 @@ import {
|
|||||||
BizContainer,
|
BizContainer,
|
||||||
BizValueType,
|
BizValueType,
|
||||||
ButtonAccess,
|
ButtonAccess,
|
||||||
CompanyList,
|
|
||||||
ModeType,
|
ModeType,
|
||||||
} from '@/components';
|
} from '@/components';
|
||||||
import { business } from '@/services';
|
import { business } from '@/services';
|
||||||
@ -11,7 +10,7 @@ import { useIntl } from '@@/exports';
|
|||||||
import { EyeInvisibleOutlined, EyeTwoTone } from '@ant-design/icons';
|
import { EyeInvisibleOutlined, EyeTwoTone } from '@ant-design/icons';
|
||||||
import { ProColumns } from '@ant-design/pro-components';
|
import { ProColumns } from '@ant-design/pro-components';
|
||||||
import { ProDescriptionsItemProps } from '@ant-design/pro-descriptions';
|
import { ProDescriptionsItemProps } from '@ant-design/pro-descriptions';
|
||||||
import { Button, Image, Modal, Space } from 'antd';
|
import { Button, Image, Modal, Space, Tag } from 'antd';
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
|
|
||||||
interface IOrderSupplierListProps {
|
interface IOrderSupplierListProps {
|
||||||
@ -89,6 +88,49 @@ export default function OrderSupplierList(props: IOrderSupplierListProps) {
|
|||||||
return record.invoiceAmount - record.depositAmount || 0;
|
return record.invoiceAmount - record.depositAmount || 0;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: intl.formatMessage({ id: intlPrefix + '.column.supplierInvoice' }),
|
||||||
|
dataIndex: 'supplierInvoiceVO',
|
||||||
|
key: 'supplierInvoiceId',
|
||||||
|
search: false,
|
||||||
|
valueType: 'supplierInvoice',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: intl.formatMessage({ id: intlPrefix + '.column.invoiceUpload' }),
|
||||||
|
dataIndex: 'invoiceUpload',
|
||||||
|
key: 'invoiceUpload',
|
||||||
|
search: false,
|
||||||
|
valueType: 'switch',
|
||||||
|
render: (_, record) => (
|
||||||
|
<Tag color={record.invoiceUpload ? 'green' : 'red'}>
|
||||||
|
{record.invoiceUpload
|
||||||
|
? intl.formatMessage({
|
||||||
|
id: intlPrefix + '.column.invoiceUpload.uploaded',
|
||||||
|
})
|
||||||
|
: intl.formatMessage({
|
||||||
|
id: intlPrefix + '.column.invoiceUpload.notUploaded',
|
||||||
|
})}
|
||||||
|
</Tag>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: intl.formatMessage({ id: intlPrefix + '.column.contractUpload' }),
|
||||||
|
dataIndex: 'contractUpload',
|
||||||
|
key: 'contractUpload',
|
||||||
|
search: false,
|
||||||
|
valueType: 'switch',
|
||||||
|
render: (_, record) => (
|
||||||
|
<Tag color={record.contractUpload ? 'green' : 'red'}>
|
||||||
|
{record.contractUpload
|
||||||
|
? intl.formatMessage({
|
||||||
|
id: intlPrefix + '.column.contractUpload.uploaded',
|
||||||
|
})
|
||||||
|
: intl.formatMessage({
|
||||||
|
id: intlPrefix + '.column.contractUpload.notUploaded',
|
||||||
|
})}
|
||||||
|
</Tag>
|
||||||
|
),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: intl.formatMessage({
|
title: intl.formatMessage({
|
||||||
id: intlPrefix + '.column.idCard',
|
id: intlPrefix + '.column.idCard',
|
||||||
@ -181,33 +223,8 @@ export default function OrderSupplierList(props: IOrderSupplierListProps) {
|
|||||||
{
|
{
|
||||||
title: intl.formatMessage({ id: intlPrefix + '.column.orderCompany' }),
|
title: intl.formatMessage({ id: intlPrefix + '.column.orderCompany' }),
|
||||||
dataIndex: 'orderCompany',
|
dataIndex: 'orderCompany',
|
||||||
valueType: 'select',
|
key: 'companyId',
|
||||||
request: async (params) => {
|
valueType: 'company',
|
||||||
const { data } = await business.company.listCompany({
|
|
||||||
companyListQry: {
|
|
||||||
...params,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
|
||||||
data?.map((item) => {
|
|
||||||
return {
|
|
||||||
label: item.fullName,
|
|
||||||
value: item.companyId,
|
|
||||||
};
|
|
||||||
}) || []
|
|
||||||
);
|
|
||||||
},
|
|
||||||
render: (_, record) => {
|
|
||||||
return (
|
|
||||||
<CompanyList
|
|
||||||
ghost={true}
|
|
||||||
mode={'detail'}
|
|
||||||
companyId={record.orderCompany.companyId}
|
|
||||||
trigger={() => <a href={'#'}>{record.orderCompany.fullName}</a>}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: intl.formatMessage({ id: intlPrefix + '.column.isPaid' }),
|
title: intl.formatMessage({ id: intlPrefix + '.column.isPaid' }),
|
||||||
|
|||||||
@ -1,14 +1,14 @@
|
|||||||
import { SelectModal } from '@/components';
|
import { BizValueType, SelectModal } from '@/components';
|
||||||
import { business } from '@/services';
|
import { business } from '@/services';
|
||||||
import { formatBankCard, formatIdCard, formatPhone } from '@/utils/format';
|
import { formatBankCard, formatIdCard, formatPhone } from '@/utils/format';
|
||||||
import { formatParam } from '@/utils/formatParam';
|
import { formatParam } from '@/utils/formatParam';
|
||||||
import { pagination } from '@/utils/pagination';
|
|
||||||
import { useIntl } from '@@/exports';
|
import { useIntl } from '@@/exports';
|
||||||
import { EyeInvisibleOutlined, EyeTwoTone } from '@ant-design/icons';
|
import { EyeInvisibleOutlined, EyeTwoTone } from '@ant-design/icons';
|
||||||
import {
|
import {
|
||||||
ActionType,
|
ActionType,
|
||||||
LightFilter,
|
LightFilter,
|
||||||
ProColumns,
|
ProColumns,
|
||||||
|
ProFormDateRangePicker,
|
||||||
ProFormSelect,
|
ProFormSelect,
|
||||||
} from '@ant-design/pro-components';
|
} from '@ant-design/pro-components';
|
||||||
import { Alert, ModalProps, Row, Space, Tag } from 'antd';
|
import { Alert, ModalProps, Row, Space, Tag } from 'antd';
|
||||||
@ -23,7 +23,7 @@ export interface IOrderSupplierModalProps extends ModalProps {
|
|||||||
num?: number;
|
num?: number;
|
||||||
tips?: string;
|
tips?: string;
|
||||||
extraFilter?: React.ReactNode[];
|
extraFilter?: React.ReactNode[];
|
||||||
extraColumns?: ProColumns<BusinessAPI.OrderSupplierVO>[];
|
extraColumns?: ProColumns<BusinessAPI.OrderSupplierVO, BizValueType>[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function OrderSupplierModal(props: IOrderSupplierModalProps) {
|
export default function OrderSupplierModal(props: IOrderSupplierModalProps) {
|
||||||
@ -60,19 +60,13 @@ export default function OrderSupplierModal(props: IOrderSupplierModalProps) {
|
|||||||
}
|
}
|
||||||
}, [initParams]);
|
}, [initParams]);
|
||||||
|
|
||||||
const columns: ProColumns<BusinessAPI.OrderSupplierVO>[] = [
|
const columns: ProColumns<BusinessAPI.OrderSupplierVO, BizValueType>[] = [
|
||||||
{
|
{
|
||||||
title: intl.formatMessage({ id: intlPrefix + '.column.order' }),
|
title: intl.formatMessage({ id: intlPrefix + '.column.order' }),
|
||||||
dataIndex: 'orderVO',
|
dataIndex: 'orderVO',
|
||||||
key: 'orderId',
|
key: 'orderId',
|
||||||
search: false,
|
search: false,
|
||||||
render: (_, orderSupplierVO: BusinessAPI.OrderSupplierVO) => {
|
valueType: 'order',
|
||||||
const orderVO = orderSupplierVO.orderVO;
|
|
||||||
return (
|
|
||||||
orderVO &&
|
|
||||||
`${orderVO.orderVehicle?.dealerName} | 第 ${orderVO.orderVehicle?.vehicleNo || '暂无'} 车 | ${orderVO.orderSn || '暂无'}`
|
|
||||||
);
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: intl.formatMessage({ id: intlPrefix + '.column.name' }),
|
title: intl.formatMessage({ id: intlPrefix + '.column.name' }),
|
||||||
@ -106,6 +100,82 @@ export default function OrderSupplierModal(props: IOrderSupplierModalProps) {
|
|||||||
return record.invoiceAmount - record.depositAmount || 0;
|
return record.invoiceAmount - record.depositAmount || 0;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: intl.formatMessage({ id: intlPrefix + '.column.supplierInvoice' }),
|
||||||
|
dataIndex: 'supplierInvoiceVO',
|
||||||
|
key: 'supplierInvoiceId',
|
||||||
|
search: false,
|
||||||
|
valueType: 'supplierInvoice',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: intl.formatMessage({ id: intlPrefix + '.column.invoiceUpload' }),
|
||||||
|
dataIndex: 'invoiceUpload',
|
||||||
|
key: 'invoiceUpload',
|
||||||
|
search: false,
|
||||||
|
valueType: 'switch',
|
||||||
|
render: (_, record) => (
|
||||||
|
<Tag color={record.invoiceUpload ? 'green' : 'red'}>
|
||||||
|
{record.invoiceUpload
|
||||||
|
? intl.formatMessage({
|
||||||
|
id: intlPrefix + '.column.invoiceUpload.uploaded',
|
||||||
|
})
|
||||||
|
: intl.formatMessage({
|
||||||
|
id: intlPrefix + '.column.invoiceUpload.notUploaded',
|
||||||
|
})}
|
||||||
|
</Tag>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '开票状态',
|
||||||
|
key: 'invoiceStatus',
|
||||||
|
render: (_, orderSupplierVO: BusinessAPI.OrderSupplierVO) => {
|
||||||
|
let invoiceStatus = 'NOT_INVOICE';
|
||||||
|
if (orderSupplierVO.invoiceUpload && orderSupplierVO.invoiceId) {
|
||||||
|
if (
|
||||||
|
orderSupplierVO.supplierId ===
|
||||||
|
orderSupplierVO.supplierInvoiceVO?.supplierId
|
||||||
|
) {
|
||||||
|
invoiceStatus = 'SELF';
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
orderSupplierVO.supplierId !==
|
||||||
|
orderSupplierVO.supplierInvoiceVO?.supplierId
|
||||||
|
) {
|
||||||
|
invoiceStatus = 'AGENT';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
invoiceStatus = 'NOT_INVOICE';
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (invoiceStatus) {
|
||||||
|
case 'SELF':
|
||||||
|
return '自开票';
|
||||||
|
case 'AGENT':
|
||||||
|
return '代开票';
|
||||||
|
case 'NOT_INVOICE':
|
||||||
|
return '未开票';
|
||||||
|
default:
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: intl.formatMessage({ id: intlPrefix + '.column.contractUpload' }),
|
||||||
|
dataIndex: 'contractUpload',
|
||||||
|
key: 'contractUpload',
|
||||||
|
search: false,
|
||||||
|
valueType: 'switch',
|
||||||
|
render: (_, record) => (
|
||||||
|
<Tag color={record.contractUpload ? 'green' : 'red'}>
|
||||||
|
{record.contractUpload
|
||||||
|
? intl.formatMessage({
|
||||||
|
id: intlPrefix + '.column.contractUpload.uploaded',
|
||||||
|
})
|
||||||
|
: intl.formatMessage({
|
||||||
|
id: intlPrefix + '.column.contractUpload.notUploaded',
|
||||||
|
})}
|
||||||
|
</Tag>
|
||||||
|
),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: intl.formatMessage({
|
title: intl.formatMessage({
|
||||||
id: intlPrefix + '.column.idCard',
|
id: intlPrefix + '.column.idCard',
|
||||||
@ -198,27 +268,6 @@ export default function OrderSupplierModal(props: IOrderSupplierModalProps) {
|
|||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: intl.formatMessage({ id: intlPrefix + '.column.orderCompany' }),
|
|
||||||
dataIndex: ['orderCompany', 'companyId'],
|
|
||||||
valueType: 'select',
|
|
||||||
request: async (params) => {
|
|
||||||
const { data } = await business.company.listCompany({
|
|
||||||
companyListQry: {
|
|
||||||
...params,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
|
||||||
data?.map((item) => {
|
|
||||||
return {
|
|
||||||
label: item.fullName,
|
|
||||||
value: item.companyId,
|
|
||||||
};
|
|
||||||
}) || []
|
|
||||||
);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: intl.formatMessage({ id: intlPrefix + '.column.isPaid' }),
|
title: intl.formatMessage({ id: intlPrefix + '.column.isPaid' }),
|
||||||
dataIndex: 'isPaid',
|
dataIndex: 'isPaid',
|
||||||
@ -309,10 +358,6 @@ export default function OrderSupplierModal(props: IOrderSupplierModalProps) {
|
|||||||
success,
|
success,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
pagination: {
|
|
||||||
...pagination(),
|
|
||||||
position: ['bottomRight'],
|
|
||||||
},
|
|
||||||
tableAlertRender: ({ selectedRowKeys, selectedRows }) => {
|
tableAlertRender: ({ selectedRowKeys, selectedRows }) => {
|
||||||
const selectedRowsMap = new Map<
|
const selectedRowsMap = new Map<
|
||||||
string,
|
string,
|
||||||
@ -400,49 +445,48 @@ export default function OrderSupplierModal(props: IOrderSupplierModalProps) {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{extraFilter}
|
{extraFilter}
|
||||||
{/*<ProFormSelect*/}
|
{/*<ProFormDateRangePicker*/}
|
||||||
{/* label={'供应商类型'}*/}
|
{/* label={'发货时间'}*/}
|
||||||
{/* name={'type'}*/}
|
{/* name={'shippingDate'}*/}
|
||||||
{/* placeholder={'请选择供应商类型'}*/}
|
{/* placeholder={'请选择发货时间'}*/}
|
||||||
{/* valueEnum={{*/}
|
|
||||||
{/* FARMER: intl.formatMessage({*/}
|
|
||||||
{/* id: intlPrefix + '.column.type.farmer',*/}
|
|
||||||
{/* }),*/}
|
|
||||||
{/* STALL: intl.formatMessage({*/}
|
|
||||||
{/* id: intlPrefix + '.column.type.stall',*/}
|
|
||||||
{/* }),*/}
|
|
||||||
{/* OTHER_STALL: intl.formatMessage({*/}
|
|
||||||
{/* id: intlPrefix + '.column.type.otherStall',*/}
|
|
||||||
{/* }),*/}
|
|
||||||
{/* }}*/}
|
|
||||||
{/* fieldProps={{*/}
|
{/* fieldProps={{*/}
|
||||||
{/* showSearch: true,*/}
|
|
||||||
{/* allowClear: true,*/}
|
{/* allowClear: true,*/}
|
||||||
{/* autoClearSearchValue: true,*/}
|
{/* picker: 'date',*/}
|
||||||
{/* }}*/}
|
{/* }}*/}
|
||||||
{/*/>*/}
|
{/*/>*/}
|
||||||
<ProFormSelect
|
<ProFormDateRangePicker
|
||||||
label={'是否付款'}
|
label={'开票时间'}
|
||||||
name={'isPaid'}
|
name={'invoiceDate'}
|
||||||
placeholder={'请选择是否付款'}
|
placeholder={'请选择开票时间'}
|
||||||
valueEnum={{
|
|
||||||
true: intl.formatMessage({
|
|
||||||
id: intlPrefix + '.column.isPaid.paid',
|
|
||||||
}),
|
|
||||||
false: intl.formatMessage({
|
|
||||||
id: intlPrefix + '.column.isPaid.unpaid',
|
|
||||||
}),
|
|
||||||
}}
|
|
||||||
fieldProps={{
|
fieldProps={{
|
||||||
showSearch: true,
|
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
autoClearSearchValue: true,
|
picker: 'date',
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
{initParams?.isPaid === undefined && (
|
||||||
|
<ProFormSelect
|
||||||
|
label={'是否付款'}
|
||||||
|
name={'isPaid'}
|
||||||
|
placeholder={'请选择是否付款'}
|
||||||
|
valueEnum={{
|
||||||
|
true: intl.formatMessage({
|
||||||
|
id: intlPrefix + '.column.isPaid.paid',
|
||||||
|
}),
|
||||||
|
false: intl.formatMessage({
|
||||||
|
id: intlPrefix + '.column.isPaid.unpaid',
|
||||||
|
}),
|
||||||
|
}}
|
||||||
|
fieldProps={{
|
||||||
|
showSearch: true,
|
||||||
|
allowClear: true,
|
||||||
|
autoClearSearchValue: true,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</LightFilter>
|
</LightFilter>
|
||||||
),
|
),
|
||||||
search: {
|
search: {
|
||||||
placeholder: '请输入供应商姓名',
|
placeholder: '请输入瓜农姓名',
|
||||||
onSearch: async (value: string) => {
|
onSearch: async (value: string) => {
|
||||||
setParams({
|
setParams({
|
||||||
...params,
|
...params,
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
import { BizValueType, CompanyList } from '@/components';
|
import { BizValueType } from '@/components';
|
||||||
import BizProvider from '@/components/Biz/BizProvider';
|
import BizProvider from '@/components/Biz/BizProvider';
|
||||||
import { business } from '@/services';
|
|
||||||
import { useIntl } from '@@/exports';
|
import { useIntl } from '@@/exports';
|
||||||
import {
|
import {
|
||||||
ProColumns,
|
ProColumns,
|
||||||
ProTable,
|
ProTable,
|
||||||
ProTableProps,
|
ProTableProps,
|
||||||
} from '@ant-design/pro-components';
|
} from '@ant-design/pro-components';
|
||||||
|
import { Tag } from 'antd';
|
||||||
|
|
||||||
type IOrderSupplierSelectListProps = ProTableProps<
|
type IOrderSupplierSelectListProps = ProTableProps<
|
||||||
BusinessAPI.OrderSupplierVO,
|
BusinessAPI.OrderSupplierVO,
|
||||||
@ -62,36 +62,85 @@ export default function OrderSupplierSelectList(
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: intl.formatMessage({ id: intlPrefix + '.column.orderCompany' }),
|
title: intl.formatMessage({
|
||||||
dataIndex: 'orderCompany',
|
id: intlPrefix + '.column.supplierInvoice',
|
||||||
valueType: 'select',
|
}),
|
||||||
request: async (params) => {
|
dataIndex: 'supplierInvoiceVO',
|
||||||
const { data } = await business.company.listCompany({
|
key: 'supplierInvoiceId',
|
||||||
companyListQry: {
|
search: false,
|
||||||
...params,
|
valueType: 'supplierInvoice',
|
||||||
},
|
},
|
||||||
});
|
{
|
||||||
|
title: intl.formatMessage({ id: intlPrefix + '.column.invoiceUpload' }),
|
||||||
|
dataIndex: 'invoiceUpload',
|
||||||
|
key: 'invoiceUpload',
|
||||||
|
search: false,
|
||||||
|
valueType: 'switch',
|
||||||
|
render: (_, record) => (
|
||||||
|
<Tag color={record.invoiceUpload ? 'green' : 'red'}>
|
||||||
|
{record.invoiceUpload
|
||||||
|
? intl.formatMessage({
|
||||||
|
id: intlPrefix + '.column.invoiceUpload.uploaded',
|
||||||
|
})
|
||||||
|
: intl.formatMessage({
|
||||||
|
id: intlPrefix + '.column.invoiceUpload.notUploaded',
|
||||||
|
})}
|
||||||
|
</Tag>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '开票状态',
|
||||||
|
key: 'invoiceStatus',
|
||||||
|
render: (_, orderSupplierVO: BusinessAPI.OrderSupplierVO) => {
|
||||||
|
let invoiceStatus = 'NOT_INVOICE';
|
||||||
|
if (orderSupplierVO.invoiceUpload && orderSupplierVO.invoiceId) {
|
||||||
|
if (
|
||||||
|
orderSupplierVO.supplierId ===
|
||||||
|
orderSupplierVO.supplierInvoiceVO?.supplierId
|
||||||
|
) {
|
||||||
|
invoiceStatus = 'SELF';
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
orderSupplierVO.supplierId !==
|
||||||
|
orderSupplierVO.supplierInvoiceVO?.supplierId
|
||||||
|
) {
|
||||||
|
invoiceStatus = 'AGENT';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
invoiceStatus = 'NOT_INVOICE';
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
switch (invoiceStatus) {
|
||||||
data?.map((item) => {
|
case 'SELF':
|
||||||
return {
|
return '自开票';
|
||||||
label: item.fullName,
|
case 'AGENT':
|
||||||
value: item.companyId,
|
return '代开票';
|
||||||
};
|
case 'NOT_INVOICE':
|
||||||
}) || []
|
return '未开票';
|
||||||
);
|
default:
|
||||||
},
|
}
|
||||||
render: (_, record) => {
|
|
||||||
return (
|
|
||||||
<CompanyList
|
|
||||||
ghost={true}
|
|
||||||
mode={'detail'}
|
|
||||||
companyId={record.orderCompany.companyId}
|
|
||||||
trigger={() => <a href={'#'}>{record.orderCompany.fullName}</a>}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: intl.formatMessage({
|
||||||
|
id: intlPrefix + '.column.contractUpload',
|
||||||
|
}),
|
||||||
|
dataIndex: 'contractUpload',
|
||||||
|
key: 'contractUpload',
|
||||||
|
search: false,
|
||||||
|
valueType: 'switch',
|
||||||
|
render: (_, record) => (
|
||||||
|
<Tag color={record.contractUpload ? 'green' : 'red'}>
|
||||||
|
{record.contractUpload
|
||||||
|
? intl.formatMessage({
|
||||||
|
id: intlPrefix + '.column.contractUpload.uploaded',
|
||||||
|
})
|
||||||
|
: intl.formatMessage({
|
||||||
|
id: intlPrefix + '.column.contractUpload.notUploaded',
|
||||||
|
})}
|
||||||
|
</Tag>
|
||||||
|
),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: intl.formatMessage({ id: intlPrefix + '.column.isPaid' }),
|
title: intl.formatMessage({ id: intlPrefix + '.column.isPaid' }),
|
||||||
dataIndex: 'isPaid',
|
dataIndex: 'isPaid',
|
||||||
|
|||||||
@ -381,11 +381,8 @@ export default function PaymentRecordList(props: IPaymentRecordListProps) {
|
|||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
create={false}
|
create={false}
|
||||||
update={{
|
update={false}
|
||||||
formType: 'drawer',
|
destroy={false}
|
||||||
formContext: [],
|
|
||||||
}}
|
|
||||||
destroy={{}}
|
|
||||||
detail={{
|
detail={{
|
||||||
rowId: paymentRecordId,
|
rowId: paymentRecordId,
|
||||||
formType: 'drawer',
|
formType: 'drawer',
|
||||||
|
|||||||
@ -3,8 +3,6 @@ import {
|
|||||||
ButtonAccess,
|
ButtonAccess,
|
||||||
InsertPosition,
|
InsertPosition,
|
||||||
OrderSupplierSelectList,
|
OrderSupplierSelectList,
|
||||||
SupplierFarmerList,
|
|
||||||
SupplierInvoiceList,
|
|
||||||
SupplierSelect,
|
SupplierSelect,
|
||||||
} from '@/components';
|
} from '@/components';
|
||||||
import OrderSupplierModal from '@/components/Order/OrderSupplierModal';
|
import OrderSupplierModal from '@/components/Order/OrderSupplierModal';
|
||||||
@ -22,7 +20,7 @@ import {
|
|||||||
RouteContext,
|
RouteContext,
|
||||||
RouteContextType,
|
RouteContextType,
|
||||||
} from '@ant-design/pro-components';
|
} from '@ant-design/pro-components';
|
||||||
import { Button, Col, Image, message, Row, Space, Table, Tag } from 'antd';
|
import { Button, Col, Image, message, Row, Table, Tag } from 'antd';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
|
|
||||||
export interface IPaymentTaskCreateProps {
|
export interface IPaymentTaskCreateProps {
|
||||||
@ -245,96 +243,6 @@ export default function PaymentTaskCreate(props: IPaymentTaskCreateProps) {
|
|||||||
rowKey="orderSupplierId"
|
rowKey="orderSupplierId"
|
||||||
dataSource={selectedOrderSupplierList}
|
dataSource={selectedOrderSupplierList}
|
||||||
columns={[
|
columns={[
|
||||||
{
|
|
||||||
title: '开票瓜农',
|
|
||||||
dataIndex: 'supplierInvoiceVO',
|
|
||||||
render: (
|
|
||||||
_,
|
|
||||||
orderSupplierVO: BusinessAPI.OrderSupplierVO,
|
|
||||||
) => {
|
|
||||||
const supplierInvoiceVO =
|
|
||||||
orderSupplierVO.supplierInvoiceVO;
|
|
||||||
return (
|
|
||||||
supplierInvoiceVO && (
|
|
||||||
<SupplierFarmerList
|
|
||||||
ghost={true}
|
|
||||||
mode={'detail'}
|
|
||||||
supplierId={supplierInvoiceVO.supplierId}
|
|
||||||
trigger={() => (
|
|
||||||
<a>{supplierInvoiceVO.supplierName}</a>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
)
|
|
||||||
);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '发票编码',
|
|
||||||
dataIndex: 'supplierInvoiceVO',
|
|
||||||
render: (
|
|
||||||
_,
|
|
||||||
orderSupplierVO: BusinessAPI.OrderSupplierVO,
|
|
||||||
) => {
|
|
||||||
const supplierInvoiceVO =
|
|
||||||
orderSupplierVO.supplierInvoiceVO;
|
|
||||||
return (
|
|
||||||
supplierInvoiceVO && (
|
|
||||||
<SupplierInvoiceList
|
|
||||||
ghost={true}
|
|
||||||
mode={'detail'}
|
|
||||||
supplierInvoiceId={
|
|
||||||
supplierInvoiceVO.supplierInvoiceId
|
|
||||||
}
|
|
||||||
trigger={() => (
|
|
||||||
<Space>
|
|
||||||
<a>{supplierInvoiceVO.invoiceSn}</a>
|
|
||||||
</Space>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
)
|
|
||||||
);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
// 开票状态(自开票,代开票,未开票)
|
|
||||||
{
|
|
||||||
title: '开票状态',
|
|
||||||
key: 'invoiceStatus',
|
|
||||||
render: (
|
|
||||||
_,
|
|
||||||
orderSupplierVO: BusinessAPI.OrderSupplierVO,
|
|
||||||
) => {
|
|
||||||
let invoiceStatus = 'NOT_INVOICE';
|
|
||||||
if (
|
|
||||||
orderSupplierVO.invoiceUpload &&
|
|
||||||
orderSupplierVO.invoiceId
|
|
||||||
) {
|
|
||||||
if (
|
|
||||||
orderSupplierVO.supplierId ===
|
|
||||||
orderSupplierVO.supplierInvoiceVO?.supplierId
|
|
||||||
) {
|
|
||||||
invoiceStatus = 'SELF';
|
|
||||||
}
|
|
||||||
if (
|
|
||||||
orderSupplierVO.supplierId !==
|
|
||||||
orderSupplierVO.supplierInvoiceVO?.supplierId
|
|
||||||
) {
|
|
||||||
invoiceStatus = 'AGENT';
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
invoiceStatus = 'NOT_INVOICE';
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (invoiceStatus) {
|
|
||||||
case 'SELF':
|
|
||||||
return '自开票';
|
|
||||||
case 'AGENT':
|
|
||||||
return '代开票';
|
|
||||||
case 'NOT_INVOICE':
|
|
||||||
return '未开票';
|
|
||||||
default:
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
key: 'action',
|
key: 'action',
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
import { SelectModal } from '@/components';
|
import { BizValueType, SelectModal } from '@/components';
|
||||||
import { business } from '@/services';
|
import { business } from '@/services';
|
||||||
import { formatParam } from '@/utils/formatParam';
|
import { formatParam } from '@/utils/formatParam';
|
||||||
import { pagination } from '@/utils/pagination';
|
|
||||||
import { useIntl } from '@@/exports';
|
import { useIntl } from '@@/exports';
|
||||||
import {
|
import {
|
||||||
ActionType,
|
ActionType,
|
||||||
@ -20,7 +19,7 @@ export interface IPaymentTaskModalProps extends ModalProps {
|
|||||||
num?: number;
|
num?: number;
|
||||||
tips?: string;
|
tips?: string;
|
||||||
extraFilter?: React.ReactNode[];
|
extraFilter?: React.ReactNode[];
|
||||||
extraColumns?: ProColumns<BusinessAPI.PaymentTaskVO>[];
|
extraColumns?: ProColumns<BusinessAPI.PaymentTaskVO, BizValueType>[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function PaymentTaskModal(props: IPaymentTaskModalProps) {
|
export default function PaymentTaskModal(props: IPaymentTaskModalProps) {
|
||||||
@ -54,7 +53,7 @@ export default function PaymentTaskModal(props: IPaymentTaskModalProps) {
|
|||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
const intlPrefix = 'paymentTask';
|
const intlPrefix = 'paymentTask';
|
||||||
|
|
||||||
const columns: ProColumns<BusinessAPI.PaymentTaskVO>[] = [
|
const columns: ProColumns<BusinessAPI.PaymentTaskVO, BizValueType>[] = [
|
||||||
{
|
{
|
||||||
title: intl.formatMessage({ id: intlPrefix + '.column.taskName' }),
|
title: intl.formatMessage({ id: intlPrefix + '.column.taskName' }),
|
||||||
dataIndex: 'taskName',
|
dataIndex: 'taskName',
|
||||||
@ -164,10 +163,6 @@ export default function PaymentTaskModal(props: IPaymentTaskModalProps) {
|
|||||||
success,
|
success,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
pagination: {
|
|
||||||
...pagination(),
|
|
||||||
position: ['bottomRight'],
|
|
||||||
},
|
|
||||||
tableAlertRender: ({ selectedRowKeys, selectedRows }) => {
|
tableAlertRender: ({ selectedRowKeys, selectedRows }) => {
|
||||||
// selectedRows 和 selectedList 组合在一起,去重,
|
// selectedRows 和 selectedList 组合在一起,去重,
|
||||||
const selectedRowsMap = new Map<string, BusinessAPI.PaymentTaskVO>();
|
const selectedRowsMap = new Map<string, BusinessAPI.PaymentTaskVO>();
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
import { SelectModal } from '@/components';
|
import { BizValueType, SelectModal } from '@/components';
|
||||||
import { business } from '@/services';
|
import { business } from '@/services';
|
||||||
import { formatCurrency } from '@/utils/format';
|
import { formatCurrency } from '@/utils/format';
|
||||||
import { formatParam } from '@/utils/formatParam';
|
import { formatParam } from '@/utils/formatParam';
|
||||||
import { pagination } from '@/utils/pagination';
|
|
||||||
import { useIntl } from '@@/exports';
|
import { useIntl } from '@@/exports';
|
||||||
import {
|
import {
|
||||||
ActionType,
|
ActionType,
|
||||||
@ -23,7 +22,10 @@ export interface IReconciliationInvoiceModalProps extends ModalProps {
|
|||||||
num?: number;
|
num?: number;
|
||||||
tips?: string;
|
tips?: string;
|
||||||
extraFilter?: React.ReactNode[];
|
extraFilter?: React.ReactNode[];
|
||||||
extraColumns?: ProColumns<BusinessAPI.ReconciliationInvoiceVO>[];
|
extraColumns?: ProColumns<
|
||||||
|
BusinessAPI.ReconciliationInvoiceVO,
|
||||||
|
BizValueType
|
||||||
|
>[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function ReconciliationInvoiceModal(
|
export default function ReconciliationInvoiceModal(
|
||||||
@ -58,7 +60,10 @@ export default function ReconciliationInvoiceModal(
|
|||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
const intlPrefix = 'reconciliationInvoice';
|
const intlPrefix = 'reconciliationInvoice';
|
||||||
|
|
||||||
const columns: ProColumns<BusinessAPI.ReconciliationInvoiceVO>[] = [
|
const columns: ProColumns<
|
||||||
|
BusinessAPI.ReconciliationInvoiceVO,
|
||||||
|
BizValueType
|
||||||
|
>[] = [
|
||||||
{
|
{
|
||||||
title: intl.formatMessage({
|
title: intl.formatMessage({
|
||||||
id: intlPrefix + '.column.invoiceSn',
|
id: intlPrefix + '.column.invoiceSn',
|
||||||
@ -185,10 +190,6 @@ export default function ReconciliationInvoiceModal(
|
|||||||
success,
|
success,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
pagination: {
|
|
||||||
...pagination(),
|
|
||||||
position: ['bottomRight'],
|
|
||||||
},
|
|
||||||
tableAlertRender: ({ selectedRowKeys, selectedRows }) => {
|
tableAlertRender: ({ selectedRowKeys, selectedRows }) => {
|
||||||
// selectedRows 和 selectedList 组合在一起,去重
|
// selectedRows 和 selectedList 组合在一起,去重
|
||||||
const selectedRowsMap = new Map<
|
const selectedRowsMap = new Map<
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
import { SelectModal } from '@/components';
|
import { BizValueType, SelectModal } from '@/components';
|
||||||
import { business } from '@/services';
|
import { business } from '@/services';
|
||||||
import { formatCurrency } from '@/utils/format';
|
import { formatCurrency } from '@/utils/format';
|
||||||
import { formatParam } from '@/utils/formatParam';
|
import { formatParam } from '@/utils/formatParam';
|
||||||
import { pagination } from '@/utils/pagination';
|
|
||||||
import { useIntl } from '@@/exports';
|
import { useIntl } from '@@/exports';
|
||||||
import {
|
import {
|
||||||
ActionType,
|
ActionType,
|
||||||
@ -22,7 +21,7 @@ export interface IReconciliationModalProps extends ModalProps {
|
|||||||
num?: number;
|
num?: number;
|
||||||
tips?: string;
|
tips?: string;
|
||||||
extraFilter?: React.ReactNode[];
|
extraFilter?: React.ReactNode[];
|
||||||
extraColumns?: ProColumns<BusinessAPI.ReconciliationVO>[];
|
extraColumns?: ProColumns<BusinessAPI.ReconciliationVO, BizValueType>[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function ReconciliationModal(props: IReconciliationModalProps) {
|
export default function ReconciliationModal(props: IReconciliationModalProps) {
|
||||||
@ -66,7 +65,7 @@ export default function ReconciliationModal(props: IReconciliationModalProps) {
|
|||||||
PAID: '已回款',
|
PAID: '已回款',
|
||||||
};
|
};
|
||||||
|
|
||||||
const columns: ProColumns<BusinessAPI.ReconciliationVO>[] = [
|
const columns: ProColumns<BusinessAPI.ReconciliationVO, BizValueType>[] = [
|
||||||
{
|
{
|
||||||
title: intl.formatMessage({
|
title: intl.formatMessage({
|
||||||
id: intlPrefix + '.column.reconciliationSn',
|
id: intlPrefix + '.column.reconciliationSn',
|
||||||
@ -186,10 +185,6 @@ export default function ReconciliationModal(props: IReconciliationModalProps) {
|
|||||||
success,
|
success,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
pagination: {
|
|
||||||
...pagination(),
|
|
||||||
position: ['bottomRight'],
|
|
||||||
},
|
|
||||||
tableAlertRender: ({ selectedRowKeys, selectedRows }) => {
|
tableAlertRender: ({ selectedRowKeys, selectedRows }) => {
|
||||||
// selectedRows 和 selectedList 组合在一起,去重
|
// selectedRows 和 selectedList 组合在一起,去重
|
||||||
const selectedRowsMap = new Map<
|
const selectedRowsMap = new Map<
|
||||||
|
|||||||
@ -14,6 +14,7 @@ import { DownloadOutlined, EyeOutlined } from '@ant-design/icons';
|
|||||||
import { ProColumns } from '@ant-design/pro-components';
|
import { ProColumns } from '@ant-design/pro-components';
|
||||||
import { ProDescriptionsItemProps } from '@ant-design/pro-descriptions';
|
import { ProDescriptionsItemProps } from '@ant-design/pro-descriptions';
|
||||||
import { Image, Modal, Space, Typography } from 'antd';
|
import { Image, Modal, Space, Typography } from 'antd';
|
||||||
|
import dayjs from 'dayjs';
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
|
|
||||||
const { Text } = Typography;
|
const { Text } = Typography;
|
||||||
@ -69,21 +70,6 @@ export default function SupplierInvoiceList(props: ISupplierInvoiceListProps) {
|
|||||||
dataIndex: 'supplierVO',
|
dataIndex: 'supplierVO',
|
||||||
key: 'supplierId',
|
key: 'supplierId',
|
||||||
valueType: 'supplier',
|
valueType: 'supplier',
|
||||||
render: (_, record) => {
|
|
||||||
return (
|
|
||||||
<SupplierFarmerList
|
|
||||||
key={record.supplierId}
|
|
||||||
ghost={true}
|
|
||||||
mode={'detail'}
|
|
||||||
supplierId={record.supplierId}
|
|
||||||
trigger={() => (
|
|
||||||
<Space>
|
|
||||||
<a>{record.supplierName}</a>
|
|
||||||
</Space>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: intl.formatMessage({ id: intlPrefix + '.column.invoiceAmount' }),
|
title: intl.formatMessage({ id: intlPrefix + '.column.invoiceAmount' }),
|
||||||
@ -102,8 +88,8 @@ export default function SupplierInvoiceList(props: ISupplierInvoiceListProps) {
|
|||||||
{
|
{
|
||||||
title: intl.formatMessage({ id: intlPrefix + '.column.supplier' }),
|
title: intl.formatMessage({ id: intlPrefix + '.column.supplier' }),
|
||||||
dataIndex: 'supplier',
|
dataIndex: 'supplier',
|
||||||
key: 'supplier',
|
key: 'orderSupplierId',
|
||||||
search: false,
|
valueType: 'supplier',
|
||||||
render: (_, record) => {
|
render: (_, record) => {
|
||||||
return record.orderSupplierInvoiceList?.map((item) => {
|
return record.orderSupplierInvoiceList?.map((item) => {
|
||||||
return (
|
return (
|
||||||
@ -125,7 +111,8 @@ export default function SupplierInvoiceList(props: ISupplierInvoiceListProps) {
|
|||||||
{
|
{
|
||||||
title: intl.formatMessage({ id: intlPrefix + '.column.order' }),
|
title: intl.formatMessage({ id: intlPrefix + '.column.order' }),
|
||||||
dataIndex: 'order',
|
dataIndex: 'order',
|
||||||
search: false,
|
key: 'orderId',
|
||||||
|
valueType: 'order',
|
||||||
render: (_, record) => {
|
render: (_, record) => {
|
||||||
return record.orderSupplierInvoiceList?.map((item) => {
|
return record.orderSupplierInvoiceList?.map((item) => {
|
||||||
return (
|
return (
|
||||||
@ -152,8 +139,15 @@ export default function SupplierInvoiceList(props: ISupplierInvoiceListProps) {
|
|||||||
}),
|
}),
|
||||||
dataIndex: 'registrationTime',
|
dataIndex: 'registrationTime',
|
||||||
key: 'registrationTime',
|
key: 'registrationTime',
|
||||||
valueType: 'dateTime',
|
valueType: 'dateTimeRange',
|
||||||
search: false,
|
render: (_, record) => {
|
||||||
|
return record.registrationTime
|
||||||
|
? dayjs(record.registrationTime).format('YYYY-MM-DD HH:mm')
|
||||||
|
: '';
|
||||||
|
},
|
||||||
|
fieldProps: {
|
||||||
|
placeholder: ['开始时间', '开始时间'],
|
||||||
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -294,6 +288,15 @@ export default function SupplierInvoiceList(props: ISupplierInvoiceListProps) {
|
|||||||
poStates: ['COMPLETED'],
|
poStates: ['COMPLETED'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
convertValue: (value) => {
|
||||||
|
return {
|
||||||
|
...value,
|
||||||
|
supplierVO: {
|
||||||
|
supplierId: value.supplierId,
|
||||||
|
name: value.supplierName,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
columns,
|
columns,
|
||||||
options: (supplierInvoiceVO) => {
|
options: (supplierInvoiceVO) => {
|
||||||
return [
|
return [
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { SelectModal } from '@/components';
|
import { BizValueType, SelectModal } from '@/components';
|
||||||
import { business } from '@/services';
|
import { business } from '@/services';
|
||||||
import { formatBankCard, formatIdCard, formatPhone } from '@/utils/format';
|
import { formatBankCard, formatIdCard, formatPhone } from '@/utils/format';
|
||||||
import { formatParam } from '@/utils/formatParam';
|
import { formatParam } from '@/utils/formatParam';
|
||||||
@ -23,7 +23,7 @@ export interface ISupplierModalProps extends ModalProps {
|
|||||||
num?: number;
|
num?: number;
|
||||||
tips?: string;
|
tips?: string;
|
||||||
extraFilter?: React.ReactNode[];
|
extraFilter?: React.ReactNode[];
|
||||||
extraColumns?: ProColumns<BusinessAPI.SupplierVO>[];
|
extraColumns?: ProColumns<BusinessAPI.SupplierVO, BizValueType>[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function SupplierModal(props: ISupplierModalProps) {
|
export default function SupplierModal(props: ISupplierModalProps) {
|
||||||
@ -63,7 +63,7 @@ export default function SupplierModal(props: ISupplierModalProps) {
|
|||||||
const intlPrefix =
|
const intlPrefix =
|
||||||
props.params?.type === 'FARMER' ? 'supplierFarmer' : 'supplierStall';
|
props.params?.type === 'FARMER' ? 'supplierFarmer' : 'supplierStall';
|
||||||
|
|
||||||
const columns: ProColumns<BusinessAPI.SupplierVO>[] = [
|
const columns: ProColumns<BusinessAPI.SupplierVO, BizValueType>[] = [
|
||||||
{
|
{
|
||||||
title: intl.formatMessage({ id: intlPrefix + '.column.name' }),
|
title: intl.formatMessage({ id: intlPrefix + '.column.name' }),
|
||||||
dataIndex: 'name',
|
dataIndex: 'name',
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
import { SelectModal, UserList } from '@/components';
|
import { BizValueType, SelectModal, UserList } from '@/components';
|
||||||
import { business } from '@/services';
|
import { business } from '@/services';
|
||||||
import { formatParam } from '@/utils/formatParam';
|
import { formatParam } from '@/utils/formatParam';
|
||||||
import { pagination } from '@/utils/pagination';
|
|
||||||
import {
|
import {
|
||||||
ActionType,
|
ActionType,
|
||||||
LightFilter,
|
LightFilter,
|
||||||
@ -19,7 +18,7 @@ export interface IUserModalProps extends ModalProps {
|
|||||||
num?: number;
|
num?: number;
|
||||||
tips?: string;
|
tips?: string;
|
||||||
extraFilter?: React.ReactNode[];
|
extraFilter?: React.ReactNode[];
|
||||||
extraColumns?: ProColumns<BusinessAPI.UserVO>[];
|
extraColumns?: ProColumns<BusinessAPI.UserVO, BizValueType>[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function UserModal(props: IUserModalProps) {
|
export default function UserModal(props: IUserModalProps) {
|
||||||
@ -50,7 +49,7 @@ export default function UserModal(props: IUserModalProps) {
|
|||||||
}
|
}
|
||||||
}, [initParams]);
|
}, [initParams]);
|
||||||
|
|
||||||
const columns: ProColumns<BusinessAPI.UserVO>[] = [
|
const columns: ProColumns<BusinessAPI.UserVO, BizValueType>[] = [
|
||||||
{
|
{
|
||||||
title: '客户昵称',
|
title: '客户昵称',
|
||||||
dataIndex: 'nickname',
|
dataIndex: 'nickname',
|
||||||
@ -126,10 +125,6 @@ export default function UserModal(props: IUserModalProps) {
|
|||||||
success,
|
success,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
pagination: {
|
|
||||||
...pagination(),
|
|
||||||
position: ['bottomRight'],
|
|
||||||
},
|
|
||||||
tableAlertRender: ({ selectedRowKeys, selectedRows }) => {
|
tableAlertRender: ({ selectedRowKeys, selectedRows }) => {
|
||||||
// selectedRows 和 selectedList 组合在一起,去重,
|
// selectedRows 和 selectedList 组合在一起,去重,
|
||||||
const selectedRowsMap = new Map<string, BusinessAPI.UserVO>();
|
const selectedRowsMap = new Map<string, BusinessAPI.UserVO>();
|
||||||
|
|||||||
@ -2219,6 +2219,13 @@ export default {
|
|||||||
invoiceAmount: '应付金额(元)',
|
invoiceAmount: '应付金额(元)',
|
||||||
depositAmount: '已付定金(元)',
|
depositAmount: '已付定金(元)',
|
||||||
remainingAmount: '剩余金额(元)',
|
remainingAmount: '剩余金额(元)',
|
||||||
|
supplierInvoice: '发票信息',
|
||||||
|
invoiceUpload: '发票上传',
|
||||||
|
'invoiceUpload.uploaded': '已上传',
|
||||||
|
'invoiceUpload.notUploaded': '未上传',
|
||||||
|
contractUpload: '合同上传',
|
||||||
|
'contractUpload.uploaded': '已上传',
|
||||||
|
'contractUpload.notUploaded': '未上传',
|
||||||
order: '采购单',
|
order: '采购单',
|
||||||
orderCompany: '销售公司',
|
orderCompany: '销售公司',
|
||||||
isPaid: '是否付款',
|
isPaid: '是否付款',
|
||||||
@ -2673,7 +2680,7 @@ export default {
|
|||||||
totalAmount: '付款总金额(元)',
|
totalAmount: '付款总金额(元)',
|
||||||
paidAmount: '已付金额(元)',
|
paidAmount: '已付金额(元)',
|
||||||
unpaidAmount: '未付金额(元)',
|
unpaidAmount: '未付金额(元)',
|
||||||
orderCount: '订单数量',
|
orderCount: '车数',
|
||||||
state: '付款状态',
|
state: '付款状态',
|
||||||
'state.enum.pending': '待付款',
|
'state.enum.pending': '待付款',
|
||||||
'state.enum.partial': '部分付款',
|
'state.enum.partial': '部分付款',
|
||||||
@ -2834,11 +2841,17 @@ export default {
|
|||||||
paidAmount: '付款金额',
|
paidAmount: '付款金额',
|
||||||
paidAt: '支付时间',
|
paidAt: '支付时间',
|
||||||
paidState: '支付状态',
|
paidState: '支付状态',
|
||||||
remark: '备注',
|
remark: '支付备注',
|
||||||
paidCredentials: '支付凭证',
|
paidCredentials: '支付凭证',
|
||||||
createdAt: '创建时间',
|
createdAt: '创建时间',
|
||||||
option: '操作',
|
option: '操作',
|
||||||
},
|
},
|
||||||
|
form: {
|
||||||
|
remark: {
|
||||||
|
label: '付款备注',
|
||||||
|
placeholder: '请输入付款备注',
|
||||||
|
},
|
||||||
|
},
|
||||||
tab: {
|
tab: {
|
||||||
all: '全部',
|
all: '全部',
|
||||||
draft: '草稿',
|
draft: '草稿',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user