Commit 5c0a7573 authored by 孙 楠's avatar 孙 楠

add more i18n messages

parent 2cc20476
...@@ -82,7 +82,7 @@ const ImportListModal = props => { ...@@ -82,7 +82,7 @@ const ImportListModal = props => {
<div className={styles.pagewrapper}> <div className={styles.pagewrapper}>
<Pagination <Pagination
total={total} total={total}
showTotal={e => `总共 ${e} 条数据`} showTotal={e => `${$t('total')}${e}${$t('data.records')}`}
pageSize={pageInfo.pageSize} pageSize={pageInfo.pageSize}
defaultCurrent={pageInfo.pageNo} defaultCurrent={pageInfo.pageNo}
onChange={onChangePage} onChange={onChangePage}
......
...@@ -316,7 +316,7 @@ const Complex = props => { ...@@ -316,7 +316,7 @@ const Complex = props => {
<Pagination <Pagination
onChange={onPageChange} onChange={onPageChange}
total={dataTotal} total={dataTotal}
showTotal={(total, range) => `第${range[0]}-${range[1]}条 /总共${total}条`} showTotal={(total, range) => `${$t('no')}${range[0]}-${range[1]}${$t('entries.total')}${total}${$t('entries')}`}
showSizeChanger showSizeChanger
pageSize={queryParams.pageSize} pageSize={queryParams.pageSize}
current={queryParams.pageNo} current={queryParams.pageNo}
......
...@@ -103,14 +103,14 @@ const UploadImage = forwardRef((props, ref) => { ...@@ -103,14 +103,14 @@ const UploadImage = forwardRef((props, ref) => {
if (!canUploadFile && !accept.includes(curType)) { if (!canUploadFile && !accept.includes(curType)) {
notification.open({ notification.open({
message: file.name, message: file.name,
description: `文件格式须为${accept.join('')}!`, description: `${$t('file.format.must.be')}${accept.join('')}!`,
}); });
return resolve(null); return resolve(null);
} }
if (file.size > MAX_FILE_SIZE * UNIT) { if (file.size > MAX_FILE_SIZE * UNIT) {
notification.open({ notification.open({
message: file.name, message: file.name,
description: `单个文件大小不能超过${MAX_FILE_SIZE}M!`, description: `${$t('single.file.size.cannot.exceed')}${MAX_FILE_SIZE}M!`,
}); });
return resolve(null); return resolve(null);
} }
......
...@@ -29,7 +29,7 @@ export const checkConfirm = () => { ...@@ -29,7 +29,7 @@ export const checkConfirm = () => {
confirm({ confirm({
title: $t('risk.warning'), title: $t('risk.warning'),
icon: <ExclamationCircleOutlined />, icon: <ExclamationCircleOutlined />,
content: `确定关闭${mt}餐品类型?此餐品类型下关联的商户及商品将一并删除,不可逆请谨慎操作!`, content: `${$t('confirm.close')}${mt}${$t('delete.food.type.associated.merchantsproducts.will.be.permanently.deleted')}`,
onOk() { onOk() {
resolve(1); resolve(1);
}, },
......
...@@ -25,7 +25,7 @@ const MealLimitsFormList = (meals, selectedMealTypes) => ( ...@@ -25,7 +25,7 @@ const MealLimitsFormList = (meals, selectedMealTypes) => (
</Col> </Col>
<Col span={24}> <Col span={24}>
<Form.Item <Form.Item
label={`${mealSections[meal]}订单`} label={`${mealSections[meal]}${$t('order')}`}
required required
labelCol={{ span: 4 }} labelCol={{ span: 4 }}
wrapperCol={{ span: 20 }} wrapperCol={{ span: 20 }}
......
...@@ -5,13 +5,13 @@ import { validateRequired, isCheckPriceTwoDecimal } from '@/utils/validator'; ...@@ -5,13 +5,13 @@ import { validateRequired, isCheckPriceTwoDecimal } from '@/utils/validator';
const MealLimit = props => ( const MealLimit = props => (
// console.log('props :>> ', props); // console.log('props :>> ', props);
<Form.Item <Form.Item
label={`${props.label}限额`} label={`${props.label}${$t('quota')}`}
name={props.name} name={props.name}
initialValue={props.value} initialValue={props.value}
labelCol={{ span: 10 }} labelCol={{ span: 10 }}
wrapperCol={{ span: 14 }} wrapperCol={{ span: 14 }}
rules={[ rules={[
{ validator: validateRequired, message: `请输入${props.label}限额` }, { validator: validateRequired, message: `${$t('please.enter')}${props.label}${$t('quota')}` },
{ validator: isCheckPriceTwoDecimal, message: $t('enter.valid.price') }, { validator: isCheckPriceTwoDecimal, message: $t('enter.valid.price') },
]} ]}
> >
......
This diff is collapsed.
This diff is collapsed.
...@@ -109,7 +109,7 @@ const ViewDepartmentModal = ({ visible, onClose, enterpriseList }) => { ...@@ -109,7 +109,7 @@ const ViewDepartmentModal = ({ visible, onClose, enterpriseList }) => {
const pagination = { const pagination = {
...pageInfo, ...pageInfo,
total, total,
showTotal: t => `${t}`, showTotal: t => `${$t('total')}${t}${$t('entries')}`,
onChange, onChange,
onShowSizeChange: onChange, onShowSizeChange: onChange,
}; };
......
...@@ -177,7 +177,7 @@ const StoreManagement = () => { ...@@ -177,7 +177,7 @@ const StoreManagement = () => {
// 删除 // 删除
const delEmployee = ({ staffName, id }) => { const delEmployee = ({ staffName, id }) => {
confirm({ confirm({
title: `确认删除企业员工#${staffName || ''}#?`, title: `${$t('confirm.delete.employee.0')}${staffName || ''}#?`,
onOk() { onOk() {
deleteEmployee(id); deleteEmployee(id);
}, },
...@@ -255,7 +255,7 @@ const StoreManagement = () => { ...@@ -255,7 +255,7 @@ const StoreManagement = () => {
const pagination = { const pagination = {
...page, ...page,
total, total,
showTotal: t => `${t}`, showTotal: t => `${$t('total')}${t}${$t('entries')}`,
onChange, onChange,
onShowSizeChange: onChange, onShowSizeChange: onChange,
}; };
......
...@@ -63,7 +63,7 @@ const DraftModal = props => { ...@@ -63,7 +63,7 @@ const DraftModal = props => {
const pagination = { const pagination = {
...pageInfo, ...pageInfo,
total, total,
showTotal: t => `${t} 项数据`, showTotal: t => `${$t('total')}${t}${$t('data.items')}`,
onChange, onChange,
pageSizeOptions: [4, 20, 50, 100], pageSizeOptions: [4, 20, 50, 100],
showSizeChanger: !0, showSizeChanger: !0,
......
...@@ -119,7 +119,7 @@ class goodsManage extends Component { ...@@ -119,7 +119,7 @@ class goodsManage extends Component {
}); });
if (res) { if (res) {
const blob = new Blob([res]); const blob = new Blob([res]);
saveAs(blob, `商品明细-${format(new Date(), 'yyyyMMdd')}.xlsx`); saveAs(blob, `${$t('product.details')}${format(new Date(), 'yyyyMMdd')}.xlsx`);
} else { } else {
notification.error({ message: $t('download.failed') }); notification.error({ message: $t('download.failed') });
} }
......
...@@ -216,7 +216,7 @@ class supplyPriceUpdate extends Component { ...@@ -216,7 +216,7 @@ class supplyPriceUpdate extends Component {
style={{ marginBottom: 10 }} style={{ marginBottom: 10 }}
onChange={this.onPageChange} onChange={this.onPageChange}
total={tableData.total} total={tableData.total}
showTotal={total => `共${total}条`} showTotal={total => `${$t('total')}${total}${$t('entries')}`}
current={pageNo} current={pageNo}
pageSize={pageSize} pageSize={pageSize}
showSizeChanger showSizeChanger
......
...@@ -11,7 +11,7 @@ const ActionBar = options => { ...@@ -11,7 +11,7 @@ const ActionBar = options => {
console.log('options.shopId :>> ', options.shopId); console.log('options.shopId :>> ', options.shopId);
Modal.confirm({ Modal.confirm({
icon: <ExclamationCircleOutlined />, icon: <ExclamationCircleOutlined />,
content: `确认${+state === 6 ? '下架' : '上架'}商品?`, content: `${$t('confirm')}${+state === 6 ? '下架' : '上架'}${$t('product')}`,
onOk: async () => { onOk: async () => {
const res = await apiGoodsActionBatch({ const res = await apiGoodsActionBatch({
skuIds: options.selectedRowKeys, skuIds: options.selectedRowKeys,
......
...@@ -257,7 +257,7 @@ const Takeaway = options => { ...@@ -257,7 +257,7 @@ const Takeaway = options => {
className={styles['takeawayBox--page']} className={styles['takeawayBox--page']}
onChange={onPageChange} onChange={onPageChange}
total={total} total={total}
showTotal={o => `共${o}条`} showTotal={o => `${$t('total')}${o}${$t('entries')}`}
current={pageNo} current={pageNo}
pageSize={pageSize} pageSize={pageSize}
showSizeChanger showSizeChanger
......
...@@ -495,7 +495,7 @@ class goodsManage extends Component { ...@@ -495,7 +495,7 @@ class goodsManage extends Component {
style={{ marginBottom: 10 }} style={{ marginBottom: 10 }}
onChange={this.onPageChange} onChange={this.onPageChange}
total={tableData.total} total={tableData.total}
showTotal={total => `共${total}条`} showTotal={total => `${$t('total')}${total}${$t('entries')}`}
current={pageNo} current={pageNo}
pageSize={pageSize} pageSize={pageSize}
showSizeChanger showSizeChanger
......
...@@ -17,7 +17,7 @@ const InfoAudit = props => { ...@@ -17,7 +17,7 @@ const InfoAudit = props => {
const obj = { const obj = {
1: '-', 1: '-',
2: $t('review.passed'), 2: $t('review.passed'),
3: `审核拒绝,${audit.rejectReason}`, 3: `${$t('rejected')}${audit.rejectReason}`,
}; };
if (audit) { if (audit) {
return obj[audit.status] || ''; return obj[audit.status] || '';
......
...@@ -455,5 +455,5 @@ export async function apiDownBiddingTemplate(params) { ...@@ -455,5 +455,5 @@ export async function apiDownBiddingTemplate(params) {
responseType: 'arrayBuffer', responseType: 'arrayBuffer',
}); });
const blob = new Blob([res]); const blob = new Blob([res]);
saveAs(blob, `自营商品供货价更新表-${format(new Date(), 'yyyy-MM-dd')}.xlsx`); saveAs(blob, `${$t('selfoperated.product.price.update')}${format(new Date(), 'yyyy-MM-dd')}.xlsx`);
} }
...@@ -48,7 +48,7 @@ export function column() { ...@@ -48,7 +48,7 @@ export function column() {
const onChangeState = async ({ skuId, state }) => { const onChangeState = async ({ skuId, state }) => {
confirm({ confirm({
icon: <ExclamationCircleOutlined />, icon: <ExclamationCircleOutlined />,
content: `确认${+state === 6 ? '下架' : '上架'}商品?`, content: `${$t('confirm')}${+state === 6 ? '下架' : '上架'}${$t('product')}`,
onOk: async () => { onOk: async () => {
const res = await apiChangeStateGoods({ const res = await apiChangeStateGoods({
ids: skuId, ids: skuId,
...@@ -251,7 +251,7 @@ export function takeawayColumn(actions) { ...@@ -251,7 +251,7 @@ export function takeawayColumn(actions) {
const onChangeState = async ({ skuId, state }) => { const onChangeState = async ({ skuId, state }) => {
confirm({ confirm({
icon: <ExclamationCircleOutlined />, icon: <ExclamationCircleOutlined />,
content: `确认${+state === 6 ? '下架' : '上架'}商品?`, content: `${$t('confirm')}${+state === 6 ? '下架' : '上架'}${$t('product')}`,
onOk: async () => { onOk: async () => {
const res = await apiGoodsActionBatch({ const res = await apiGoodsActionBatch({
skuIds: [skuId], skuIds: [skuId],
......
...@@ -26,7 +26,7 @@ const CustomUpload = props => { ...@@ -26,7 +26,7 @@ const CustomUpload = props => {
} }
} }
if (fileList.length >= limit) { if (fileList.length >= limit) {
message.warning(`最多上传${limit}个!`); message.warning(`${$t('maximum.upload')}${limit}${$t('items')}`);
return; return;
} }
......
...@@ -52,7 +52,7 @@ const PaymentMange = props => { ...@@ -52,7 +52,7 @@ const PaymentMange = props => {
const data = await selfPaymentexportDetail(params); const data = await selfPaymentexportDetail(params);
if (data) { if (data) {
const blob = new Blob([data]); const blob = new Blob([data]);
saveAs(blob, `账单付款单明细-${format(new Date(), 'yyyyMMddHHmmss')}.xlsx`); saveAs(blob, `${$t('bill.payment.details')}${format(new Date(), 'yyyyMMddHHmmss')}.xlsx`);
} else { } else {
notification.error({ message: $t('download.failed') }); notification.error({ message: $t('download.failed') });
} }
...@@ -140,7 +140,7 @@ const PaymentMange = props => { ...@@ -140,7 +140,7 @@ const PaymentMange = props => {
if (checkedTime(params)) { if (checkedTime(params)) {
const data = await selfPaymentExport(params); const data = await selfPaymentExport(params);
const blob = new Blob([data]); const blob = new Blob([data]);
saveAs(blob, `付款单导出数据-${format(new Date(), 'yyyyMMddHHmmss')}.xlsx`); saveAs(blob, `${$t('payment.order.export.data')}${format(new Date(), 'yyyyMMddHHmmss')}.xlsx`);
} }
setloading(false); setloading(false);
}; };
......
...@@ -63,7 +63,7 @@ const DraftModal = props => { ...@@ -63,7 +63,7 @@ const DraftModal = props => {
const pagination = { const pagination = {
...pageInfo, ...pageInfo,
total, total,
showTotal: t => `${t} 项数据`, showTotal: t => `${$t('total')}${t}${$t('data.items')}`,
onChange, onChange,
pageSizeOptions: [4, 20, 50, 100], pageSizeOptions: [4, 20, 50, 100],
showSizeChanger: !0, showSizeChanger: !0,
......
...@@ -119,7 +119,7 @@ class goodsManage extends Component { ...@@ -119,7 +119,7 @@ class goodsManage extends Component {
}); });
if (res) { if (res) {
const blob = new Blob([res]); const blob = new Blob([res]);
saveAs(blob, `商品明细-${format(new Date(), 'yyyyMMdd')}.xlsx`); saveAs(blob, `${$t('product.details')}${format(new Date(), 'yyyyMMdd')}.xlsx`);
} else { } else {
notification.error({ message: $t('download.failed') }); notification.error({ message: $t('download.failed') });
} }
......
...@@ -11,7 +11,7 @@ const ActionBar = options => { ...@@ -11,7 +11,7 @@ const ActionBar = options => {
console.log('options.shopId :>> ', options.shopId); console.log('options.shopId :>> ', options.shopId);
Modal.confirm({ Modal.confirm({
icon: <ExclamationCircleOutlined />, icon: <ExclamationCircleOutlined />,
content: `确认${+state === 6 ? '下架' : '上架'}商品?`, content: `${$t('confirm')}${+state === 6 ? '下架' : '上架'}${$t('product')}`,
onOk: async () => { onOk: async () => {
const res = await apiGoodsActionBatch({ const res = await apiGoodsActionBatch({
skuIds: options.selectedRowKeys, skuIds: options.selectedRowKeys,
......
...@@ -257,7 +257,7 @@ const Takeaway = options => { ...@@ -257,7 +257,7 @@ const Takeaway = options => {
className={styles['takeawayBox--page']} className={styles['takeawayBox--page']}
onChange={onPageChange} onChange={onPageChange}
total={total} total={total}
showTotal={o => `共${o}条`} showTotal={o => `${$t('total')}${o}${$t('entries')}`}
current={pageNo} current={pageNo}
pageSize={pageSize} pageSize={pageSize}
showSizeChanger showSizeChanger
......
...@@ -499,7 +499,7 @@ class popGoodsManage extends Component { ...@@ -499,7 +499,7 @@ class popGoodsManage extends Component {
style={{ marginBottom: 10 }} style={{ marginBottom: 10 }}
onChange={this.onPageChange} onChange={this.onPageChange}
total={tableData.total} total={tableData.total}
showTotal={total => `共${total}条`} showTotal={total => `${$t('total')}${total}${$t('entries')}`}
current={pageNo} current={pageNo}
pageSize={pageSize} pageSize={pageSize}
showSizeChanger showSizeChanger
......
...@@ -17,7 +17,7 @@ const InfoAudit = props => { ...@@ -17,7 +17,7 @@ const InfoAudit = props => {
const obj = { const obj = {
1: '-', 1: '-',
2: $t('review.passed'), 2: $t('review.passed'),
3: `审核拒绝,${audit.rejectReason}`, 3: `${$t('rejected')}${audit.rejectReason}`,
}; };
if (audit) { if (audit) {
return obj[audit.status] || ''; return obj[audit.status] || '';
......
...@@ -455,5 +455,5 @@ export async function apiDownBiddingTemplate(params) { ...@@ -455,5 +455,5 @@ export async function apiDownBiddingTemplate(params) {
responseType: 'arrayBuffer', responseType: 'arrayBuffer',
}); });
const blob = new Blob([res]); const blob = new Blob([res]);
saveAs(blob, `自营商品供货价更新表-${format(new Date(), 'yyyy-MM-dd')}.xlsx`); saveAs(blob, `${$t('selfoperated.product.price.update')}${format(new Date(), 'yyyy-MM-dd')}.xlsx`);
} }
...@@ -48,7 +48,7 @@ export function column() { ...@@ -48,7 +48,7 @@ export function column() {
const onChangeState = async ({ skuId, state }) => { const onChangeState = async ({ skuId, state }) => {
confirm({ confirm({
icon: <ExclamationCircleOutlined />, icon: <ExclamationCircleOutlined />,
content: `确认${+state === 6 ? '下架' : '上架'}商品?`, content: `${$t('confirm')}${+state === 6 ? '下架' : '上架'}${$t('product')}`,
onOk: async () => { onOk: async () => {
const res = await apiChangeStateGoods({ const res = await apiChangeStateGoods({
ids: skuId, ids: skuId,
...@@ -251,7 +251,7 @@ export function takeawayColumn(actions) { ...@@ -251,7 +251,7 @@ export function takeawayColumn(actions) {
const onChangeState = async ({ skuId, state }) => { const onChangeState = async ({ skuId, state }) => {
confirm({ confirm({
icon: <ExclamationCircleOutlined />, icon: <ExclamationCircleOutlined />,
content: `确认${+state === 6 ? '下架' : '上架'}商品?`, content: `${$t('confirm')}${+state === 6 ? '下架' : '上架'}${$t('product')}`,
onOk: async () => { onOk: async () => {
const res = await apiGoodsActionBatch({ const res = await apiGoodsActionBatch({
skuIds: [skuId], skuIds: [skuId],
......
...@@ -68,7 +68,7 @@ export async function downOrder(params) { ...@@ -68,7 +68,7 @@ export async function downOrder(params) {
responseType: 'arrayBuffer', responseType: 'arrayBuffer',
}); });
const blob = new Blob([data]); const blob = new Blob([data]);
saveAs(blob, `商户订单列表-${format(new Date(), 'yyyyMMddHHmmss')}.xlsx`); saveAs(blob, `${$t('merchant.order.list')}${format(new Date(), 'yyyyMMddHHmmss')}.xlsx`);
} }
// 批量发货订单 // 批量发货订单
export async function queryToBatchSend(params) { export async function queryToBatchSend(params) {
...@@ -111,7 +111,7 @@ export async function downUploadeOrder(params) { ...@@ -111,7 +111,7 @@ export async function downUploadeOrder(params) {
1: $t('successful.data'), 1: $t('successful.data'),
2: $t('all.data'), 2: $t('all.data'),
}; };
saveAs(blob, `批量发货-${status[params.status]}-${format(new Date(), 'yyyyMMddHHmmss')}.xlsx`); saveAs(blob, `${$t('batch.shipping')}${status[params.status]}-${format(new Date(), 'yyyyMMddHHmmss')}.xlsx`);
} }
// 延迟发货 // 延迟发货
export function apiDelayDeliverGoods(data) { export function apiDelayDeliverGoods(data) {
......
...@@ -86,7 +86,7 @@ export const CreateFormInput = props => { ...@@ -86,7 +86,7 @@ export const CreateFormInput = props => {
{...roleProps} {...roleProps}
{...options} {...options}
style={{ width: '100%' }} style={{ width: '100%' }}
placeholder={`请输入${title}`} placeholder={`${$t('please.enter')}${title}`}
onBlur={e => { onBlur={e => {
const inputTarget = e.target; const inputTarget = e.target;
const timer = setTimeout(() => { const timer = setTimeout(() => {
...@@ -137,7 +137,7 @@ export const CreateFormInput = props => { ...@@ -137,7 +137,7 @@ export const CreateFormInput = props => {
{...roleProps} {...roleProps}
{...options} {...options}
style={{ width: '100%' }} style={{ width: '100%' }}
placeholder={`请输入${title}`} placeholder={`${$t('please.enter')}${title}`}
onBlur={e => { onBlur={e => {
const inputTarget = e.target; const inputTarget = e.target;
const timer = setTimeout(() => { const timer = setTimeout(() => {
......
...@@ -150,7 +150,7 @@ const EditFormTable = forwardRef((props, ref) => { ...@@ -150,7 +150,7 @@ const EditFormTable = forwardRef((props, ref) => {
key={`${dataIndex}_${rowIndex}`} key={`${dataIndex}_${rowIndex}`}
name={['tableList', rowIndex, dataIndex]} name={['tableList', rowIndex, dataIndex]}
initialValue={record[dataIndex] || null} initialValue={record[dataIndex] || null}
rules={[{ required: roleRules.required, message: `请输入${title}.` }]} rules={[{ required: roleRules.required, message: `${$t('please.enter')}${title}.` }]}
> >
<CreateFormInput <CreateFormInput
{...otherParams} {...otherParams}
......
...@@ -276,7 +276,7 @@ const FormPackage = forwardRef((props, ref) => { ...@@ -276,7 +276,7 @@ const FormPackage = forwardRef((props, ref) => {
} }
arr.push({ arr.push({
uuid: i, uuid: i,
specName: `套餐${i + 1}`, specName: `${$t('combo')}${i + 1}`,
children, children,
}); });
}); });
......
...@@ -77,7 +77,7 @@ const SpecificationTemplate = (props, _) => { ...@@ -77,7 +77,7 @@ const SpecificationTemplate = (props, _) => {
if (!specId) { if (!specId) {
Modal.warning({ Modal.warning({
maskClosable: true, maskClosable: true,
title: `请先选择${label}!`, title: `${$t('please.select.first')}${label}!`,
}); });
return; return;
} }
...@@ -105,7 +105,7 @@ const SpecificationTemplate = (props, _) => { ...@@ -105,7 +105,7 @@ const SpecificationTemplate = (props, _) => {
options={specList} options={specList}
style={{ width: 200 }} style={{ width: 200 }}
fieldNames={{ label: 'specName', value: 'specId' }} fieldNames={{ label: 'specName', value: 'specId' }}
placeholder={`请选择${label}`} placeholder={`${$t('please.select')}${label}`}
showSearch showSearch
filterOption={(input, option) => filterOption={(input, option) =>
option.specName.toLowerCase().indexOf(input.toLowerCase()) >= 0 option.specName.toLowerCase().indexOf(input.toLowerCase()) >= 0
......
...@@ -193,7 +193,7 @@ const FormRuleVPictures = forwardRef((props, ref) => { ...@@ -193,7 +193,7 @@ const FormRuleVPictures = forwardRef((props, ref) => {
{ {
required: imgConfig.cardImageList.rule, required: imgConfig.cardImageList.rule,
type: 'array', type: 'array',
message: `请上传${imgConfig.cardImageList.title}!`, message: `${$t('please.upload')}${imgConfig.cardImageList.title}!`,
}, },
]} ]}
> >
...@@ -212,7 +212,7 @@ const FormRuleVPictures = forwardRef((props, ref) => { ...@@ -212,7 +212,7 @@ const FormRuleVPictures = forwardRef((props, ref) => {
<Form.Item <Form.Item
name={['imageList', key]} name={['imageList', key]}
key={key} key={key}
label={`商品图片(${key})`} label={`${$t('product.images')}${key})`}
rules={[ rules={[
{ required: imgConfig.imageList.rule, type: 'array', message: $t('upload.images') }, { required: imgConfig.imageList.rule, type: 'array', message: $t('upload.images') },
]} ]}
...@@ -243,7 +243,7 @@ const FormRuleVPictures = forwardRef((props, ref) => { ...@@ -243,7 +243,7 @@ const FormRuleVPictures = forwardRef((props, ref) => {
{ {
type: 'array', type: 'array',
required: imgConfig.detailImageList.rule, required: imgConfig.detailImageList.rule,
message: `请上传${imgConfig.detailImageList.title}!`, message: `${$t('please.upload')}${imgConfig.detailImageList.title}!`,
}, },
]} ]}
extra={imgConfig.detailImageList.renderExtra()} extra={imgConfig.detailImageList.renderExtra()}
......
...@@ -89,7 +89,7 @@ const UploadCropImage = forwardRef((props, ref) => { ...@@ -89,7 +89,7 @@ const UploadCropImage = forwardRef((props, ref) => {
new Promise((resolve, reject) => { new Promise((resolve, reject) => {
const LtMB = file.size / 1024 / 1024; const LtMB = file.size / 1024 / 1024;
if (LtMB > 2) { if (LtMB > 2) {
warningTip(`[${file.name}] 图片不可以大于2MB`); warningTip(`[${file.name}${$t('image.size.cannot.exceed.2mb')}`);
resolve(null); resolve(null);
} }
getBase64(file, url => { getBase64(file, url => {
...@@ -103,7 +103,7 @@ const UploadCropImage = forwardRef((props, ref) => { ...@@ -103,7 +103,7 @@ const UploadCropImage = forwardRef((props, ref) => {
resolve(file); resolve(file);
}); });
image.addEventListener('error', () => { image.addEventListener('error', () => {
warningTip(`${file.name}图片上传失败!`); warningTip(`${file.name}${$t('image.upload.failed')}`);
resolve(null); resolve(null);
}); });
image.src = url; image.src = url;
......
...@@ -96,7 +96,7 @@ const UploadImage = forwardRef((props, ref) => { ...@@ -96,7 +96,7 @@ const UploadImage = forwardRef((props, ref) => {
new Promise((resolve, reject) => { new Promise((resolve, reject) => {
const LtMB = file.size / 1024 / 1024; const LtMB = file.size / 1024 / 1024;
if (LtMB > 2) { if (LtMB > 2) {
warningTip(`[${file.name}] 图片不可以大于2MB`); warningTip(`[${file.name}${$t('image.size.cannot.exceed.2mb')}`);
resolve(null); resolve(null);
} }
getBase64(file, url => { getBase64(file, url => {
...@@ -110,7 +110,7 @@ const UploadImage = forwardRef((props, ref) => { ...@@ -110,7 +110,7 @@ const UploadImage = forwardRef((props, ref) => {
resolve(file); resolve(file);
}); });
image.addEventListener('error', () => { image.addEventListener('error', () => {
warningTip(`${file.name}图片上传失败!`); warningTip(`${file.name}${$t('image.upload.failed')}`);
resolve(null); resolve(null);
}); });
image.src = url; image.src = url;
......
...@@ -70,7 +70,7 @@ export const TaskList = (canAddService, canAddNormal, canTakeawayService) => [ ...@@ -70,7 +70,7 @@ export const TaskList = (canAddService, canAddNormal, canTakeawayService) => [
rule: true, rule: true,
limit: 1, limit: 1,
renderExtra(leng) { renderExtra(leng) {
return `建议尺寸: ##宽##高 (${leng} / 1) 封面图第一张 `; return `${$t('recommended.size.widthheight')}${leng}${$t('1.first.cover.image')}`;
}, },
}, },
cardImageList: { cardImageList: {
...@@ -78,7 +78,7 @@ export const TaskList = (canAddService, canAddNormal, canTakeawayService) => [ ...@@ -78,7 +78,7 @@ export const TaskList = (canAddService, canAddNormal, canTakeawayService) => [
rule: true, rule: true,
limit: 11, limit: 11,
renderExtra(leng) { renderExtra(leng) {
return `建议尺寸: ##宽##高,sku商品轮播图(${leng} / 11)`; return `${$t('recommended.size.widthheight.sku.carousel')}${leng} / 11)`;
}, },
}, },
detailImageList: { detailImageList: {
...@@ -102,7 +102,7 @@ export const TaskList = (canAddService, canAddNormal, canTakeawayService) => [ ...@@ -102,7 +102,7 @@ export const TaskList = (canAddService, canAddNormal, canTakeawayService) => [
rule: true, rule: true,
limit: 1, limit: 1,
renderExtra(leng) { renderExtra(leng) {
return `建议尺寸: ##宽##高 (${leng} / 1) 封面图第一张 `; return `${$t('recommended.size.widthheight')}${leng}${$t('1.first.cover.image')}`;
}, },
}, },
cardImageList: { cardImageList: {
...@@ -110,7 +110,7 @@ export const TaskList = (canAddService, canAddNormal, canTakeawayService) => [ ...@@ -110,7 +110,7 @@ export const TaskList = (canAddService, canAddNormal, canTakeawayService) => [
rule: true, rule: true,
limit: 11, limit: 11,
renderExtra(leng) { renderExtra(leng) {
return `建议尺寸: ##宽##高,sku商品轮播图(${leng} / 11)`; return `${$t('recommended.size.widthheight.sku.carousel')}${leng} / 11)`;
}, },
}, },
detailImageList: { detailImageList: {
...@@ -223,7 +223,7 @@ export const StaticColumns = customer => [ ...@@ -223,7 +223,7 @@ export const StaticColumns = customer => [
disabeldRender: () => customer.isDisabled, disabeldRender: () => customer.isDisabled,
}, },
{ {
title: `重量(${customer.isGold ? 'g' : 'kg'})`, title: `${$t('weight')}${customer.isGold ? 'g' : 'kg'})`,
dataIndex: 'weight', dataIndex: 'weight',
editable: true, editable: true,
batchRole: [1], batchRole: [1],
...@@ -372,7 +372,7 @@ export const StaticColumnsPop = customer => [ ...@@ -372,7 +372,7 @@ export const StaticColumnsPop = customer => [
disabeldRender: () => customer.isDisabled, disabeldRender: () => customer.isDisabled,
}, },
{ {
title: `重量(${customer.isGold ? 'g' : 'kg'})`, title: `${$t('weight')}${customer.isGold ? 'g' : 'kg'})`,
dataIndex: 'weight', dataIndex: 'weight',
editable: true, editable: true,
batchRole: [1], batchRole: [1],
......
...@@ -235,7 +235,7 @@ const ServiceGoods = options => { ...@@ -235,7 +235,7 @@ const ServiceGoods = options => {
const sendAsyncHttpRequest = isEdit ? merchantProductEdit : merchantProductAdd; const sendAsyncHttpRequest = isEdit ? merchantProductEdit : merchantProductAdd;
const addResponse = await sendAsyncHttpRequest(sendData); const addResponse = await sendAsyncHttpRequest(sendData);
if (addResponse.data) { if (addResponse.data) {
message.success(`${isEdit ? '修改' : '添加'}成功!`); message.success(`${isEdit ? '修改' : '添加'}${$t('success')}`);
localStorage.remove(localAutoSaveKey); localStorage.remove(localAutoSaveKey);
handleCancel(true, sendData); handleCancel(true, sendData);
} }
...@@ -450,7 +450,7 @@ const ServiceGoods = options => { ...@@ -450,7 +450,7 @@ const ServiceGoods = options => {
txt = $t('kilogram'); txt = $t('kilogram');
} }
if (txt) { if (txt) {
message.warning(`商品品类已切换,规格重量单位已自动切换为${txt}`, 6); message.warning(`${$t('product.category.changed.weight.unit.autoswitched.to')}${txt}`, 6);
} }
}; };
......
...@@ -144,7 +144,7 @@ export const filterSendData = (type, params) => { ...@@ -144,7 +144,7 @@ export const filterSendData = (type, params) => {
item.specs.forEach(itm => { item.specs.forEach(itm => {
if (itm?.unit && tempWeightName.includes(itm?.unit)) { if (itm?.unit && tempWeightName.includes(itm?.unit)) {
itm.quantity = itm.quantity =
`${itm?.quantity}`.indexOf($t('approx')) > -1 ? itm?.quantity : `${itm?.quantity}`; `${itm?.quantity}`.indexOf($t('approx')) > -1 ? itm?.quantity : `${$t('approx')}${itm?.quantity}`;
} }
}); });
} }
...@@ -162,7 +162,7 @@ export const filterSendData = (type, params) => { ...@@ -162,7 +162,7 @@ export const filterSendData = (type, params) => {
} }
if (itm?.unit && tempWeightName.includes(itm?.unit)) { if (itm?.unit && tempWeightName.includes(itm?.unit)) {
itm.quantity = itm.quantity =
`${itm?.quantity}`.indexOf($t('approx')) > -1 ? itm?.quantity : `${itm?.quantity}`; `${itm?.quantity}`.indexOf($t('approx')) > -1 ? itm?.quantity : `${$t('approx')}${itm?.quantity}`;
} }
}); });
} }
......
...@@ -47,7 +47,7 @@ const SettlementSheet = props => { ...@@ -47,7 +47,7 @@ const SettlementSheet = props => {
return true; return true;
} }
notification.error({ notification.error({
message: `${billPeriodData.text}帐期最多可选${billPeriodData?.maxlength || 0}`, message: `${billPeriodData.text}${$t('max.selectable.billing.cycles')}${billPeriodData?.maxlength || 0}${$t('entries')}`,
}); });
return false; return false;
}; };
......
...@@ -23,7 +23,7 @@ const repastType = list => { ...@@ -23,7 +23,7 @@ const repastType = list => {
.filter(item => item !== 4) .filter(item => item !== 4)
.map(item => { .map(item => {
const name = repastTypeList.find(i => i.value === item)?.label; const name = repastTypeList.find(i => i.value === item)?.label;
return name ? `${name}/到店 ` : null; return name ? `${name}${$t('instore')}` : null;
}); });
} }
return list.map(item => { return list.map(item => {
......
...@@ -130,7 +130,7 @@ const StoreManagement = () => { ...@@ -130,7 +130,7 @@ const StoreManagement = () => {
// 删除 // 删除
const delShop = ({ shopName, id }) => { const delShop = ({ shopName, id }) => {
confirm({ confirm({
title: `确认删除企业商户#${shopName || ''}#?`, title: `${$t('confirm.delete.merchant.0')}${shopName || ''}#?`,
content: $t('note.deleting.shop.removes.all.merchant.products'), content: $t('note.deleting.shop.removes.all.merchant.products'),
onOk() { onOk() {
editShop(id); editShop(id);
...@@ -194,7 +194,7 @@ const StoreManagement = () => { ...@@ -194,7 +194,7 @@ const StoreManagement = () => {
const pagination = { const pagination = {
...page, ...page,
total, total,
showTotal: t => `${t}`, showTotal: t => `${$t('total')}${t}${$t('entries')}`,
onChange: handleTableChange, onChange: handleTableChange,
onShowSizeChange: handleTableChange, onShowSizeChange: handleTableChange,
}; };
......
...@@ -167,7 +167,7 @@ const AddressForm = props => { ...@@ -167,7 +167,7 @@ const AddressForm = props => {
return ( return (
<Modal <Modal
title={`${formData.id ? '修改' : '增加'}售后地址`} title={`${formData.id ? '修改' : '增加'}${$t('aftersales.address')}`}
visible={visible} visible={visible}
onCancel={() => onCancel()} onCancel={() => onCancel()}
onOk={handleSubmit} onOk={handleSubmit}
...@@ -210,14 +210,14 @@ const AddressForm = props => { ...@@ -210,14 +210,14 @@ const AddressForm = props => {
rules: [ rules: [
{ {
required: area.required, required: area.required,
message: `请选择${area.name}!`, message: `${$t('please.select')}${area.name}!`,
}, },
], ],
})( })(
<Select <Select
showSearch showSearch
optionFilterProp="label" optionFilterProp="label"
placeholder={`请选择${area.name}`} placeholder={`${$t('please.select')}${area.name}`}
onChange={val => getAddr(val, area.child)} onChange={val => getAddr(val, area.child)}
labelInValue labelInValue
allowClear allowClear
......
...@@ -49,7 +49,7 @@ const CustomerInfo = props => { ...@@ -49,7 +49,7 @@ const CustomerInfo = props => {
if (curren < item.endTime) { if (curren < item.endTime) {
valid = true; valid = true;
const name = meals[item.mealPeriodType]; const name = meals[item.mealPeriodType];
notification.error({ message: `${curName}起始时间不能早于${name}截止时间` }); notification.error({ message: `${curName}${$t('start.time.cannot.be.before')}${name}${$t('deadline')}` });
} }
}); });
return valid; return valid;
...@@ -145,7 +145,7 @@ const CustomerInfo = props => { ...@@ -145,7 +145,7 @@ const CustomerInfo = props => {
confirm({ confirm({
title: $t('risk.warning'), title: $t('risk.warning'),
icon: <ExclamationCircleOutlined />, icon: <ExclamationCircleOutlined />,
content: `确定关闭${mt}餐品类型?此餐品类型下关联的商户及商品将一并删除,不可逆请谨慎操作!`, content: `${$t('confirm.close')}${mt}${$t('delete.food.type.associated.merchantsproducts.will.be.permanently.deleted')}`,
onOk() { onOk() {
resolve(1); resolve(1);
}, },
...@@ -343,7 +343,7 @@ const CustomerInfo = props => { ...@@ -343,7 +343,7 @@ const CustomerInfo = props => {
{fields => ( {fields => (
<> <>
{Object.keys(meals).map(meal => ( {Object.keys(meals).map(meal => (
<Form.Item label={`${mealSections[meal]}订单`} required wrapperCol={{ span: 20 }}> <Form.Item label={`${mealSections[meal]}${$t('order')}`} required wrapperCol={{ span: 20 }}>
<Form.List <Form.List
name={`limit${meal}`} name={`limit${meal}`}
key={`${meal}limit`} key={`${meal}limit`}
......
...@@ -5,10 +5,10 @@ import { validateRequired, isCheckPriceTwoDecimal } from '@/utils/validator'; ...@@ -5,10 +5,10 @@ import { validateRequired, isCheckPriceTwoDecimal } from '@/utils/validator';
const MealLimit = props => ( const MealLimit = props => (
<Form.Item <Form.Item
label={`${props.label}限额`} label={`${props.label}${$t('quota')}`}
name={props.name} name={props.name}
rules={[ rules={[
{ validator: validateRequired, message: `请输入${props.label}限额` }, { validator: validateRequired, message: `${$t('please.enter')}${props.label}${$t('quota')}` },
{ validator: isCheckPriceTwoDecimal, message: $t('enter.valid.price') }, { validator: isCheckPriceTwoDecimal, message: $t('enter.valid.price') },
]} ]}
> >
......
...@@ -168,7 +168,7 @@ export function uploadPropsFn( ...@@ -168,7 +168,7 @@ export function uploadPropsFn(
return; return;
} }
if (that.state.businessInfo[keyName] && that.state.businessInfo[keyName].length >= limit) { if (that.state.businessInfo[keyName] && that.state.businessInfo[keyName].length >= limit) {
notification.error({ message: `最多只能上传${limit}个文件!` }); notification.error({ message: `${$t('max.upload.limit')}${limit}${$t('files')}` });
return; return;
} }
const res = await uploadFile([file], type); const res = await uploadFile([file], type);
...@@ -188,7 +188,7 @@ export function uploadPropsFn( ...@@ -188,7 +188,7 @@ export function uploadPropsFn(
if (imgList.length <= limit) { if (imgList.length <= limit) {
state.businessInfo[keyName] = imgList; state.businessInfo[keyName] = imgList;
} else { } else {
notification.error({ message: `最多只能上传${limit}个文件!` }); notification.error({ message: `${$t('max.upload.limit')}${limit}${$t('files')}` });
} }
return { return {
businessInfo: state.businessInfo, businessInfo: state.businessInfo,
...@@ -208,7 +208,7 @@ export function uploadPropsFn( ...@@ -208,7 +208,7 @@ export function uploadPropsFn(
if (flist.length + imgList.length > limit) { if (flist.length + imgList.length > limit) {
clearTimeout(timer); clearTimeout(timer);
timer = setTimeout(() => { timer = setTimeout(() => {
notification.error({ message: `最多只能上传${limit}个文件!` }); notification.error({ message: `${$t('max.upload.limit')}${limit}${$t('files')}` });
}, 100); }, 100);
return false; return false;
} }
......
...@@ -96,7 +96,7 @@ export default props => { ...@@ -96,7 +96,7 @@ export default props => {
const seconds = parseInt(timeNumber % 60) const seconds = parseInt(timeNumber % 60)
.toString() .toString()
.padStart(2, '0'); .padStart(2, '0');
const str = `${hours}${minutes}${seconds}`; const str = `${hours}${$t('hours')}${minutes}${$t('minutes')}${seconds}${$t('seconds')}`;
timeString[record.orderId] = str; timeString[record.orderId] = str;
const strings = _.cloneDeep(timeString); const strings = _.cloneDeep(timeString);
setTimeString(strings); setTimeString(strings);
......
...@@ -144,7 +144,7 @@ export default () => { ...@@ -144,7 +144,7 @@ export default () => {
const enable = +state === 1 ? 0 : 1; const enable = +state === 1 ? 0 : 1;
const res = await apiEnableStore({ id, state: enable }); const res = await apiEnableStore({ id, state: enable });
if (res === '0000') { if (res === '0000') {
notification.success({ message: `${state ? '禁用' : '启用'}` }); notification.success({ message: `${$t('completed')}${state ? '禁用' : '启用'}` });
onSearch(refSearch.current?.getFieldValue?.() || {}); onSearch(refSearch.current?.getFieldValue?.() || {});
} }
}; };
...@@ -344,7 +344,7 @@ export default () => { ...@@ -344,7 +344,7 @@ export default () => {
style={{ marginBottom: 10 }} style={{ marginBottom: 10 }}
onChange={onPageChange} onChange={onPageChange}
total={totalNum} total={totalNum}
showTotal={total => `共${total}条`} showTotal={total => `${$t('total')}${total}${$t('entries')}`}
current={pageNo} current={pageNo}
pageSize={pageSize} pageSize={pageSize}
showSizeChanger showSizeChanger
......
...@@ -37,7 +37,7 @@ const ImageInfo = file => ...@@ -37,7 +37,7 @@ const ImageInfo = file =>
new Promise((resolve, reject) => { new Promise((resolve, reject) => {
const LtMB = file.size / 1024 / 1024; const LtMB = file.size / 1024 / 1024;
if (LtMB > 2) { if (LtMB > 2) {
warningTip(`[${file.name}] 图片不可以大于2MB`); warningTip(`[${file.name}${$t('image.size.cannot.exceed.2mb')}`);
resolve(null); resolve(null);
} }
getBase64(file, url => { getBase64(file, url => {
...@@ -51,7 +51,7 @@ const ImageInfo = file => ...@@ -51,7 +51,7 @@ const ImageInfo = file =>
resolve(file); resolve(file);
}); });
image.addEventListener('error', () => { image.addEventListener('error', () => {
warningTip(`${file.name}图片上传失败!`); warningTip(`${file.name}${$t('image.upload.failed')}`);
resolve(null); resolve(null);
}); });
image.src = url; image.src = url;
...@@ -68,13 +68,13 @@ const isUploadNext = async (imgFileList, id) => { ...@@ -68,13 +68,13 @@ const isUploadNext = async (imgFileList, id) => {
const filterImage = imgFileList.filter(({ width, height, name }) => { const filterImage = imgFileList.filter(({ width, height, name }) => {
if (id === 'detailImageList') { if (id === 'detailImageList') {
if (width > DETAIL_IMG_MAX_WIDTH) { if (width > DETAIL_IMG_MAX_WIDTH) {
warningTip(`[${name}] 详情图宽度不可大于${DETAIL_IMG_MAX_WIDTH}`); warningTip(`[${name}${$t('detail.image.width.exceeds.limit')}${DETAIL_IMG_MAX_WIDTH}`);
return false; return false;
} }
return true; return true;
} }
if (width > LOOP_IMG_WIDTH_HEIGHT || height > LOOP_IMG_WIDTH_HEIGHT) { if (width > LOOP_IMG_WIDTH_HEIGHT || height > LOOP_IMG_WIDTH_HEIGHT) {
warningTip(`[${name}] 滑动图尺寸不可大于 ${LOOP_IMG_WIDTH_HEIGHT}*${LOOP_IMG_WIDTH_HEIGHT}`); warningTip(`[${name}${$t('slider.image.size.exceeds.limit')}${LOOP_IMG_WIDTH_HEIGHT}*${LOOP_IMG_WIDTH_HEIGHT}`);
return false; return false;
} }
return true; return true;
......
...@@ -68,7 +68,7 @@ export async function downOrder(params) { ...@@ -68,7 +68,7 @@ export async function downOrder(params) {
responseType: 'arrayBuffer', responseType: 'arrayBuffer',
}); });
const blob = new Blob([data]); const blob = new Blob([data]);
saveAs(blob, `商户订单列表-${format(new Date(), 'yyyyMMddHHmmss')}.xlsx`); saveAs(blob, `${$t('merchant.order.list')}${format(new Date(), 'yyyyMMddHHmmss')}.xlsx`);
} }
// 批量发货订单 // 批量发货订单
export async function queryToBatchSend(params) { export async function queryToBatchSend(params) {
...@@ -111,7 +111,7 @@ export async function downUploadeOrder(params) { ...@@ -111,7 +111,7 @@ export async function downUploadeOrder(params) {
1: $t('successful.data'), 1: $t('successful.data'),
2: $t('all.data'), 2: $t('all.data'),
}; };
saveAs(blob, `批量发货-${status[params.status]}-${format(new Date(), 'yyyyMMddHHmmss')}.xlsx`); saveAs(blob, `${$t('batch.shipping')}${status[params.status]}-${format(new Date(), 'yyyyMMddHHmmss')}.xlsx`);
} }
// 延迟发货 // 延迟发货
export function apiDelayDeliverGoods(data) { export function apiDelayDeliverGoods(data) {
......
...@@ -87,7 +87,7 @@ const DetailModal = (props, ref) => { ...@@ -87,7 +87,7 @@ const DetailModal = (props, ref) => {
{ {
title: $t('voucher.code'), title: $t('voucher.code'),
width: 150, width: 150,
render: (value, record, index) => `券码${index + 1}`, render: (value, record, index) => `${$t('coupon.code')}${index + 1}`,
}, },
{ {
title: $t('validity.period'), title: $t('validity.period'),
......
...@@ -456,7 +456,7 @@ const OrderList = props => { ...@@ -456,7 +456,7 @@ const OrderList = props => {
<Pagination <Pagination
onChange={onPageChange} onChange={onPageChange}
total={dataTotal} total={dataTotal}
showTotal={(total, range) => `第${range[0]}-${range[1]}条 /总共${total}条`} showTotal={(total, range) => `${$t('no')}${range[0]}-${range[1]}${$t('entries.total')}${total}${$t('entries')}`}
pageSize={pagination.pageSize} pageSize={pagination.pageSize}
current={pagination.pageNo} current={pagination.pageNo}
/> />
......
...@@ -166,7 +166,7 @@ const AddressForm = props => { ...@@ -166,7 +166,7 @@ const AddressForm = props => {
return ( return (
<Modal <Modal
title={`${formData.id ? '修改' : '增加'}售后地址`} title={`${formData.id ? '修改' : '增加'}${$t('aftersales.address')}`}
visible={visible} visible={visible}
onCancel={() => onCancel()} onCancel={() => onCancel()}
onOk={handleSubmit} onOk={handleSubmit}
...@@ -198,13 +198,13 @@ const AddressForm = props => { ...@@ -198,13 +198,13 @@ const AddressForm = props => {
rules: [ rules: [
{ {
required: area.required, required: area.required,
message: `请选择${area.name}!`, message: `${$t('please.select')}${area.name}!`,
}, },
], ],
})( })(
<Select <Select
showSearch showSearch
placeholder={`请选择${area.name}`} placeholder={`${$t('please.select')}${area.name}`}
onChange={val => getAddr(val, area.child)} onChange={val => getAddr(val, area.child)}
labelInValue labelInValue
allowClear allowClear
......
...@@ -55,7 +55,7 @@ export async function downDetail(params) { ...@@ -55,7 +55,7 @@ export async function downDetail(params) {
responseType: 'arrayBuffer', responseType: 'arrayBuffer',
}); });
const blob = new Blob([data]); const blob = new Blob([data]);
saveAs(blob, `对账明细-${format(new Date(), 'yyyyMMddHHmmss')}.xlsx`); saveAs(blob, `${$t('reconciliation.details')}${format(new Date(), 'yyyyMMddHHmmss')}.xlsx`);
} }
export async function detailQuery(params) { export async function detailQuery(params) {
......
...@@ -67,7 +67,7 @@ export async function download(params) { ...@@ -67,7 +67,7 @@ export async function download(params) {
responseType: 'arrayBuffer', responseType: 'arrayBuffer',
}); });
const blob = new Blob([data]); const blob = new Blob([data]);
saveAs(blob, `商户货款结算明细-${format(new Date(), 'yyyyMMddHHmmss')}.xlsx`); saveAs(blob, `${$t('merchant.settlement.details')}${format(new Date(), 'yyyyMMddHHmmss')}.xlsx`);
} }
// 附件信息 // 附件信息
export async function docQuery(settlementNo) { export async function docQuery(settlementNo) {
......
...@@ -38,7 +38,7 @@ const errorHandler = error => { ...@@ -38,7 +38,7 @@ const errorHandler = error => {
const errorText = codeMessage[response.status] || response.statusText; const errorText = codeMessage[response.status] || response.statusText;
const { status, url } = response; const { status, url } = response;
notification.error({ notification.error({
message: `请求错误 ${status}: ${url}`, message: `${$t('request.error')}${status}: ${url}`,
description: errorText, description: errorText,
}); });
} }
......
...@@ -96,11 +96,11 @@ export function checkMaxNumber(rule, value, callback) { ...@@ -96,11 +96,11 @@ export function checkMaxNumber(rule, value, callback) {
if (!value || value === 'undefined') { if (!value || value === 'undefined') {
callback(); callback();
} else if (rule.isInteger && !rsCheck) { } else if (rule.isInteger && !rsCheck) {
callback(new Error(`请输入[${rule.min}, ${rule.max}]之间的正整数`)); callback(new Error(`${$t('please.enter')}${rule.min}, ${rule.max}${$t('positive.integers.between')}`));
} else if (!Number(value)) { } else if (!Number(value)) {
callback(new Error(`请输入[${rule.min}, ${rule.max}]之间的数字`)); callback(new Error(`${$t('please.enter')}${rule.min}, ${rule.max}${$t('numbers.between')}`));
} else if (value < rule.min || value > rule.max) { } else if (value < rule.min || value > rule.max) {
callback(new Error(`请输入[${rule.min}, ${rule.max}]之间的数字`)); callback(new Error(`${$t('please.enter')}${rule.min}, ${rule.max}${$t('numbers.between')}`));
} else { } else {
callback(); callback();
} }
...@@ -184,7 +184,7 @@ export const isNumberSection = (rule, value, callback) => { ...@@ -184,7 +184,7 @@ export const isNumberSection = (rule, value, callback) => {
if (!Number(value)) { if (!Number(value)) {
callback(new Error($t('numbers.required'))); callback(new Error($t('numbers.required')));
} else if (rule.min > +value || rule.max < +value) { } else if (rule.min > +value || rule.max < +value) {
callback(new Error(rule.message || `请输入${rule.min}-${rule.max}区间的数字`)); callback(new Error(rule.message || `${$t('please.enter')}${rule.min}-${rule.max}${$t('number.in.range')}`));
} else { } else {
callback(); callback();
} }
......
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