Commit 6113fef6 authored by 卢均锐's avatar 卢均锐

feat: 结算能力-业务对账相关多语言

parent f32f274b
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -210,20 +210,20 @@ const SettlementList: React.FC = () => {
const columns = [
{
title: '单据号',
title: intl.formatMessage({ id: 'balance.accountsReceivable.invoice.columns.orderNo' }),
dataIndex: 'orderNo',
render: (text, record) => <Button type='link' onClick={() => { _handleOrderNo(record) }}>{text}</Button>
},
{
title: '单据摘要',
title: intl.formatMessage({ id: 'balance.accountsReceivable.invoice.columns.orderAbstract' }),
dataIndex: 'orderAbstract',
},
{
title: '单据类型',
title: intl.formatMessage({ id: 'balance.accountsReceivable.invoice.columns.settlementOrderTypeName' }),
dataIndex: 'settlementOrderTypeName',
},
{
title: '单据时间',
title: intl.formatMessage({ id: 'balance.accountsReceivable.invoice.columns.orderTime' }),
dataIndex: 'orderTime',
},
{ title: intl.formatMessage({ id: 'balance.accountsReceivable.invoice.columns.orderTypeName' }), dataIndex: 'orderTypeName' },
......@@ -237,21 +237,21 @@ const SettlementList: React.FC = () => {
{
title: intl.formatMessage({ id: 'balance.accountsReceivable.invoice.columns.orderAmount' }),
dataIndex: 'orderAmount',
render: (text, record) => `¥ ${priceFormat(text)}`
render: (text, record) => `${intl.formatMessage({ id: 'common.money' })} ${priceFormat(text)}`
},
{
title: '支付批次',
title: intl.formatMessage({ id: 'balance.accountsReceivable.invoice.columns.batch' }),
dataIndex: 'batch',
render: (text, record) => record.batch ? intl.formatMessage({ id: 'balance.accountsReceivable.invoice.columns.batch.1' }, { data: record.batch }) : ''
},
{
title: '支付环节',
title: intl.formatMessage({ id: 'balance.accountsReceivable.invoice.columns.payNode' }),
dataIndex: 'payNode',
},
{
title: intl.formatMessage({ id: 'balance.accountsReceivable.invoice.columns.payAmount' }),
dataIndex: 'payAmount',
render: (text) => `¥ ${priceFormat(text)}`
render: (text) => `${intl.formatMessage({ id: 'common.money' })} ${priceFormat(text)}`
},
{ title: intl.formatMessage({ id: 'balance.accountsReceivable.invoice.columns.payTime' }), dataIndex: 'payTime' },
{
......@@ -345,7 +345,7 @@ const SettlementList: React.FC = () => {
const _handleBatchInvoiceProve = () => {
if (selectedRowKeys.length <= 0) {
message.error('请选择开票记录');
message.error(intl.formatMessage({ id: 'balance.accountsReceivable.invoice.message.1' }));
return false
}
let _flag = true;
......@@ -357,7 +357,7 @@ const SettlementList: React.FC = () => {
}
}
if (!_flag) {
message.error('无法合并开票,请单张开票!');
message.error(intl.formatMessage({ id: 'balance.accountsReceivable.invoice.message.2' }));
return false
}
postSettleAccountsMemberSettlementGenerateBatchInvoiceProve({ receiptInvoiceIds: selectedRowKeys }).then((res) => {
......@@ -390,7 +390,7 @@ const SettlementList: React.FC = () => {
RangePicker,
exportBtn: () => (
<Space>
<Button onClick={_handleBatchInvoiceProve}>批量开票</Button>
<Button onClick={_handleBatchInvoiceProve}>{intl.formatMessage({ id: 'balance.accountsReceivable.invoice.exportBtn.2' })}</Button>
{/* <Button>{intl.formatMessage({ id: 'balance.accountsReceivable.invoice.exportBtn' })}</Button> */}
</Space>
)
......
......@@ -54,7 +54,7 @@ const DetailDrawer: React.FC<DetailDrawerProps> = (props: DetailDrawerProps) =>
title: intl.formatMessage({ id: 'balance.fahuopici' }),
key: 'deliveryBatch',
dataIndex: 'deliveryBatch',
render: (text: any, record: any) => `第${text}批`,
render: (text: any, record: any) => intl.formatMessage({ id: 'balance.businessReconciliation.components.detailDrawer.columns.deliveryBatch.text' }, { data: text }),
}, {
title: intl.formatMessage({ id: 'balance.fahuodanhao' }),
key: 'deliveryNo',
......@@ -136,13 +136,13 @@ const DetailDrawer: React.FC<DetailDrawerProps> = (props: DetailDrawerProps) =>
key: 'taxRate',
dataIndex: 'taxRate',
render: (text) => {
return text > 0 ? `是/${text}%` : '否';
return text > 0 ? `${intl.formatMessage({ id: 'balance.shi' })}/${text}%` : intl.formatMessage({ id: 'balance.fou' });
}
}, {
title: intl.formatMessage({ id: 'balance.danjia' }),
key: 'price',
dataIndex: 'price',
render: (text: any) => `¥ ${priceFormat(text)}`
render: (text: any) => `${intl.formatMessage({ id: 'common.money' })} ${priceFormat(text)}`
}, {
title: intl.formatMessage({ id: 'balance.shouhuoshuliang' }),
key: 'receiveQuantity',
......@@ -151,7 +151,7 @@ const DetailDrawer: React.FC<DetailDrawerProps> = (props: DetailDrawerProps) =>
title: intl.formatMessage({ id: 'balance.yiduizhangjine' }),
key: 'reconciledMoney',
dataIndex: 'reconciledMoney',
render: (text: any) => `¥ ${priceFormat(text)}`
render: (text: any) => `${intl.formatMessage({ id: 'common.money' })} ${priceFormat(text)}`
}, {
title: intl.formatMessage({ id: 'balance.daiduizhangshuliang' }),
key: 'reconciliationQuantity',
......@@ -160,7 +160,7 @@ const DetailDrawer: React.FC<DetailDrawerProps> = (props: DetailDrawerProps) =>
title: intl.formatMessage({ id: 'balance.daiduizhangjine' }),
key: 'reconciliationMoneyAmount',
dataIndex: 'reconciliationMoneyAmount',
render: (text: any) => `¥ ${priceFormat(text)}`
render: (text: any) => `${intl.formatMessage({ id: 'common.money' })} ${priceFormat(text)}`
}];
const handleChildSelectChange = (record, selected, selectedRow, nativeEvent) => {
......@@ -343,18 +343,18 @@ const DetailDrawer: React.FC<DetailDrawerProps> = (props: DetailDrawerProps) =>
const _onOk = () => {
if (selectedRowKeys.length <= 0) {
message.error('请选择需要生成对账单的数据。');
message.error(intl.formatMessage({ id: 'balance.businessReconciliation.components.detailDrawer.message.1' }));
return;
}
for (let item of selectedRows) {
if (item.payer !== selectedRows[0].payer) {
message.error('请选择相同付款方或相同税率的订单');
message.error(intl.formatMessage({ id: 'balance.businessReconciliation.components.detailDrawer.message.2' }));
return;
}
}
for (let child of childSelectedRows) {
if (child.taxRate !== childSelectedRows[0].taxRate) {
message.error('请选择相同付款方或相同税率的订单');
message.error(intl.formatMessage({ id: 'balance.businessReconciliation.components.detailDrawer.message.2' }));
return;
}
}
......
......@@ -23,7 +23,7 @@ const TABLINK = [
{ id: 'billLayout', title: intl.formatMessage({ id: 'balance.duizhangdanmingxi' }) },
{ id: 'fileLayout', title: intl.formatMessage({ id: 'balance.fujian' }), },
{ id: 'invoiceLayout', title: intl.formatMessage({ id: 'balance.fapiaoxinxi' }), },
{ id: 'recordLayout', title: '流转记录' }
{ id: 'recordLayout', title: intl.formatMessage({ id: 'balance.businessReconciliation.detail.recordLayout' }) }
]
const SearchDetail = () => {
......@@ -73,7 +73,7 @@ const SearchDetail = () => {
{ label: intl.formatMessage({ id: 'balance.shoukuanfang' }), extra: data.payee, type: 'text' },
{ label: intl.formatMessage({ id: 'balance.fukuanfang' }), extra: data.payer, type: 'text' },
{ label: intl.formatMessage({ id: 'balance.faqiduizhangfang' }), extra: data.launchReconciliation, type: 'text' },
{ label: intl.formatMessage({ id: 'balance.duizhangzongjine' }), extra: `¥ ${priceFormat(data.reconciliationMoneyAmount)}`, type: 'text' },
{ label: intl.formatMessage({ id: 'balance.duizhangzongjine' }), extra: `${intl.formatMessage({ id: 'common.money' })} ${priceFormat(data.reconciliationMoneyAmount)}`, type: 'text' },
{ label: intl.formatMessage({ id: 'balance.danjushijian' }), extra: data.createTime, type: 'text' },
]
},
......@@ -89,114 +89,114 @@ const SearchDetail = () => {
const columns: ColumnType<any>[] = [
{
title: '订单号',
title: intl.formatMessage({ id: 'balance.businessReconciliation.detail.columns.orderNo' }),
key: 'orderNo',
dataIndex: 'orderNo',
fixed: 'left',
width: 100
},
{
title: '预计结算日期',
title: intl.formatMessage({ id: 'balance.businessReconciliation.detail.columns.expectPayTime' }),
key: 'expectPayTime',
dataIndex: 'expectPayTime',
width: 150
},
{
title: '发货批次',
title: intl.formatMessage({ id: 'balance.businessReconciliation.detail.columns.deliveryBatch' }),
key: 'deliveryBatch',
dataIndex: 'deliveryBatch',
width: 150,
render: (text: any, record: any) => `第${text}批`,
render: (text: any, record: any) => intl.formatMessage({ id: 'balance.businessReconciliation.detail.columns.deliveryBatch.text' }, { data: text }),
},
{
title: '发货单号',
title: intl.formatMessage({ id: 'balance.businessReconciliation.detail.columns.deliveryNo' }),
key: 'deliveryNo',
dataIndex: 'deliveryNo',
width: 150
},
{
title: '收货单号',
title: intl.formatMessage({ id: 'balance.businessReconciliation.detail.columns.receiveNo' }),
key: 'receiveNo',
dataIndex: 'receiveNo',
width: 150
},
{
title: '物料编码',
title: intl.formatMessage({ id: 'balance.businessReconciliation.detail.columns.productNo' }),
key: 'productNo',
dataIndex: 'productNo',
width: 150
},
{
title: '物料名称',
title: intl.formatMessage({ id: 'balance.businessReconciliation.detail.columns.productName' }),
key: 'productName',
dataIndex: 'productName',
width: 150
},
{
title: '规格型号',
title: intl.formatMessage({ id: 'balance.businessReconciliation.detail.columns.spec' }),
key: 'spec',
dataIndex: 'spec',
width: 150
},
{
title: '品类',
title: intl.formatMessage({ id: 'balance.businessReconciliation.detail.columns.category' }),
key: 'category',
dataIndex: 'category',
width: 150
},
{
title: '品牌',
title: intl.formatMessage({ id: 'balance.businessReconciliation.detail.columns.brand' }),
key: 'brand',
dataIndex: 'brand',
width: 150
},
{
title: '单位',
title: intl.formatMessage({ id: 'balance.businessReconciliation.detail.columns.unit' }),
key: 'unit',
dataIndex: 'unit',
width: 150
},
{
title: '含税/税率',
title: intl.formatMessage({ id: 'balance.businessReconciliation.detail.columns.taxRate' }),
key: 'taxRate',
dataIndex: 'taxRate',
width: 150,
render: (text: any) => {
return text > 0 ? `是/${text}%` : '否';
return text > 0 ? `${intl.formatMessage({ id: 'balance.shi' })}/${text}%` : intl.formatMessage({ id: 'balance.fou' });
}
},
{
title: '单价(含税)',
title: intl.formatMessage({ id: 'balance.businessReconciliation.detail.columns.price' }),
key: 'price',
dataIndex: 'price',
width: 150,
render: (text: any) => `¥ ${priceFormat(text)}`
render: (text: any) => `${intl.formatMessage({ id: 'common.money' })} ${priceFormat(text)}`
},
{
title: '待对账数量',
title: intl.formatMessage({ id: 'balance.businessReconciliation.detail.columns.reconciliationQuantity' }),
key: 'reconciliationQuantity',
dataIndex: 'reconciliationQuantity',
width: 150
},
{
title: '待对账金额(含税)',
title: intl.formatMessage({ id: 'balance.businessReconciliation.detail.columns.reconciliationMoneyAmount' }),
key: 'reconciliationMoneyAmount',
dataIndex: 'reconciliationMoneyAmount',
width: 150,
render: (text: any) => `¥ ${priceFormat(text)}`
render: (text: any) => `${intl.formatMessage({ id: 'common.money' })} ${priceFormat(text)}`
},
{
title: '本次对账数量',
title: intl.formatMessage({ id: 'balance.businessReconciliation.detail.columns.currentReconciliationQuantity' }),
key: 'currentReconciliationQuantity',
dataIndex: 'currentReconciliationQuantity',
width: 150
},
{
title: '本次对账金额(含税)',
title: intl.formatMessage({ id: 'balance.businessReconciliation.detail.columns.currentMoney' }),
key: 'currentMoney',
dataIndex: 'currentMoney',
width: 150,
render: (text: any) => `¥ ${priceFormat(text)}`
render: (text: any) => `${intl.formatMessage({ id: 'common.money' })} ${priceFormat(text)}`
},
];
......@@ -215,7 +215,7 @@ const SearchDetail = () => {
tabLink={_tabs}
components={
<Fragment>
<ProgressLayout effect={[{ title: '外部流转', state: 1, logs: dataSource?.externalLogStates }]} />
<ProgressLayout effect={[{ title: intl.formatMessage({ id: 'balance.businessReconciliation.detail.progressLayout.title' }), state: 1, logs: dataSource?.externalLogStates }]} />
<CommonLayout layoutId="basicLayout" title={intl.formatMessage({ id: 'balance.jibenxinxi' })} effect={basicEffect} commonSpan={12} />
<Card id='billLayout' title={intl.formatMessage({ id: 'balance.duizhangdanmingxi' })}>
<StandardTable
......
......@@ -62,9 +62,9 @@ const Add = () => {
const _title = useMemo(() => {
switch (path) {
case 'add': return '新增对账单';
case 'edit': return '编辑对账单';
case 'preview': return '查看对账单';
case 'add': return intl.formatMessage({ id: 'balance.businessReconciliation.readyAdd.add.title.1' });
case 'edit': return intl.formatMessage({ id: 'balance.businessReconciliation.readyAdd.add.title.2' });
case 'preview': return intl.formatMessage({ id: 'balance.businessReconciliation.readyAdd.add.title.3' });
}
}, [path])
......@@ -80,13 +80,13 @@ const Add = () => {
const basicFormCol = [
{
label: intl.formatMessage({ id: 'balance.danjuzhaiyao' }), name: 'reconciliationAbstract', placeholder: '请输入对账单摘要', rules: [{ required: true, message: '请输入对账单摘要' }, {
label: intl.formatMessage({ id: 'balance.danjuzhaiyao' }), name: 'reconciliationAbstract', placeholder: intl.formatMessage({ id: 'balance.businessReconciliation.readyAdd.add.basicFormCol.reconciliationAbstract.placeholder' }), rules: [{ required: true, message: intl.formatMessage({ id: 'balance.businessReconciliation.readyAdd.add.basicFormCol.reconciliationAbstract.placeholder' }) }, {
validator: (_, value, callback) => {
try {
let _str = value;
_str = _str.replace(/[\u4E00-\u9FA5]/g, "AA");
if (_str.length > 30 * 2) {
callback('最长60个字符,30个汉字')
callback(intl.formatMessage({ id: 'balance.businessReconciliation.readyAdd.add.basicFormCol.reconciliationAbstract.validator' }))
// return Promise.reject(new Error(`最长60个字符,30个汉字`))
}
callback();
......@@ -97,14 +97,14 @@ const Add = () => {
}]
},
{
label: intl.formatMessage({ id: 'balance.beizhu' }), name: 'remark', placeholder: '请输入对备注', rules: [
label: intl.formatMessage({ id: 'balance.beizhu' }), name: 'remark', placeholder: intl.formatMessage({ id: 'balance.businessReconciliation.readyAdd.add.basicFormCol.remark.placeholder' }), rules: [
{
validator: (_, value, callback) => {
try {
let _str = value;
_str = _str.replace(/[\u4E00-\u9FA5]/g, "AA");
if (value.length > 60 * 2) {
callback('最长120个字符')
callback(intl.formatMessage({ id: 'balance.businessReconciliation.readyAdd.add.basicFormCol.remark.validator' }))
// return Promise.reject(new Error(`最长120个字符`))
}
callback();
......@@ -225,7 +225,7 @@ const Add = () => {
key: 'deliveryBatch',
dataIndex: 'deliveryBatch',
width: 100,
render: (text: any, record: any) => `第${text}批`,
render: (text: any, record: any) => intl.formatMessage({ id: 'balance.businessReconciliation.readyAdd.add.columns.deliveryBatch.text' }, { data: text }),
}, {
title: intl.formatMessage({ id: 'balance.fahuodanhao' }),
key: 'deliveryNo',
......@@ -267,14 +267,14 @@ const Add = () => {
dataIndex: 'taxRate',
width: 100,
render: (text: any) => {
return text > 0 ? `是/${text}%` : '否';
return text > 0 ? `${intl.formatMessage({ id: 'balance.shi' })}/${text}%` : intl.formatMessage({ id: 'balance.fou' });
}
}, {
title: intl.formatMessage({ id: 'balance.danjia' }),
key: 'price',
dataIndex: 'price',
width: 100,
render: (text: any) => `¥ ${priceFormat(text)}`
render: (text: any) => `${intl.formatMessage({ id: 'common.money' })} ${priceFormat(text)}`
}, {
title: intl.formatMessage({ id: 'balance.daiduizhangshuliang' }),
key: 'reconciliationQuantity',
......@@ -295,10 +295,10 @@ const Add = () => {
{
validator: (_, value) => {
if (!reg.test(value)) {
return Promise.reject(new Error('数量需要大于0'))
return Promise.reject(new Error(intl.formatMessage({ id: 'balance.businessReconciliation.readyAdd.add.columns.currentReconciliationQuantity.validator.1' })))
}
if (value > record.reconciliationQuantity) {
return Promise.reject(new Error('不能大于待对账数量'))
return Promise.reject(new Error(intl.formatMessage({ id: 'balance.businessReconciliation.readyAdd.add.columns.currentReconciliationQuantity.validator.2' })))
}
return Promise.resolve()
}
......@@ -314,7 +314,7 @@ const Add = () => {
key: 'currentMoney',
dataIndex: 'currentMoney',
width: 150,
render: (text: any) => `¥ ${priceFormat(text)}`
render: (text: any) => `${intl.formatMessage({ id: 'common.money' })} ${priceFormat(text)}`
}];
const columnsEdit = columns.concat([{
......@@ -347,7 +347,7 @@ const Add = () => {
const _handleSave = () => {
form.validateFields().then(formRes => {
if (tabelSource.length <= 0) {
message.error('请添加对账明细');
message.error(intl.formatMessage({ id: 'balance.businessReconciliation.readyAdd.add.message' }));
return;
}
const _flag = path === 'add';
......@@ -427,7 +427,7 @@ const Add = () => {
<Form.Item
{...item}
>
{item.name === 'reconciliationMoneyAmount' ? `¥ ${priceFormat(dataSource[item.name])}` : dataSource[item.name]}
{item.name === 'reconciliationMoneyAmount' ? `${intl.formatMessage({ id: 'common.money' })} ${priceFormat(dataSource[item.name])}` : dataSource[item.name]}
</Form.Item>
</Col>
))}
......
......@@ -64,7 +64,7 @@ const ReadyAdd: React.FC = () => {
title: intl.formatMessage({ id: 'balance.duizhangzongjinehanshui' }),
key: 'reconciliationMoneyAmount',
dataIndex: 'reconciliationMoneyAmount',
render: (text: any) => `¥${priceFormat(text)}`,
render: (text: any) => `${intl.formatMessage({ id: 'common.money' })}${priceFormat(text)}`,
}, {
title: intl.formatMessage({ id: 'balance.danjushijian' }),
key: 'createTime',
......@@ -90,7 +90,7 @@ const ReadyAdd: React.FC = () => {
<Dropdown overlay={() => (
<Menu onClick={(e) => handleMenuClick(e, record)}>
<Menu.Item key="1">{intl.formatMessage({ id: 'balance.bianji' })}</Menu.Item>
{record.status === 1 && <Popconfirm title={'确认要删除吗?'} okText={intl.formatMessage({ id: 'balance.shi' })} cancelText={intl.formatMessage({ id: 'balance.fou' })} onConfirm={() => fetchDelete(record.reconciliationId)}>
{record.status === 1 && <Popconfirm title={intl.formatMessage({ id: 'balance.querenyaoshanchuma' })} okText={intl.formatMessage({ id: 'balance.shi' })} cancelText={intl.formatMessage({ id: 'balance.fou' })} onConfirm={() => fetchDelete(record.reconciliationId)}>
<Menu.Item key="2">{intl.formatMessage({ id: 'balance.shanchu' })}</Menu.Item>
</Popconfirm>}
</Menu>
......
......@@ -54,7 +54,7 @@ const ReadyReconciliation: React.FC = () => {
title: intl.formatMessage({ id: 'balance.fahuopici' }),
key: 'deliveryBatch',
dataIndex: 'deliveryBatch',
render: (text: any, record: any) => `第${text}批`,
render: (text: any, record: any) => intl.formatMessage({ id: 'balance.businessReconciliation.readyReconciliation.columns.deliveryBatch.text' }, { data: text }),
}, {
title: intl.formatMessage({ id: 'balance.fahuodanhao' }),
key: 'deliveryNo',
......@@ -136,26 +136,26 @@ const ReadyReconciliation: React.FC = () => {
key: 'taxRate',
dataIndex: 'taxRate',
render: (text) => {
return text > 0 ? `是/${text}%` : '否';
return text > 0 ? `${intl.formatMessage({ id: 'balance.shi' })}/${text}%` : intl.formatMessage({ id: 'balance.fou' });
}
}, {
title: intl.formatMessage({ id: 'balance.danjia' }),
key: 'price',
dataIndex: 'price',
render: (text: any) => `¥ ${priceFormat(text)}`
render: (text: any) => `${intl.formatMessage({ id: 'common.money' })} ${priceFormat(text)}`
}, {
title: intl.formatMessage({ id: 'balance.shouhuoshuliang' }),
key: 'receiveQuantity',
dataIndex: 'receiveQuantity',
}, {
title: '已对账数量',
title: intl.formatMessage({ id: 'balance.businessReconciliation.readyReconciliation.columns.reconciledQuantity' }),
key: 'reconciledQuantity',
dataIndex: 'reconciledQuantity',
}, {
title: intl.formatMessage({ id: 'balance.yiduizhangjine' }),
key: 'reconciledMoney',
dataIndex: 'reconciledMoney',
render: (text: any) => `¥ ${priceFormat(text)}`
render: (text: any) => `${intl.formatMessage({ id: 'common.money' })} ${priceFormat(text)}`
}, {
title: intl.formatMessage({ id: 'balance.daiduizhangshuliang' }),
key: 'reconciliationQuantity',
......@@ -164,7 +164,7 @@ const ReadyReconciliation: React.FC = () => {
title: intl.formatMessage({ id: 'balance.daiduizhangjine' }),
key: 'reconciliationMoneyAmount',
dataIndex: 'reconciliationMoneyAmount',
render: (text: any) => `¥ ${priceFormat(text)}`
render: (text: any) => `${intl.formatMessage({ id: 'common.money' })} ${priceFormat(text)}`
}];
const handleChildSelectChange = (record, selected, selectedRow, nativeEvent) => {
......@@ -347,18 +347,18 @@ const ReadyReconciliation: React.FC = () => {
const _generate = () => {
if (selectedRowKeys.length <= 0) {
message.error('请选择需要生成对账单的数据。');
message.error(intl.formatMessage({ id: 'balance.businessReconciliation.readyReconciliation.message.1' }));
return;
}
for (let item of selectedRows) {
if (item.payer !== selectedRows[0].payer) {
message.error('请选择相同付款方或相同税率的订单');
message.error(intl.formatMessage({ id: 'balance.businessReconciliation.readyReconciliation.message.2' }));
return;
}
}
for (let child of childSelectedRows) {
if (child.taxRate !== childSelectedRows[0].taxRate) {
message.error('请选择相同付款方或相同税率的订单');
message.error(intl.formatMessage({ id: 'balance.businessReconciliation.readyReconciliation.message.2' }));
return;
}
}
......
......@@ -66,7 +66,7 @@ const Search: React.FC = () => {
title: intl.formatMessage({ id: 'balance.duizhangzongjinehanshui' }),
key: 'reconciliationMoneyAmount',
dataIndex: 'reconciliationMoneyAmount',
render: (text: any) => `¥${priceFormat(text)}`,
render: (text: any) => `${intl.formatMessage({ id: 'common.money' })}${priceFormat(text)}`,
}, {
title: intl.formatMessage({ id: 'balance.danjushijian' }),
key: 'createTime',
......
......@@ -138,7 +138,7 @@ const ModalOperate: React.FC<IProps> = (props: any) => {
let _str = value;
_str = _str.replace(/[\u4E00-\u9FA5]/g, "AA");
if (_str.length > maxNumber * 2) {
return { type: 'error', message: `最长${maxNumber * 2}个字符,${maxNumber}个汉字` };
return { type: 'error', message: intl.formatMessage({ id: 'balance.businessReconciliationCollaboration.components.modalOperate.validator' }, { maxNumber2: maxNumber * 2, maxNumber: maxNumber }) };
} else {
return null;
}
......
......@@ -27,7 +27,7 @@ const TABLINK = [
{ id: 'billLayout', title: intl.formatMessage({ id: 'balance.duizhangdanmingxi' }) },
{ id: 'fileLayout', title: intl.formatMessage({ id: 'balance.fujian' }), },
{ id: 'invoiceLayout', title: intl.formatMessage({ id: 'balance.fapiaoxinxi' }), },
{ id: 'recordLayout', title: '流转记录' }
{ id: 'recordLayout', title: intl.formatMessage({ id: 'balance.businessReconciliationCollaboration.detail.recordLayout' }) }
]
const SearchDetail = () => {
......@@ -82,7 +82,7 @@ const SearchDetail = () => {
{ label: intl.formatMessage({ id: 'balance.shoukuanfang' }), extra: data.payee, type: 'text' },
{ label: intl.formatMessage({ id: 'balance.fukuanfang' }), extra: data.payer, type: 'text' },
{ label: intl.formatMessage({ id: 'balance.faqiduizhangfang' }), extra: data.launchReconciliation, type: 'text' },
{ label: intl.formatMessage({ id: 'balance.duizhangzongjine' }), extra: `¥ ${priceFormat(data.reconciliationMoneyAmount)}`, type: 'text' },
{ label: intl.formatMessage({ id: 'balance.duizhangzongjine' }), extra: `${intl.formatMessage({ id: 'common.money' })} ${priceFormat(data.reconciliationMoneyAmount)}`, type: 'text' },
{ label: intl.formatMessage({ id: 'balance.danjushijian' }), extra: data.createTime, type: 'text' },
]
},
......@@ -98,114 +98,114 @@ const SearchDetail = () => {
const columns: ColumnType<any>[] = [
{
title: '订单号',
title: intl.formatMessage({ id: 'balance.businessReconciliationCollaboration.detail.columns.orderNo' }),
key: 'orderNo',
dataIndex: 'orderNo',
fixed: 'left',
width: 100
},
{
title: '预计结算日期',
title: intl.formatMessage({ id: 'balance.businessReconciliationCollaboration.detail.columns.expectPayTime' }),
key: 'expectPayTime',
dataIndex: 'expectPayTime',
width: 150
},
{
title: '发货批次',
title: intl.formatMessage({ id: 'balance.businessReconciliationCollaboration.detail.columns.deliveryBatch' }),
key: 'deliveryBatch',
dataIndex: 'deliveryBatch',
width: 150,
render: (text: any, record: any) => `第${text}批`,
render: (text: any, record: any) => intl.formatMessage({ id: 'balance.businessReconciliationCollaboration.detail.columns.deliveryBatch.text' }, { data: text }),
},
{
title: '发货单号',
title: intl.formatMessage({ id: 'balance.businessReconciliationCollaboration.detail.columns.deliveryNo' }),
key: 'deliveryNo',
dataIndex: 'deliveryNo',
width: 150
},
{
title: '收货单号',
title: intl.formatMessage({ id: 'balance.businessReconciliationCollaboration.detail.columns.receiveNo' }),
key: 'receiveNo',
dataIndex: 'receiveNo',
width: 150
},
{
title: '物料编码',
title: intl.formatMessage({ id: 'balance.businessReconciliationCollaboration.detail.columns.productNo' }),
key: 'productNo',
dataIndex: 'productNo',
width: 150
},
{
title: '物料名称',
title: intl.formatMessage({ id: 'balance.businessReconciliationCollaboration.detail.columns.productName' }),
key: 'productName',
dataIndex: 'productName',
width: 150
},
{
title: '规格型号',
title: intl.formatMessage({ id: 'balance.businessReconciliationCollaboration.detail.columns.spec' }),
key: 'spec',
dataIndex: 'spec',
width: 150
},
{
title: '品类',
title: intl.formatMessage({ id: 'balance.businessReconciliationCollaboration.detail.columns.category' }),
key: 'category',
dataIndex: 'category',
width: 150
},
{
title: '品牌',
title: intl.formatMessage({ id: 'balance.businessReconciliationCollaboration.detail.columns.brand' }),
key: 'brand',
dataIndex: 'brand',
width: 150
},
{
title: '单位',
title: intl.formatMessage({ id: 'balance.businessReconciliationCollaboration.detail.columns.unit' }),
key: 'unit',
dataIndex: 'unit',
width: 150
},
{
title: '含税/税率',
title: intl.formatMessage({ id: 'balance.businessReconciliationCollaboration.detail.columns.taxRate' }),
key: 'taxRate',
dataIndex: 'taxRate',
width: 150,
render: (text: any) => {
return text > 0 ? `是/${text}%` : '否';
return text > 0 ? `${intl.formatMessage({ id: 'balance.shi' })}/${text}%` : intl.formatMessage({ id: 'balance.fou' });
}
},
{
title: '单价(含税)',
title: intl.formatMessage({ id: 'balance.businessReconciliationCollaboration.detail.columns.price' }),
key: 'price',
dataIndex: 'price',
width: 150,
render: (text: any) => `¥ ${priceFormat(text)}`
render: (text: any) => `${intl.formatMessage({ id: 'common.money' })} ${priceFormat(text)}`
},
{
title: '待对账数量',
title: intl.formatMessage({ id: 'balance.businessReconciliationCollaboration.detail.columns.reconciliationQuantity' }),
key: 'reconciliationQuantity',
dataIndex: 'reconciliationQuantity',
width: 150
},
{
title: '待对账金额(含税)',
title: intl.formatMessage({ id: 'balance.businessReconciliationCollaboration.detail.columns.reconciliationMoneyAmount' }),
key: 'reconciliationMoneyAmount',
dataIndex: 'reconciliationMoneyAmount',
width: 150,
render: (text: any) => `¥ ${priceFormat(text)}`
render: (text: any) => `${intl.formatMessage({ id: 'common.money' })} ${priceFormat(text)}`
},
{
title: '本次对账数量',
title: intl.formatMessage({ id: 'balance.businessReconciliationCollaboration.detail.columns.currentReconciliationQuantity' }),
key: 'currentReconciliationQuantity',
dataIndex: 'currentReconciliationQuantity',
width: 150
},
{
title: '本次对账金额(含税)',
title: intl.formatMessage({ id: 'balance.businessReconciliationCollaboration.detail.columns.currentMoney' }),
key: 'currentMoney',
dataIndex: 'currentMoney',
width: 150,
render: (text: any) => `¥ ${priceFormat(text)}`
render: (text: any) => `${intl.formatMessage({ id: 'common.money' })} ${priceFormat(text)}`
},
];
......@@ -237,7 +237,7 @@ const SearchDetail = () => {
const _returnTopButton = () => {
switch (pathPci) {
case 'readyConfirm':
return <Button type='primary' icon={<CheckCircleOutlined />} onClick={() => { setModalVisible(true) }}>确认对账单</Button>
return <Button type='primary' icon={<CheckCircleOutlined />} onClick={() => { setModalVisible(true) }}>{intl.formatMessage({ id: 'balance.businessReconciliationCollaboration.detail.readyConfirm' })}</Button>
case 'readyPay':
return (
<Popconfirm title={intl.formatMessage({ id: 'balance.quedingyaotijiaoma' })} okText={intl.formatMessage({ id: 'balance.shi' })} cancelText={intl.formatMessage({ id: 'balance.fou' })} onConfirm={_handleSubmit}>
......@@ -261,7 +261,7 @@ const SearchDetail = () => {
tabLink={_tabs}
components={
<Fragment>
<ProgressLayout effect={[{ title: '外部流转', state: 1, logs: dataSource?.externalLogStates }]} />
<ProgressLayout effect={[{ title: intl.formatMessage({ id: 'balance.businessReconciliationCollaboration.detail.progressLayout.title' }), state: 1, logs: dataSource?.externalLogStates }]} />
<CommonLayout layoutId="basicLayout" title={intl.formatMessage({ id: 'balance.jibenxinxi' })} effect={basicEffect} commonSpan={12} />
<Card id='billLayout' title={intl.formatMessage({ id: 'balance.duizhangdanmingxi' })}>
<StandardTable
......@@ -288,7 +288,7 @@ const SearchDetail = () => {
</Fragment>
}
/>
<ModalOperate title='对账单确认' visible={modalVisible} id={id} fetch={postSettleAccountsBusinessReconciliationTeamworkConfirmReconciliation} onOk={_modalOk} onCancel={_modalCancle} />
<ModalOperate title={intl.formatMessage({ id: 'balance.businessReconciliationCollaboration.detail.modalOperate.title' })} visible={modalVisible} id={id} fetch={postSettleAccountsBusinessReconciliationTeamworkConfirmReconciliation} onOk={_modalOk} onCancel={_modalCancle} />
</>
)
}
......
......@@ -62,7 +62,7 @@ const ReadyConfirm: React.FC = () => {
title: intl.formatMessage({ id: 'balance.duizhangzongjinehanshui' }),
key: 'reconciliationMoneyAmount',
dataIndex: 'reconciliationMoneyAmount',
render: (text: any) => `¥${priceFormat(text)}`,
render: (text: any) => `${intl.formatMessage({ id: 'common.money' })}${priceFormat(text)}`,
}, {
title: intl.formatMessage({ id: 'balance.danjushijian' }),
key: 'createTime',
......
......@@ -62,7 +62,7 @@ const ReadyPay: React.FC = () => {
title: intl.formatMessage({ id: 'balance.duizhangzongjinehanshui' }),
key: 'reconciliationMoneyAmount',
dataIndex: 'reconciliationMoneyAmount',
render: (text: any, record: any) => `¥${priceFormat(text)}`,
render: (text: any, record: any) => `${intl.formatMessage({ id: 'common.money' })}${priceFormat(text)}`,
}, {
title: intl.formatMessage({ id: 'balance.danjushijian' }),
key: 'createTime',
......
......@@ -67,7 +67,7 @@ const Search: React.FC = () => {
title: intl.formatMessage({ id: 'balance.duizhangzongjinehanshui' }),
key: 'reconciliationMoneyAmount',
dataIndex: 'reconciliationMoneyAmount',
render: (text: any) => `¥${priceFormat(text)}`,
render: (text: any) => `${intl.formatMessage({ id: 'common.money' })}${priceFormat(text)}`,
}, {
title: intl.formatMessage({ id: 'balance.danjushijian' }),
key: 'createTime',
......
......@@ -59,7 +59,7 @@ const Admin: React.FC = () => {
dataIndex: 'applyTypeName',
width: 150,
}, {
title: '收款方',
title: intl.formatMessage({ id: 'balance.shoukuanfang' }),
key: 'payee',
dataIndex: 'payee',
width: 150,
......@@ -67,7 +67,7 @@ const Admin: React.FC = () => {
title: intl.formatMessage({ id: 'balance.qingkuanjine' }),
key: 'applyAmount',
dataIndex: 'applyAmount',
render: (text: any, record: any) => `¥${priceFormat(text)}`,
render: (text: any, record: any) => `${intl.formatMessage({ id: 'common.money' })}${priceFormat(text)}`,
width: 150
}, {
title: intl.formatMessage({ id: 'balance.yujifukuanriqi' }),
......@@ -102,7 +102,7 @@ const Admin: React.FC = () => {
<Menu onClick={(e) => handleMenuClick(e, record)}>
<Menu.Item key="1">{intl.formatMessage({ id: 'balance.bianji' })}</Menu.Item>
{record.hasSubmit && (
<Popconfirm title={'确认要删除吗?'} okText={intl.formatMessage({ id: 'balance.shi' })} cancelText={intl.formatMessage({ id: 'balance.fou' })} onConfirm={() => fetchDelete(record.id)}>
<Popconfirm title={intl.formatMessage({ id: 'balance.querenyaoshanchuma' })} okText={intl.formatMessage({ id: 'balance.shi' })} cancelText={intl.formatMessage({ id: 'balance.fou' })} onConfirm={() => fetchDelete(record.id)}>
<Menu.Item key="2">{intl.formatMessage({ id: 'balance.shanchu' })}</Menu.Item>
</Popconfirm>
)}
......@@ -211,7 +211,7 @@ const Admin: React.FC = () => {
"payee": {
type: 'string',
"x-component-props": {
placeholder: '请输入收款方',
placeholder: intl.formatMessage({ id: 'balance.businessRequestFunds.admin.schema.payee' }),
allowClear: true,
}
},
......@@ -245,7 +245,7 @@ const Admin: React.FC = () => {
Submit,
controllerBtns: () => (
<Space>
<Button type='primary' size='middle' icon={<PlusOutlined />} onClick={handleAdd}>新增</Button>
<Button type='primary' size='middle' icon={<PlusOutlined />} onClick={handleAdd}>{intl.formatMessage({ id: 'balance.businessRequestFunds.admin.handleAdd' })}</Button>
</Space>
),
}}
......
......@@ -35,39 +35,39 @@ const ContractDrawer: React.FC<ContractDrawerProps> = (props: ContractDrawerProp
}
const columns: ColumnType<any>[] = [{
title: '合同编号',
title: intl.formatMessage({ id: 'balance.businessRequestFunds.components.contractDrawer.columns.billNo' }),
key: 'billNo',
dataIndex: 'billNo',
}, {
title: '合同摘要',
title: intl.formatMessage({ id: 'balance.businessRequestFunds.components.contractDrawer.columns.billAbstract' }),
key: 'billAbstract',
dataIndex: 'billAbstract',
}, {
title: '合同生效时间',
title: intl.formatMessage({ id: 'balance.businessRequestFunds.components.contractDrawer.columns.billTime' }),
key: 'billTime',
dataIndex: 'billTime',
}, {
title: '合同失效时间',
title: intl.formatMessage({ id: 'balance.businessRequestFunds.components.contractDrawer.columns.billEndTime' }),
key: 'billEndTime',
dataIndex: 'billEndTime',
}, {
title: '含税/税率',
title: intl.formatMessage({ id: 'balance.businessRequestFunds.components.contractDrawer.columns.taxRate' }),
key: 'taxRate',
dataIndex: 'taxRate',
width: 150,
render: (text: any) => {
return text > 0 ? `是/${text}%` : '否';
return text > 0 ? `${intl.formatMessage({ id: 'balance.shi' })}/${text}%` : intl.formatMessage({ id: 'balance.fou' });
}
}, {
title: '合同金额',
title: intl.formatMessage({ id: 'balance.businessRequestFunds.components.contractDrawer.columns.billAmount' }),
key: 'billAmount',
dataIndex: 'billAmount',
render: (text: any) => `¥ ${priceFormat(text)}`
render: (text: any) => `${intl.formatMessage({ id: 'common.money' })} ${priceFormat(text)}`
}, {
title: '合同剩余金额',
title: intl.formatMessage({ id: 'balance.businessRequestFunds.components.contractDrawer.columns.remainAmount' }),
key: 'remainAmount',
dataIndex: 'remainAmount',
render: (text: any) => `¥ ${priceFormat(text)}`
render: (text: any) => `${intl.formatMessage({ id: 'common.money' })} ${priceFormat(text)}`
}];
const handleSelectChange = (record, selected, selectedRow, nativeEvent) => {
......@@ -116,7 +116,7 @@ const ContractDrawer: React.FC<ContractDrawerProps> = (props: ContractDrawerProp
const _onOk = () => {
const _rows = [...selectedRows]
if(_rows.length <= 0){
message.error('请至少选择一条记录');
message.error(intl.formatMessage({ id: 'balance.businessRequestFunds.components.contractDrawer.message' }));
return;
}
setSelectedRows([])
......@@ -132,7 +132,7 @@ const ContractDrawer: React.FC<ContractDrawerProps> = (props: ContractDrawerProp
return (
<Drawer
title={'选择采购合同'}
title={intl.formatMessage({ id: 'balance.businessRequestFunds.components.contractDrawer.title' })}
placement={'right'}
onClose={onClose}
visible={visible}
......@@ -144,7 +144,7 @@ const ContractDrawer: React.FC<ContractDrawerProps> = (props: ContractDrawerProp
{intl.formatMessage({ id: 'balance.quxiao' })}
</Button>
<Button onClick={_onOk} type="primary">
{'确定'}
{intl.formatMessage({ id: 'balance.businessRequestFunds.components.contractDrawer.ok' })}
</Button>
</div>
}
......@@ -191,7 +191,7 @@ const ContractDrawer: React.FC<ContractDrawerProps> = (props: ContractDrawerProp
type: 'string',
"x-component": 'Search',
'x-component-props': {
placeholder: '请输入合同编号',
placeholder: intl.formatMessage({ id: 'balance.businessRequestFunds.components.contractDrawer.schema.contractNo' }),
align: 'flex-start',
allowClear: true,
},
......@@ -214,7 +214,7 @@ const ContractDrawer: React.FC<ContractDrawerProps> = (props: ContractDrawerProp
"contractAbstract": {
type: 'string',
'x-component-props': {
placeholder: '请输入合同摘要',
placeholder: intl.formatMessage({ id: 'balance.businessRequestFunds.components.contractDrawer.schema.contractAbstract' }),
allowClear: true,
}
},
......@@ -222,7 +222,7 @@ const ContractDrawer: React.FC<ContractDrawerProps> = (props: ContractDrawerProp
type: 'string',
"x-component": "daterange",
"x-component-props": {
placeholder: ['合同开始时间', '合同结束时间'],
placeholder: [intl.formatMessage({ id: 'balance.businessRequestFunds.components.contractDrawer.schema.startTime' }), intl.formatMessage({ id: 'balance.businessRequestFunds.components.contractDrawer.schema.endTime' })],
allowClear: true,
}
},
......
......@@ -30,23 +30,23 @@ const MemberDrawer: React.FC<MemberDrawerProps> = (props: MemberDrawerProps) =>
}
const columns: ColumnType<any>[] = [{
title: '会员Id',
title: intl.formatMessage({ id: 'balance.businessRequestFunds.components.memberDrawer.columns.memberId' }),
key: 'memberId',
dataIndex: 'memberId',
}, {
title: '会员名称',
title: intl.formatMessage({ id: 'balance.businessRequestFunds.components.memberDrawer.columns.name' }),
key: 'name',
dataIndex: 'name',
}, {
title: '会员类型',
title: intl.formatMessage({ id: 'balance.businessRequestFunds.components.memberDrawer.columns.memberTypeName' }),
key: 'memberTypeName',
dataIndex: 'memberTypeName',
}, {
title: '会员角色',
title: intl.formatMessage({ id: 'balance.businessRequestFunds.components.memberDrawer.columns.roleName' }),
key: 'roleName',
dataIndex: 'roleName',
}, {
title: '会员等级',
title: intl.formatMessage({ id: 'balance.businessRequestFunds.components.memberDrawer.columns.levelTag' }),
key: 'levelTag',
dataIndex: 'levelTag',
}];
......@@ -58,7 +58,7 @@ const MemberDrawer: React.FC<MemberDrawerProps> = (props: MemberDrawerProps) =>
const _onOk = () => {
if (!selectedRow?.memberId) {
message.error('请选择一条记录');
message.error(intl.formatMessage({ id: 'balance.businessRequestFunds.components.memberDrawer.message' }));
return;
}
onOk?.(selectedRow);
......@@ -67,7 +67,7 @@ const MemberDrawer: React.FC<MemberDrawerProps> = (props: MemberDrawerProps) =>
return (
<Drawer
title={'选择会员'}
title={intl.formatMessage({ id: 'balance.businessRequestFunds.components.memberDrawer.title' })}
placement={'right'}
onClose={onClose}
visible={visible}
......@@ -79,7 +79,7 @@ const MemberDrawer: React.FC<MemberDrawerProps> = (props: MemberDrawerProps) =>
{intl.formatMessage({ id: 'balance.quxiao' })}
</Button>
<Button onClick={_onOk} type="primary">
{'确定'}
{intl.formatMessage({ id: 'balance.businessRequestFunds.components.memberDrawer.ok' })}
</Button>
</div>
}
......@@ -113,7 +113,7 @@ const MemberDrawer: React.FC<MemberDrawerProps> = (props: MemberDrawerProps) =>
type: 'string',
"x-component": 'Search',
'x-component-props': {
placeholder: '请输入会员名称',
placeholder: intl.formatMessage({ id: 'balance.businessRequestFunds.components.memberDrawer.schema.name' }),
advanced: false,
align: 'flex-start',
allowClear: true,
......
......@@ -36,53 +36,53 @@ const RequestFundsDrawer: React.FC<RequestFundsDrawerProps> = (props: RequestFun
}
const columns: ColumnType<any>[] = [{
title: '单据号',
title: intl.formatMessage({ id: 'balance.businessRequestFunds.components.requestFundsDrawer.columns.billNo' }),
key: 'billNo',
dataIndex: 'billNo',
}, {
title: '单据摘要',
title: intl.formatMessage({ id: 'balance.businessRequestFunds.components.requestFundsDrawer.columns.billAbstract' }),
key: 'billAbstract',
dataIndex: 'billAbstract',
}, {
title: '单据类型',
title: intl.formatMessage({ id: 'balance.businessRequestFunds.components.requestFundsDrawer.columns.billTypeName' }),
key: 'billTypeName',
dataIndex: 'billTypeName',
}, {
title: '单据时间',
title: intl.formatMessage({ id: 'balance.businessRequestFunds.components.requestFundsDrawer.columns.billTime' }),
key: 'billTime',
dataIndex: 'billTime',
}, {
title: '单据状态',
title: intl.formatMessage({ id: 'balance.businessRequestFunds.components.requestFundsDrawer.columns.billStatus' }),
key: 'billStatus',
dataIndex: 'billStatus',
}, {
title: '单据金额',
title: intl.formatMessage({ id: 'balance.businessRequestFunds.components.requestFundsDrawer.columns.billAmount' }),
key: 'billAmount',
dataIndex: 'billAmount',
render: (text: any) => `¥ ${priceFormat(text)}`
render: (text: any) => `${intl.formatMessage({ id: 'common.money' })} ${priceFormat(text)}`
}, {
title: '已付款',
title: intl.formatMessage({ id: 'balance.businessRequestFunds.components.requestFundsDrawer.columns.paid' }),
key: 'paid',
dataIndex: 'paid',
render: (text: any) => `¥ ${priceFormat(text)}`
render: (text: any) => `${intl.formatMessage({ id: 'common.money' })} ${priceFormat(text)}`
}, {
title: '含税/税率',
title: intl.formatMessage({ id: 'balance.businessRequestFunds.components.requestFundsDrawer.columns.taxRate' }),
key: 'taxRate',
dataIndex: 'taxRate',
width: 150,
render: (text: any) => {
return text > 0 ? `是/${text}%` : '否';
return text > 0 ? `${intl.formatMessage({ id: 'balance.shi' })}/${text}%` : intl.formatMessage({ id: 'balance.shi' });
}
}, {
title: '已请款待付款',
title: intl.formatMessage({ id: 'balance.businessRequestFunds.components.requestFundsDrawer.columns.appliedUnpaid' }),
key: 'appliedUnpaid',
dataIndex: 'appliedUnpaid',
render: (text: any) => `¥ ${priceFormat(text)}`
render: (text: any) => `${intl.formatMessage({ id: 'common.money' })} ${priceFormat(text)}`
}, {
title: '待请款',
title: intl.formatMessage({ id: 'balance.businessRequestFunds.components.requestFundsDrawer.columns.applyPayment' }),
key: 'applyPayment',
dataIndex: 'applyPayment',
render: (text: any) => `¥ ${priceFormat(text)}`
render: (text: any) => `${intl.formatMessage({ id: 'common.money' })} ${priceFormat(text)}`
}];
const handleSelectChange = (record, selected, selectedRow, nativeEvent) => {
......@@ -131,7 +131,7 @@ const RequestFundsDrawer: React.FC<RequestFundsDrawerProps> = (props: RequestFun
const _onOk = () => {
const _rows = [...selectedRows]
if (_rows.length <= 0) {
message.error('请至少选择一条记录');
message.error(intl.formatMessage({ id: 'balance.businessRequestFunds.components.requestFundsDrawer.message' }));
return;
}
setSelectedRows([])
......@@ -147,7 +147,7 @@ const RequestFundsDrawer: React.FC<RequestFundsDrawerProps> = (props: RequestFun
return (
<Drawer
title={'选择待请款单据'}
title={intl.formatMessage({ id: 'balance.businessRequestFunds.components.requestFundsDrawer.title' })}
placement={'right'}
onClose={onClose}
visible={visible}
......@@ -159,7 +159,7 @@ const RequestFundsDrawer: React.FC<RequestFundsDrawerProps> = (props: RequestFun
{intl.formatMessage({ id: 'balance.quxiao' })}
</Button>
<Button onClick={_onOk} type="primary">
{'确定'}
{intl.formatMessage({ id: 'balance.businessRequestFunds.components.requestFundsDrawer.ok' })}
</Button>
</div>
}
......@@ -206,7 +206,7 @@ const RequestFundsDrawer: React.FC<RequestFundsDrawerProps> = (props: RequestFun
type: 'string',
"x-component": 'Search',
'x-component-props': {
placeholder: '请输入单据号',
placeholder: intl.formatMessage({ id: 'balance.businessRequestFunds.components.requestFundsDrawer.schema.orderNo' }),
align: 'flex-start',
allowClear: true,
},
......@@ -229,7 +229,7 @@ const RequestFundsDrawer: React.FC<RequestFundsDrawerProps> = (props: RequestFun
"digest": {
type: 'string',
'x-component-props': {
placeholder: '请输入单据摘要',
placeholder: intl.formatMessage({ id: 'balance.businessRequestFunds.components.requestFundsDrawer.schema.digest' }),
allowClear: true,
}
},
......@@ -237,7 +237,7 @@ const RequestFundsDrawer: React.FC<RequestFundsDrawerProps> = (props: RequestFun
type: 'string',
"x-component": "daterange",
"x-component-props": {
placeholder: ['下单起始日期', '下单结束日期'],
placeholder: [intl.formatMessage({ id: 'balance.businessRequestFunds.components.requestFundsDrawer.schema.startDate' }), intl.formatMessage({ id: 'balance.businessRequestFunds.components.requestFundsDrawer.schema.endDate' })],
allowClear: true,
}
},
......
......@@ -62,7 +62,7 @@ const Search: React.FC = () => {
dataIndex: 'applyTypeName',
width: 150,
}, {
title: '收款方',
title: intl.formatMessage({ id: 'balance.businessRequestFunds.search.columns.payee' }),
key: 'payee',
dataIndex: 'payee',
width: 150,
......@@ -70,7 +70,7 @@ const Search: React.FC = () => {
title: intl.formatMessage({ id: 'balance.qingkuanjine' }),
key: 'applyAmount',
dataIndex: 'applyAmount',
render: (text: any, record: any) => `¥${priceFormat(text)}`,
render: (text: any, record: any) => `${intl.formatMessage({ id: 'common.money' })}${priceFormat(text)}`,
width: 150
}, {
title: intl.formatMessage({ id: 'balance.yujifukuanriqi' }),
......
......@@ -70,7 +70,7 @@ const Search: React.FC = () => {
title: intl.formatMessage({ id: 'balance.qingkuanjine' }),
key: 'applyAmount',
dataIndex: 'applyAmount',
render: (text: any, record: any) => `¥${priceFormat(text)}`,
render: (text: any, record: any) => `${intl.formatMessage({ id: 'common.money' })}${priceFormat(text)}`,
width: 180
}, {
title: intl.formatMessage({ id: 'balance.yujifukuanriqi' }),
......
import React from 'react';
import { useIntl } from 'umi'
import { priceFormat } from '@/utils/numberFomat'
import styles from './index.less';
......@@ -15,16 +16,17 @@ interface BusinessInvoiceCardProps {
const BusinessInvoiceCard: React.FC<BusinessInvoiceCardProps> = (props: BusinessInvoiceCardProps) => {
const { data } = props;
const intl = useIntl();
return (
<div className={styles.invoiceCard}>
<div className={styles.title}>
发票号码<span>{data.invoiceNumber}</span>
{intl.formatMessage({ id: 'balance.components.businessInvoiceCard.invoiceNumber' })}<span>{data.invoiceNumber}</span>
</div>
<div className={styles.title}>
发票日期<span>{data.invoiceDate}</span>
{intl.formatMessage({ id: 'balance.components.businessInvoiceCard.invoiceDate' })}<span>{data.invoiceDate}</span>
</div>
<div className={styles.title}>
发票金额<span>¥ {priceFormat(data.invoiceMoney)}</span>
{intl.formatMessage({ id: 'balance.components.businessInvoiceCard.invoiceMoney' })}<span>¥ {priceFormat(data.invoiceMoney)}</span>
</div>
</div>
);
......
......@@ -56,33 +56,33 @@ const WriteOffDrawer: React.FC<WriteOffDrawerProps> = (props: WriteOffDrawerProp
}
const columns: ColumnType<any>[] = [{
title: '请款单号',
title: intl.formatMessage({ id: 'balance.components.writeOffDrawer.columns.applyNo' }),
key: 'applyNo',
dataIndex: 'applyNo',
}, {
title: '请款摘要',
title: intl.formatMessage({ id: 'balance.components.writeOffDrawer.columns.applyAbstract' }),
key: 'applyAbstract',
dataIndex: 'applyAbstract',
}, {
title: '请款类型',
title: intl.formatMessage({ id: 'balance.components.writeOffDrawer.columns.applyTypeName' }),
key: 'applyTypeName',
dataIndex: 'applyTypeName',
}, {
title: '单据号',
title: intl.formatMessage({ id: 'balance.components.writeOffDrawer.columns.applyRowBillNo' }),
key: 'applyRowBillNo',
dataIndex: 'applyRowBillNo',
}, {
title: '单据摘要',
title: intl.formatMessage({ id: 'balance.components.writeOffDrawer.columns.applyRowBillAbstract' }),
key: 'applyRowBillAbstract',
dataIndex: 'applyRowBillAbstract',
}, {
title: '单据时间',
title: intl.formatMessage({ id: 'balance.components.writeOffDrawer.columns.applyBillDate' }),
key: 'applyBillDate',
dataIndex: 'applyBillDate',
render: (text: any, record: any) => formatTimeString(text, 'YYYY-MM-DD HH:mm'),
width: 180
}, {
title: '单据状态',
title: intl.formatMessage({ id: 'balance.components.writeOffDrawer.columns.applyStatusName' }),
key: 'applyStatusName',
dataIndex: 'applyStatusName',
render: (text: any, record: any) => <StatusTag type='primary' title={text} />
......@@ -95,23 +95,23 @@ const WriteOffDrawer: React.FC<WriteOffDrawerProps> = (props: WriteOffDrawerProp
return text > 0 ? `是/${text}%` : '否';
}
}, {
title: '请款金额',
title: intl.formatMessage({ id: 'balance.components.writeOffDrawer.columns.applyRowPayment' }),
key: 'applyRowPayment',
dataIndex: 'applyRowPayment',
}, {
title: '核销金额',
title: intl.formatMessage({ id: 'balance.components.writeOffDrawer.columns.writeOffAmount' }),
key: 'writeOffAmount',
dataIndex: 'writeOffAmount',
render: (text: any) => `¥ ${priceFormat(text)}`
render: (text: any) => `${intl.formatMessage({ id: 'common.money' })} ${priceFormat(text)}`
}, {
title: '可核销金额',
title: intl.formatMessage({ id: 'balance.components.writeOffDrawer.columns.canWriteAmount' }),
key: 'canWriteAmount',
dataIndex: 'canWriteAmount',
render: (text: any, record: any) => `¥ ${priceFormat(text)}`
render: (text: any, record: any) => `${intl.formatMessage({ id: 'common.money' })} ${priceFormat(text)}`
}];
const editColumns: ColumnType<any>[] = columns.concat([{
title: '本次核销金额',
title: intl.formatMessage({ id: 'balance.components.writeOffDrawer.editColumns.currentMoney' }),
key: 'currentMoney',
dataIndex: 'currentMoney',
render: (text: any, record: any) => (
......@@ -125,14 +125,14 @@ const WriteOffDrawer: React.FC<WriteOffDrawerProps> = (props: WriteOffDrawerProp
return Promise.resolve()
}
if (!reg.test(value)) {
return Promise.reject(new Error('本次核销金额需要大于0'))
return Promise.reject(new Error(intl.formatMessage({ id: 'balance.components.writeOffDrawer.editColumns.currentMoney.rule.1' })))
}
return value > record.canWriteAmount ? Promise.reject(new Error('本次核销金额不能大于可以核销金额')) : Promise.resolve()
return value > record.canWriteAmount ? Promise.reject(new Error(intl.formatMessage({ id: 'balance.components.writeOffDrawer.editColumns.currentMoney.rule.2' }))) : Promise.resolve()
}
},
]}
>
<Input type='number' addonBefore='¥' max={record.canWriteAmount} value={record.canWriteAmount} onChange={(e) => { _changeNumbers(record, e.target.value) }} />
<Input type='number' addonBefore={intl.formatMessage({ id: 'common.money' })} max={record.canWriteAmount} value={record.canWriteAmount} onChange={(e) => { _changeNumbers(record, e.target.value) }} />
</Form.Item>
)
}])
......@@ -142,7 +142,7 @@ const WriteOffDrawer: React.FC<WriteOffDrawerProps> = (props: WriteOffDrawerProp
return (
<Drawer
title={'核销明细'}
title={intl.formatMessage({ id: 'balance.components.writeOffDrawer.title' })}
placement={'right'}
onClose={onClose}
visible={visible}
......@@ -154,7 +154,7 @@ const WriteOffDrawer: React.FC<WriteOffDrawerProps> = (props: WriteOffDrawerProp
{intl.formatMessage({ id: 'balance.quxiao' })}
</Button>
<Button onClick={_handleOk} type="primary">
{'确定'}
{intl.formatMessage({ id: 'balance.components.writeOffDrawer.ok' })}
</Button>
</div>
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment