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