Commit 2cc20476 authored by 孙 楠's avatar 孙 楠

add i18n messages

parent 57cf31c7
...@@ -86,7 +86,7 @@ export default { ...@@ -86,7 +86,7 @@ export default {
{ {
path: '/', path: '/',
component: '../layouts/SecurityLayout', component: '../layouts/SecurityLayout',
title: '商户管理后台', title: $t('merchant.admin'),
routes: [ routes: [
{ {
path: '/', path: '/',
...@@ -94,107 +94,107 @@ export default { ...@@ -94,107 +94,107 @@ export default {
authority: ['Admin', 'user'], authority: ['Admin', 'user'],
routes: [ routes: [
{ {
title: '首页', title: $t('home'),
path: '/', path: '/',
component: './Admin', component: './Admin',
}, },
{ {
title: '商户管理后台', title: $t('merchant.admin'),
path: '/orderManage/queryOrder', path: '/orderManage/queryOrder',
name: 'queryOrder', name: 'queryOrder',
component: './orderManage/queryOrder', component: './orderManage/queryOrder',
}, },
{ {
title: '商户管理后台', title: $t('merchant.admin'),
path: '/orderManage/pendingDeliveryOrder', path: '/orderManage/pendingDeliveryOrder',
name: 'pendingDeliveryOrder', name: 'pendingDeliveryOrder',
component: './orderManage/pendingDeliveryOrder', component: './orderManage/pendingDeliveryOrder',
}, },
{ {
title: '商户管理后台', title: $t('merchant.admin'),
path: '/orderManage/deliveryOrder', path: '/orderManage/deliveryOrder',
name: 'deliveryOrder', name: 'deliveryOrder',
component: './orderManage/deliveryOrder', component: './orderManage/deliveryOrder',
}, },
{ {
title: '商户管理后台', title: $t('merchant.admin'),
path: '/orderManage/batchDelivery', path: '/orderManage/batchDelivery',
name: 'batchDeliveryOrder', name: 'batchDeliveryOrder',
component: './orderManage/batchDelivery', component: './orderManage/batchDelivery',
}, },
{ {
title: '商户管理后台', title: $t('merchant.admin'),
path: '/afterSaleAddress', path: '/afterSaleAddress',
name: 'afterSaleAddress', name: 'afterSaleAddress',
component: './afterSaleAddress', component: './afterSaleAddress',
}, },
{ {
title: '商户管理后台', title: $t('merchant.admin'),
path: '/reconciliation', path: '/reconciliation',
name: 'reconciliation', name: 'reconciliation',
component: './reconciliation', component: './reconciliation',
}, },
{ {
title: '商户管理后台', title: $t('merchant.admin'),
path: '/reconciliation/detail', path: '/reconciliation/detail',
name: 'reconciliationDetail', name: 'reconciliationDetail',
component: './reconciliation/detail/index', component: './reconciliation/detail/index',
}, },
{ {
title: '商户管理后台', title: $t('merchant.admin'),
path: '/settleManage', path: '/settleManage',
name: 'settleManage', name: 'settleManage',
component: './settleManage', component: './settleManage',
}, },
{ {
title: '商户管理后台', title: $t('merchant.admin'),
path: '/afterSaleManage', path: '/afterSaleManage',
name: 'afterSaleManage', name: 'afterSaleManage',
icon: 'smile', icon: 'smile',
component: './AfterSaleManage/index', component: './AfterSaleManage/index',
}, },
{ {
title: '商户管理后台', title: $t('merchant.admin'),
path: '/afterSalesClaimForm', path: '/afterSalesClaimForm',
name: 'afterSalesClaimForm', name: 'afterSalesClaimForm',
icon: 'smile', icon: 'smile',
component: './AfterSalesClaimForm/index', component: './AfterSalesClaimForm/index',
}, },
{ {
title: '商户管理后台', title: $t('merchant.admin'),
path: '/afterSaleManageOld', path: '/afterSaleManageOld',
name: 'afterSaleManageOld', name: 'afterSaleManageOld',
icon: 'smile', icon: 'smile',
component: './AfterSaleManageOld/index', component: './AfterSaleManageOld/index',
}, },
{ {
title: '商户管理后台', title: $t('merchant.admin'),
path: '/auditPending', path: '/auditPending',
name: 'auditPending', name: 'auditPending',
icon: 'smile', icon: 'smile',
component: './AfterSaleManageOld/Pending', component: './AfterSaleManageOld/Pending',
}, },
{ {
title: '商户管理后台', title: $t('merchant.admin'),
path: '/passAudit', path: '/passAudit',
name: 'passAudit', name: 'passAudit',
icon: 'smile', icon: 'smile',
component: './AfterSaleManageOld/PassAudit', component: './AfterSaleManageOld/PassAudit',
}, },
{ {
title: '商户管理后台', title: $t('merchant.admin'),
path: '/appeal', path: '/appeal',
name: 'appeal', name: 'appeal',
component: './afterSale/appeal', component: './afterSale/appeal',
}, },
{ {
title: '商户管理后台', title: $t('merchant.admin'),
path: '/cancelBillManage', path: '/cancelBillManage',
name: 'cancelBillManage', name: 'cancelBillManage',
component: './cancelBillManage', component: './cancelBillManage',
}, },
{ {
title: '商户管理后台', title: $t('merchant.admin'),
path: '/goodsManage', path: '/goodsManage',
name: 'goodsManage', name: 'goodsManage',
icon: 'smile', icon: 'smile',
...@@ -207,21 +207,21 @@ export default { ...@@ -207,21 +207,21 @@ export default {
component: './distributionArea', component: './distributionArea',
}, },
{ {
title: '商户管理后台', title: $t('merchant.admin'),
path: '/reconciliationQuery', path: '/reconciliationQuery',
name: 'reconciliationQuery', name: 'reconciliationQuery',
icon: 'smile', icon: 'smile',
component: './ReconciliationQuery', component: './ReconciliationQuery',
}, },
{ {
title: '商户管理后台', title: $t('merchant.admin'),
path: '/settlementSheet', path: '/settlementSheet',
name: 'settlementSheet', name: 'settlementSheet',
icon: 'smile', icon: 'smile',
component: './SettlementSheet', component: './SettlementSheet',
}, },
{ {
title: '商户管理后台', title: $t('merchant.admin'),
path: '/paymentMange', path: '/paymentMange',
name: 'paymentMange', name: 'paymentMange',
icon: 'smile', icon: 'smile',
...@@ -245,61 +245,61 @@ export default { ...@@ -245,61 +245,61 @@ export default {
// component: './GoodsManage-new', // component: './GoodsManage-new',
// }, // },
{ {
title: '服务商品改造-商品模块', title: $t('service.product.revampmodule'),
path: '/ServiceGoods/:id', path: '/ServiceGoods/:id',
name: 'ServiceGoods', name: 'ServiceGoods',
component: './ServiceGoods/index', component: './ServiceGoods/index',
}, },
{ {
title: '商户管理后台-账号管理', title: $t('merchant.admin.account.management'),
path: '/systemManage/account', path: '/systemManage/account',
name: 'systemManageAccount', name: 'systemManageAccount',
component: './systemManage/Account', component: './systemManage/Account',
}, },
{ {
title: '商户管理后台-账号管理-用户信息', title: $t('merchant.admin.user.info'),
path: '/systemManage/account/userInfo', path: '/systemManage/account/userInfo',
name: 'accountUserInfo', name: 'accountUserInfo',
component: './systemManage/Account/UserInfo', component: './systemManage/Account/UserInfo',
}, },
{ {
title: '商户管理后台-角色管理', title: $t('merchant.admin.role.management'),
path: '/systemManage/role', path: '/systemManage/role',
name: 'systemManageRole', name: 'systemManageRole',
component: './systemManage/Role', component: './systemManage/Role',
}, },
{ {
title: '商户管理后台-角色管理-角色信息', title: $t('merchant.admin.role.info'),
path: '/systemManage/role/roleInfo', path: '/systemManage/role/roleInfo',
name: 'roleInfo', name: 'roleInfo',
component: './systemManage/Role/RoleInfo', component: './systemManage/Role/RoleInfo',
}, },
{ {
title: '商户管理后台-日志管理', title: $t('merchant.admin.logs'),
path: '/systemManage/log', path: '/systemManage/log',
name: 'systemManageLog', name: 'systemManageLog',
component: './systemManage/Log', component: './systemManage/Log',
}, },
{ {
title: '商户管理后台-合同查看', title: $t('merchant.admin.contract.view'),
path: '/contractView', path: '/contractView',
name: 'contractView', name: 'contractView',
component: './contractView', component: './contractView',
}, },
{ {
title: '商户管理后台-商家资料', title: $t('merchant.admin.merchant.profile'),
path: '/businessInfo', path: '/businessInfo',
name: 'businessInfo', name: 'businessInfo',
component: './businessManage/info', component: './businessManage/info',
}, },
{ {
title: '商户管理后台-品牌管理', title: $t('merchant.admin.brand.management'),
path: '/brandManage', path: '/brandManage',
name: 'brandManage', name: 'brandManage',
component: './BrandManage', component: './BrandManage',
}, },
{ {
title: '商户管理后台-自营商品供货价更新', title: $t('merchant.admin.selfoperated.product.price.update'),
path: '/supplyPriceUpdate', path: '/supplyPriceUpdate',
name: 'supplyPriceUpdate', name: 'supplyPriceUpdate',
component: './GoodsManage/SupplyPriceUpdate', component: './GoodsManage/SupplyPriceUpdate',
...@@ -307,25 +307,25 @@ export default { ...@@ -307,25 +307,25 @@ export default {
...groupMealRoute, ...groupMealRoute,
// ↓↓↓↓↓↓应付审计用的,假的,没有实际用处↓↓↓↓↓↓↓ // ↓↓↓↓↓↓应付审计用的,假的,没有实际用处↓↓↓↓↓↓↓
{ {
title: '商户管理后台-订单管理-待发货订单', title: $t('merchant.admin.pending.shipments'),
path: '/popOrderManage/popPendingDeliveryOrder', path: '/popOrderManage/popPendingDeliveryOrder',
name: 'popPendingDeliveryOrder', name: 'popPendingDeliveryOrder',
component: './PopOrderManage/pendingDeliveryOrder', component: './PopOrderManage/pendingDeliveryOrder',
}, },
{ {
title: '商户管理后台-订单管理-已发货订单', title: $t('merchant.admin.shipped.orders'),
path: '/popOrderManage/popDeliveryOrder', path: '/popOrderManage/popDeliveryOrder',
name: 'popDeliveryOrder', name: 'popDeliveryOrder',
component: './PopOrderManage/deliveryOrder', component: './PopOrderManage/deliveryOrder',
}, },
{ {
title: '商户管理后台-订单管理-批量发货', title: $t('merchant.admin.batch.shipping'),
path: '/popOrderManage/popBatchDelivery', path: '/popOrderManage/popBatchDelivery',
name: 'popBatchDeliveryOrder', name: 'popBatchDeliveryOrder',
component: './PopOrderManage/batchDelivery', component: './PopOrderManage/batchDelivery',
}, },
{ {
title: '商户管理后台-商品管理-商品库', title: $t('merchant.admin.product.inventory'),
path: '/popGoodsManage', path: '/popGoodsManage',
name: 'popGoodsManage', name: 'popGoodsManage',
icon: 'smile', icon: 'smile',
......
export default [ export default [
{ {
title: '商户管理后台-企业团餐-企业客户', title: $t('merchant.admin.group.meal.clients'),
path: '/businessCustomer', path: '/businessCustomer',
name: 'BusinessCustomer', name: 'BusinessCustomer',
component: './businessCustomer/index', component: './businessCustomer/index',
}, },
{ {
title: '商户管理后台-企业团餐-外卖商品', title: $t('merchant.admin.group.meal.takeaway.products'),
path: '/takeawayGoods', path: '/takeawayGoods',
name: 'TakeawayGoods', name: 'TakeawayGoods',
component: './businessGoods/takeawayGoods', component: './businessGoods/takeawayGoods',
}, },
{ {
title: '商户管理后台-企业团餐-外卖商品-添加商品', title: $t('merchant.admin.group.meal.add.takeaway.product'),
path: '/takeawayGoodsInfo', path: '/takeawayGoodsInfo',
name: 'TakeawayGoodsInfo', name: 'TakeawayGoodsInfo',
component: './businessGoods/takeawayGoodsInfo', component: './businessGoods/takeawayGoodsInfo',
}, },
{ {
title: '商户管理后台-企业团餐-虚拟商品', title: $t('merchant.admin.group.meal.virtual.products'),
path: '/virtualGoods', path: '/virtualGoods',
name: 'VirtualGoods', name: 'VirtualGoods',
component: './businessGoods/virtualGoods', component: './businessGoods/virtualGoods',
}, },
{ {
title: '商户管理后台-企业团餐-虚拟商品-添加商品', title: $t('merchant.admin.group.meal.add.virtual.product'),
path: '/virtualGoodsInfo', path: '/virtualGoodsInfo',
name: 'VirtualGoodsInfo', name: 'VirtualGoodsInfo',
component: './businessGoods/virtualGoodsInfo', component: './businessGoods/virtualGoodsInfo',
}, },
{ {
title: '商户管理后台-企业团餐-企业店铺管理', title: $t('merchant.admin.group.meal.store.management'),
path: '/StoreManagement', path: '/StoreManagement',
name: 'StoreManagement', name: 'StoreManagement',
component: './StoreManagement', component: './StoreManagement',
}, },
{ {
title: '商户管理后台-企业团餐-企业员工管理', title: $t('merchant.admin.group.meal.employee.management'),
path: '/EmployeeManagement', path: '/EmployeeManagement',
name: 'EmployeeManagement', name: 'EmployeeManagement',
component: './EmployeeManagement', component: './EmployeeManagement',
}, },
{ {
title: '商户管理后台-企业团餐-外卖商品(示例)', title: $t('merchant.admin.group.meal.takeaway.samples'),
path: '/takeawayGoodsExample', path: '/takeawayGoodsExample',
name: 'TakeawayGoodsExample', name: 'TakeawayGoodsExample',
component: '../example/proTable', component: '../example/proTable',
......
...@@ -3,21 +3,21 @@ const getNotices = (req, res) => { ...@@ -3,21 +3,21 @@ const getNotices = (req, res) => {
{ {
id: '000000001', id: '000000001',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png', avatar: 'https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png',
title: '你收到了 14 份新周报', title: $t('you.have.14.new.weekly.reports'),
datetime: '2017-08-09', datetime: '2017-08-09',
type: 'notification', type: 'notification',
}, },
{ {
id: '000000002', id: '000000002',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/OKJXDXrmkNshAMvwtvhu.png', avatar: 'https://gw.alipayobjects.com/zos/rmsportal/OKJXDXrmkNshAMvwtvhu.png',
title: '你推荐的 曲妮妮 已通过第三轮面试', title: $t('recommended.candidate.qu.nini.passed.3rd.interview'),
datetime: '2017-08-08', datetime: '2017-08-08',
type: 'notification', type: 'notification',
}, },
{ {
id: '000000003', id: '000000003',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/kISTdvpyTAhtGxpovNWd.png', avatar: 'https://gw.alipayobjects.com/zos/rmsportal/kISTdvpyTAhtGxpovNWd.png',
title: '这种模板可以区分多种通知类型', title: $t('multinotification.template'),
datetime: '2017-08-07', datetime: '2017-08-07',
read: true, read: true,
type: 'notification', type: 'notification',
...@@ -25,22 +25,22 @@ const getNotices = (req, res) => { ...@@ -25,22 +25,22 @@ const getNotices = (req, res) => {
{ {
id: '000000004', id: '000000004',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/GvqBnKhFgObvnSGkDsje.png', avatar: 'https://gw.alipayobjects.com/zos/rmsportal/GvqBnKhFgObvnSGkDsje.png',
title: '左侧图标用于区分不同的类型', title: $t('left.icon.distinguishes.types'),
datetime: '2017-08-07', datetime: '2017-08-07',
type: 'notification', type: 'notification',
}, },
{ {
id: '000000005', id: '000000005',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png', avatar: 'https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png',
title: '内容不要超过两行字,超出时自动截断', title: $t('max.2.lines.autotruncated'),
datetime: '2017-08-07', datetime: '2017-08-07',
type: 'notification', type: 'notification',
}, },
{ {
id: '000000006', id: '000000006',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/fcHMVNCjPOsbUGdEduuv.jpeg', avatar: 'https://gw.alipayobjects.com/zos/rmsportal/fcHMVNCjPOsbUGdEduuv.jpeg',
title: '曲丽丽 评论了你', title: $t('qu.lili.commented.on.you'),
description: '描述信息描述信息描述信息', description: $t('description.details'),
datetime: '2017-08-07', datetime: '2017-08-07',
type: 'message', type: 'message',
clickClose: true, clickClose: true,
...@@ -48,8 +48,8 @@ const getNotices = (req, res) => { ...@@ -48,8 +48,8 @@ const getNotices = (req, res) => {
{ {
id: '000000007', id: '000000007',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/fcHMVNCjPOsbUGdEduuv.jpeg', avatar: 'https://gw.alipayobjects.com/zos/rmsportal/fcHMVNCjPOsbUGdEduuv.jpeg',
title: '朱偏右 回复了你', title: $t('zhu.pianyou.replied.to.you'),
description: '这种模板用于提醒谁与你发生了互动,左侧放『谁』的头像', description: $t('interaction.reminder.template'),
datetime: '2017-08-07', datetime: '2017-08-07',
type: 'message', type: 'message',
clickClose: true, clickClose: true,
...@@ -57,41 +57,41 @@ const getNotices = (req, res) => { ...@@ -57,41 +57,41 @@ const getNotices = (req, res) => {
{ {
id: '000000008', id: '000000008',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/fcHMVNCjPOsbUGdEduuv.jpeg', avatar: 'https://gw.alipayobjects.com/zos/rmsportal/fcHMVNCjPOsbUGdEduuv.jpeg',
title: '标题', title: $t('title'),
description: '这种模板用于提醒谁与你发生了互动,左侧放『谁』的头像', description: $t('interaction.reminder.template'),
datetime: '2017-08-07', datetime: '2017-08-07',
type: 'message', type: 'message',
clickClose: true, clickClose: true,
}, },
{ {
id: '000000009', id: '000000009',
title: '任务名称', title: $t('task.name'),
description: '任务需要在 2017-01-12 20:00 前启动', description: $t('task.must.start.by.20170112.2000'),
extra: '未开始', extra: $t('not.started'),
status: 'todo', status: 'todo',
type: 'event', type: 'event',
}, },
{ {
id: '000000010', id: '000000010',
title: '第三方紧急代码变更', title: $t('emergency.thirdparty.code.change'),
description: '冠霖提交于 2017-01-06,需在 2017-01-07 前完成代码变更任务', description: $t('guanlin.submitted.20170106.due.20170107'),
extra: '马上到期', extra: $t('expiring.soon'),
status: 'urgent', status: 'urgent',
type: 'event', type: 'event',
}, },
{ {
id: '000000011', id: '000000011',
title: '信息安全考试', title: $t('information.security.test'),
description: '指派竹尔于 2017-01-09 前完成更新并发布', description: $t('assign.to.zhuer.by.20170109'),
extra: '已耗时 8 天', extra: $t('8.days.elapsed'),
status: 'doing', status: 'doing',
type: 'event', type: 'event',
}, },
{ {
id: '000000012', id: '000000012',
title: 'ABCD 版本发布', title: $t('abcd.version.released'),
description: '冠霖提交于 2017-01-06,需在 2017-01-07 前完成代码变更任务', description: $t('guanlin.submitted.20170106.due.20170107'),
extra: '进行中', extra: $t('in.progress'),
status: 'processing', status: 'processing',
type: 'event', type: 'event',
}, },
......
...@@ -2,12 +2,12 @@ export default { ...@@ -2,12 +2,12 @@ export default {
'/api/auth_routes': [ '/api/auth_routes': [
{ {
path: '/orderManage', path: '/orderManage',
name: '订单管理', name: $t('order.management'),
icon: 'smile', icon: 'smile',
children: [ children: [
{ {
path: '/orderManage/pendingDeliveryOrder', path: '/orderManage/pendingDeliveryOrder',
name: '待发货订单', name: $t('pending.orders'),
}, },
], ],
}, },
......
...@@ -9,33 +9,33 @@ export default { ...@@ -9,33 +9,33 @@ export default {
avatar: 'https://gw.alipayobjects.com/zos/antfincdn/XAosXuNZyF/BiazfanxmamNRoxxVxka.png', avatar: 'https://gw.alipayobjects.com/zos/antfincdn/XAosXuNZyF/BiazfanxmamNRoxxVxka.png',
userid: '00000001', userid: '00000001',
email: 'antdesign@alipay.com', email: 'antdesign@alipay.com',
signature: '海纳百川,有容乃大', signature: $t('inclusion.leads.to.greatness'),
title: '交互专家', title: $t('interaction.expert'),
group: '蚂蚁金服-某某某事业群-某某平台部-某某技术部-UED', group: $t('ant.group.xxx.business.unit.yyy.platform.zzz.tech.ued'),
tags: [ tags: [
{ {
key: '0', key: '0',
label: '很有想法的', label: $t('creative'),
}, },
{ {
key: '1', key: '1',
label: '专注设计', label: $t('design.focused'),
}, },
{ {
key: '2', key: '2',
label: '辣~', label: $t('spicy'),
}, },
{ {
key: '3', key: '3',
label: '大长腿', label: $t('long.legs'),
}, },
{ {
key: '4', key: '4',
label: '川妹子', label: $t('sichuan.girl'),
}, },
{ {
key: '5', key: '5',
label: '海纳百川', label: $t('all.rivers.run.into.sea'),
}, },
], ],
notifyCount: 12, notifyCount: 12,
...@@ -43,15 +43,15 @@ export default { ...@@ -43,15 +43,15 @@ export default {
country: 'China', country: 'China',
geographic: { geographic: {
province: { province: {
label: '浙江省', label: $t('zhejiang.province'),
key: '330000', key: '330000',
}, },
city: { city: {
label: '杭州市', label: $t('hangzhou'),
key: '330100', key: '330100',
}, },
}, },
address: '西湖区工专路 77 号', address: $t('77.gongzhuan.rd.xihu.district'),
phone: '0752-268888888', phone: '0752-268888888',
}, },
// GET POST 可省略 // GET POST 可省略
...@@ -151,11 +151,11 @@ export default { ...@@ -151,11 +151,11 @@ export default {
data: { data: {
content: [{ content: [{
orderNo: '123', orderNo: '123',
skuSource: '中联', skuSource: $t('zhonglian'),
payTime: '2020-10-20', payTime: '2020-10-20',
receiverName: '郝聪敏', receiverName: $t('hao.congmin'),
receiverPhone: '13718672532', receiverPhone: '13718672532',
receiveAddress: '北京市房山区', receiveAddress: $t('beijing.fangshan.district'),
status: '1' status: '1'
}] }]
} }
......
...@@ -24,7 +24,7 @@ if (process.env.SENTRY_ENV !== 'prod' && process.env.NODE_ENV === 'production') ...@@ -24,7 +24,7 @@ if (process.env.SENTRY_ENV !== 'prod' && process.env.NODE_ENV === 'production')
}); });
}); });
} catch (e) { } catch (e) {
console.log('Sentry无法加载', e); console.log($t('sentry.failed.to.load'), e);
} }
} }
......
...@@ -30,14 +30,14 @@ export default props => { ...@@ -30,14 +30,14 @@ export default props => {
return ( return (
<Modal <Modal
title="门店信息" title={$t('store.info')}
visible={visible} visible={visible}
width="800px" width="800px"
onOk={() => handleOk()} onOk={() => handleOk()}
onCancel={() => handleCancle()} onCancel={() => handleCancle()}
> >
<div style={{ marginBottom: '20px' }}> <div style={{ marginBottom: '20px' }}>
<Input value={lnglatText} placeholder="点击地图选择经纬度" /> <Input value={lnglatText} placeholder={$t('click.map.for.coordinates')} />
</div> </div>
<div style={{ width: '100%', height: '360px' }}> <div style={{ width: '100%', height: '360px' }}>
<Map <Map
......
...@@ -57,7 +57,7 @@ export default connect(({ routing }) => ({ ...@@ -57,7 +57,7 @@ export default connect(({ routing }) => ({
const divDom = useRef(null); const divDom = useRef(null);
return ( return (
<Popover <Popover
title="下载此页面到本地项目" title={$t('download.this.page.locally')}
placement="topLeft" placement="topLeft"
content={<BlockCodeView url={url} />} content={<BlockCodeView url={url} />}
trigger="click" trigger="click"
......
...@@ -50,7 +50,7 @@ const CustomSelect = props => { ...@@ -50,7 +50,7 @@ const CustomSelect = props => {
<Space className={styles.SelectSpace}> <Space className={styles.SelectSpace}>
<Input <Input
className={styles.SelectInput} className={styles.SelectInput}
placeholder="请输入自定义属性" placeholder={$t('enter.custom.attribute')}
ref={inputRef} ref={inputRef}
value={name} value={name}
maxLength={30} maxLength={30}
......
...@@ -50,7 +50,7 @@ const FormSearch = props => { ...@@ -50,7 +50,7 @@ const FormSearch = props => {
column, column,
} = config; } = config;
const attrs = { placeholder: '请选择', ...originOptions }; const attrs = { placeholder: $t('select'), ...originOptions };
// 提取公共部分 // 提取公共部分
const BaseSelectElement = () => ( const BaseSelectElement = () => (
<FormItemBox {...config}> <FormItemBox {...config}>
...@@ -83,7 +83,7 @@ const FormSearch = props => { ...@@ -83,7 +83,7 @@ const FormSearch = props => {
// 选择日期范围类型 // 选择日期范围类型
const FormItemRangePicker = config => { const FormItemRangePicker = config => {
const { originOptions = {}, bindKey, limit } = config; const { originOptions = {}, bindKey, limit } = config;
const attrs = { placeholder: ['开始日期', '结束日期'], ...originOptions }; const attrs = { placeholder: [$t('start.date'), $t('end.date')], ...originOptions };
// 自动截取日期限制的范围 // 自动截取日期限制的范围
const onOpenChange = open => { const onOpenChange = open => {
...@@ -116,7 +116,7 @@ const FormSearch = props => { ...@@ -116,7 +116,7 @@ const FormSearch = props => {
// 选择日期 // 选择日期
const FormItemDatePicker = config => { const FormItemDatePicker = config => {
const { originOptions = {} } = config; const { originOptions = {} } = config;
const attrs = { placeholder: '请选择日期', ...originOptions }; const attrs = { placeholder: $t('select.date'), ...originOptions };
return ( return (
<FormItemBox {...config}> <FormItemBox {...config}>
<DatePicker className={style['form-item-tag']} {...attrs} /> <DatePicker className={style['form-item-tag']} {...attrs} />
...@@ -129,7 +129,7 @@ const FormSearch = props => { ...@@ -129,7 +129,7 @@ const FormSearch = props => {
// 输入框类型 // 输入框类型
const FormItemInput = config => { const FormItemInput = config => {
const { originOptions = {} } = config; const { originOptions = {} } = config;
const attrs = { placeholder: '请输入', allowClear: true, ...originOptions }; const attrs = { placeholder: $t('input.required'), allowClear: true, ...originOptions };
return ( return (
<FormItemBox {...config}> <FormItemBox {...config}>
<Input className={style['form-item-tag']} {...attrs} /> <Input className={style['form-item-tag']} {...attrs} />
......
...@@ -30,7 +30,7 @@ export default props => { ...@@ -30,7 +30,7 @@ export default props => {
} }
window.AMap.plugin(['AMap.Geocoder'], () => { window.AMap.plugin(['AMap.Geocoder'], () => {
const city = addrInfo.provice || '北京市'; const city = addrInfo.provice || $t('beijing');
const geocoder = new window.AMap.Geocoder({ const geocoder = new window.AMap.Geocoder({
city, city,
}); });
...@@ -40,7 +40,7 @@ export default props => { ...@@ -40,7 +40,7 @@ export default props => {
setLnglat([lng, lat]); setLnglat([lng, lat]);
setLnglatText(`${lng},${lat}`); setLnglatText(`${lng},${lat}`);
} else { } else {
console.error('根据地址查询位置失败'); console.error($t('failed.to.locate.address'));
// setLnglat([116.397561,39.909063]) // setLnglat([116.397561,39.909063])
} }
}); });
...@@ -53,14 +53,14 @@ export default props => { ...@@ -53,14 +53,14 @@ export default props => {
return ( return (
<Modal <Modal
title="门店信息" title={$t('store.info')}
visible={visible} visible={visible}
width="800px" width="800px"
onOk={() => handleOk()} onOk={() => handleOk()}
onCancel={() => onCancel(true)} onCancel={() => onCancel(true)}
> >
<div style={{ marginBottom: '20px' }}> <div style={{ marginBottom: '20px' }}>
<Input value={lnglatText} placeholder="点击地图选择经纬度" /> <Input value={lnglatText} placeholder={$t('click.map.for.coordinates')} />
</div> </div>
<div style={{ width: '100%', height: '360px' }}> <div style={{ width: '100%', height: '360px' }}>
<Map <Map
......
...@@ -40,33 +40,25 @@ class AvatarDropdown extends React.Component { ...@@ -40,33 +40,25 @@ class AvatarDropdown extends React.Component {
} = this.props; } = this.props;
const platform = { const platform = {
560761: '咩咩自营', 560761: $t('miemie.direct.sales'),
1000020: '吉集优品', 1000020: $t('jijiyoupin'),
}; };
const menuHeaderDropdown = ( const menuHeaderDropdown = (
<Menu className={styles.menu} selectedKeys={[]} onClick={this.onMenuClick}> <Menu className={styles.menu} selectedKeys={[]} onClick={this.onMenuClick}>
{menu && ( {menu && (
<Menu.Item key="center"> <Menu.Item key="center">
<UserOutlined /> <UserOutlined />{$t('personal.center')}</Menu.Item>
个人中心
</Menu.Item>
)} )}
{menu && ( {menu && (
<Menu.Item key="settings"> <Menu.Item key="settings">
<SettingOutlined /> <SettingOutlined />{$t('personal.settings')}</Menu.Item>
个人设置
</Menu.Item>
)} )}
{menu && <Menu.Divider />} {menu && <Menu.Divider />}
<Menu.Item key="password"> <Menu.Item key="password">
<EditOutlined /> <EditOutlined />{$t('change.password')}</Menu.Item>
修改密码
</Menu.Item>
<Menu.Item key="logout"> <Menu.Item key="logout">
<LogoutOutlined /> <LogoutOutlined />{$t('log.out')}</Menu.Item>
退出登录
</Menu.Item>
</Menu> </Menu>
); );
return currentUser && currentUser.name ? ( return currentUser && currentUser.name ? (
......
...@@ -31,7 +31,7 @@ class GlobalHeaderRight extends Component { ...@@ -31,7 +31,7 @@ class GlobalHeaderRight extends Component {
handleNoticeClear = (title, key) => { handleNoticeClear = (title, key) => {
const { dispatch } = this.props; const { dispatch } = this.props;
message.success(`${'清空了'} ${title}`); message.success(`${$t('cleared')} ${title}`);
if (dispatch) { if (dispatch) {
dispatch({ dispatch({
...@@ -111,8 +111,8 @@ class GlobalHeaderRight extends Component { ...@@ -111,8 +111,8 @@ class GlobalHeaderRight extends Component {
this.changeReadState(item); this.changeReadState(item);
}} }}
loading={fetchingNotices} loading={fetchingNotices}
clearText="清空" clearText={$t('clear')}
viewMoreText="查看更多" viewMoreText={$t('view.more')}
onClear={this.handleNoticeClear} onClear={this.handleNoticeClear}
onPopupVisibleChange={onNoticeVisibleChange} onPopupVisibleChange={onNoticeVisibleChange}
onViewMore={() => message.info('Click on view more')} onViewMore={() => message.info('Click on view more')}
...@@ -122,22 +122,22 @@ class GlobalHeaderRight extends Component { ...@@ -122,22 +122,22 @@ class GlobalHeaderRight extends Component {
tabKey="notification" tabKey="notification"
count={unreadMsg.notification} count={unreadMsg.notification}
list={noticeData.notification} list={noticeData.notification}
title="通知" title={$t('notification')}
emptyText="你已查看所有通知" emptyText={$t('all.notifications.viewed')}
showViewMore showViewMore
/> />
<NoticeIcon.Tab <NoticeIcon.Tab
tabKey="message" tabKey="message"
count={unreadMsg.message} count={unreadMsg.message}
list={noticeData.message} list={noticeData.message}
title="消息" title={$t('message')}
emptyText="您已读完所有消息" emptyText={$t('all.messages.read')}
showViewMore showViewMore
/> />
<NoticeIcon.Tab <NoticeIcon.Tab
tabKey="event" tabKey="event"
title="待办" title={$t('todo')}
emptyText="你已完成所有待办" emptyText={$t('all.tasks.completed')}
count={unreadMsg.event} count={unreadMsg.event}
list={noticeData.event} list={noticeData.event}
showViewMore showViewMore
......
...@@ -43,8 +43,7 @@ const ImportListModal = props => { ...@@ -43,8 +43,7 @@ const ImportListModal = props => {
return ( return (
<Modal <Modal
title={ title={
<div> <div>{$t('view.import.history')}<span className={styles.subTitle}>{$t('last.6.months.only')}</span>
查看导入记录<span className={styles.subTitle}>(仅展示近半年记录)</span>
</div> </div>
} }
open={visible} open={visible}
...@@ -59,21 +58,19 @@ const ImportListModal = props => { ...@@ -59,21 +58,19 @@ const ImportListModal = props => {
<div className={styles.card} key={item.id}> <div className={styles.card} key={item.id}>
<div> <div>
<div className={styles.top}> <div className={styles.top}>
<span>导入数据:{item.total}</span> <span>{$t('imported.data')}{item.total}</span>
<span>成功数:{item.successCount}</span> <span>{$t('successful')}{item.successCount}</span>
<span>失败数:{item.failedCount}</span> <span>{$t('failed')}{item.failedCount}</span>
</div> </div>
<div> <div>
<span>导入时间:{item.createdAt}</span> <span>{$t('import.time')}{item.createdAt}</span>
<span>操作人:{item.createdBy}</span> <span>{$t('operator')}{item.createdBy}</span>
</div> </div>
</div> </div>
<div className={styles.errWrappper}> <div className={styles.errWrappper}>
{item.failedCount > 0 && ( {item.failedCount > 0 && (
<Button type="primary" onClick={() => onDownload(item.failedFileUrl)}> <Button type="primary" onClick={() => onDownload(item.failedFileUrl)}>
<DownloadOutlined /> <DownloadOutlined />{$t('download.error.data')}</Button>
下载错误数据
</Button>
)} )}
{item.status && +item.status.code === 3 && ( {item.status && +item.status.code === 3 && (
<div className={styles.errorMessage}>{item.failedMessage}</div> <div className={styles.errorMessage}>{item.failedMessage}</div>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
export const ImportConfig = { export const ImportConfig = {
// 竞价商品批量选品 // 竞价商品批量选品
binding: { binding: {
title: '自营商品供货价库存批量更新', title: $t('bulk.update.supplier.inventory'),
type: 6, type: 6,
tempPath: '', tempPath: '',
limitNum: 5000, limitNum: 5000,
......
...@@ -32,7 +32,7 @@ const ImportGoods = React.memo(props => { ...@@ -32,7 +32,7 @@ const ImportGoods = React.memo(props => {
const onImport = async () => { const onImport = async () => {
if (!importFile.length) { if (!importFile.length) {
notification.error({ notification.error({
message: '请选择导入文件', message: $t('select.import.file'),
}); });
return; return;
} }
...@@ -43,7 +43,7 @@ const ImportGoods = React.memo(props => { ...@@ -43,7 +43,7 @@ const ImportGoods = React.memo(props => {
setImportFile([]); setImportFile([]);
notification.success({ notification.success({
message: message:
'已操作上传,稍后上传成功后,请在操作历史中,查看上传结果,如有未上传成功的数据,请根据返回原因,及时处理,修改后重新上传。', $t('upload.submitted.check.results.in.history.later'),
}); });
} }
}; };
...@@ -77,32 +77,22 @@ const ImportGoods = React.memo(props => { ...@@ -77,32 +77,22 @@ const ImportGoods = React.memo(props => {
open={props.visible} open={props.visible}
onCancel={onCancel} onCancel={onCancel}
footer={[ footer={[
<Button type="link" onClick={onShowRecord} key="btnlook"> <Button type="link" onClick={onShowRecord} key="btnlook">{$t('view.import.history')}</Button>,
查看导入记录
</Button>,
!config.hideDownload && ( !config.hideDownload && (
<Button type="link" onClick={onDownTemplate} key="btndown"> <Button type="link" onClick={onDownTemplate} key="btndown">{$t('download.template')}</Button>
下载模板
</Button>
), ),
<Button onClick={onCancel} key="btncancel"> <Button onClick={onCancel} key="btncancel">{$t('close')}</Button>,
关闭 <Button type="primary" loading={loading} onClick={onImport} key="btnimprot">{$t('import')}</Button>,
</Button>,
<Button type="primary" loading={loading} onClick={onImport} key="btnimprot">
导入
</Button>,
]} ]}
> >
<Form> <Form>
<Form.Item label="导入文件"> <Form.Item label={$t('import.file')}>
<Upload {...uploadFileAttr}> <Upload {...uploadFileAttr}>
<Button type="link" key="btnsel"> <Button type="link" key="btnsel">{$t('choose.file')}</Button>
选择文件
</Button>
</Upload> </Upload>
<div className={styles.textDesc}> <div className={styles.textDesc}>
<div>1、仅支持按商品{config.tip}导入,纵向排列</div> <div>{$t('1.only.supports.by.product')}{config.tip}{$t('import.vertically')}</div>
<div>2、支持Excel格式文件,导入数量限制{config.limitNum}</div> <div>{$t('2.supports.excel.files.import.limit')}{config.limitNum}{$t('items')}</div>
</div> </div>
</Form.Item> </Form.Item>
</Form> </Form>
......
...@@ -27,7 +27,7 @@ const MessageItem = props => { ...@@ -27,7 +27,7 @@ const MessageItem = props => {
try { try {
message = JSON.parse(item.sendContent || '{}'); message = JSON.parse(item.sendContent || '{}');
} catch (e) { } catch (e) {
console.error('消息数据格式错误'); console.error($t('message.data.format.error'));
} }
const goodList = message.items.map((good, index) => ( const goodList = message.items.map((good, index) => (
...@@ -39,15 +39,13 @@ const MessageItem = props => { ...@@ -39,15 +39,13 @@ const MessageItem = props => {
return ( return (
<div className={styles['complex-list__item']}> <div className={styles['complex-list__item']}>
<div className={styles['complex-list__item--header']}> <div className={styles['complex-list__item--header']}>
<span className={styles['order-number']}> 订单编号:{message.orderNo}</span> <span className={styles['order-number']}>{$t('order.no')}{message.orderNo}</span>
<span className={styles.time}>订单时间:{message.time}</span> <span className={styles.time}>{$t('order.time')}{message.time}</span>
<span className={styles['read-status']}> <span className={styles['read-status']}>
{readStatus === 0 ? ( {readStatus === 0 ? (
<a className={styles['read-status--un-read']} onClick={() => onMark([item.id])}> <a className={styles['read-status--un-read']} onClick={() => onMark([item.id])}>{$t('mark.as.read')}</a>
标记为已读
</a>
) : ( ) : (
<span className={styles['read-status--read']}>已读</span> <span className={styles['read-status--read']}>{$t('read')}</span>
)} )}
</span> </span>
</div> </div>
...@@ -58,8 +56,7 @@ const MessageItem = props => { ...@@ -58,8 +56,7 @@ const MessageItem = props => {
onClick={() => viewDetail(message)} onClick={() => viewDetail(message)}
className={[styles.notice, readStatus === 0 ? styles['un-read'] : ''].join(' ')} className={[styles.notice, readStatus === 0 ? styles['un-read'] : ''].join(' ')}
> >
{message.title},请查看 {message.title}{$t('please.check')}</a>
</a>
</div> </div>
</div> </div>
</div> </div>
...@@ -253,7 +250,7 @@ const Complex = props => { ...@@ -253,7 +250,7 @@ const Complex = props => {
width: '880px', width: '880px',
height: '650px', height: '650px',
visible, visible,
title: <span className="title-icon">消息提醒</span>, title: <span className="title-icon">{$t('notifications')}</span>,
footer: null, footer: null,
onCancel: close, onCancel: close,
}; };
...@@ -271,15 +268,11 @@ const Complex = props => { ...@@ -271,15 +268,11 @@ const Complex = props => {
const FilterRender = filterProps => ( const FilterRender = filterProps => (
<div className={styles['filter-box']}> <div className={styles['filter-box']}>
<div className={styles['filter-box__content']}> <div className={styles['filter-box__content']}>
<Checkbox checked={queryParams.readStatus === '0'} value="0" onChange={onReadStatusChange}> <Checkbox checked={queryParams.readStatus === '0'} value="0" onChange={onReadStatusChange}>{$t('unread')}</Checkbox>
未读 <Checkbox checked={queryParams.readStatus === '1'} value="1" onChange={onReadStatusChange}>{$t('read')}</Checkbox>
</Checkbox>
<Checkbox checked={queryParams.readStatus === '1'} value="1" onChange={onReadStatusChange}>
已读
</Checkbox>
</div> </div>
<div className={styles['filter-box__actions']}> <div className={styles['filter-box__actions']}>
<a onClick={() => onMark(onFilterMessageParams(messageData))}>全部标记为已读</a> <a onClick={() => onMark(onFilterMessageParams(messageData))}>{$t('mark.all.as.read')}</a>
</div> </div>
</div> </div>
); );
...@@ -296,8 +289,8 @@ const Complex = props => { ...@@ -296,8 +289,8 @@ const Complex = props => {
tabBarGutter={0} tabBarGutter={0}
onChange={onTabChange} onChange={onTabChange}
> >
<Tabs.TabPane tab={<TabRender title="订单消息" count={orderUnReadCount} />} key="0" /> <Tabs.TabPane tab={<TabRender title={$t('order.message')} count={orderUnReadCount} />} key="0" />
<Tabs.TabPane tab={<TabRender title="售后消息" count={afterUnReadCount} />} key="1" /> <Tabs.TabPane tab={<TabRender title={$t('aftersales.message')} count={afterUnReadCount} />} key="1" />
</Tabs> </Tabs>
<div className={styles['tab-pane']}> <div className={styles['tab-pane']}>
...@@ -314,7 +307,7 @@ const Complex = props => { ...@@ -314,7 +307,7 @@ const Complex = props => {
/> />
)) ))
) : ( ) : (
<Empty text="暂无数据" /> <Empty text={$t('no.data')} />
)} )}
</div> </div>
</Spin> </Spin>
......
...@@ -22,7 +22,7 @@ const Horn = props => { ...@@ -22,7 +22,7 @@ const Horn = props => {
{stowClass ? <DoubleLeftOutlined /> : <DoubleRightOutlined />} {stowClass ? <DoubleLeftOutlined /> : <DoubleRightOutlined />}
</span> </span>
<Badge count={count}> <Badge count={count}>
<div className={styles['horn--num']}>消息提醒</div> <div className={styles['horn--num']}>{$t('notifications')}</div>
</Badge> </Badge>
</div> </div>
); );
...@@ -47,22 +47,20 @@ const Message = props => { ...@@ -47,22 +47,20 @@ const Message = props => {
try { try {
message = JSON.parse(item.sendContent || '{}'); message = JSON.parse(item.sendContent || '{}');
} catch (e) { } catch (e) {
console.error('消息数据格式错误'); console.error($t('message.data.format.error'));
} }
return ( return (
<div className={styles.item}> <div className={styles.item}>
<div className={styles.info}> <div className={styles.info}>
<span className={styles['order-number']}>{message.orderNo}</span> <span className={styles['order-number']}>{message.orderNo}</span>
<span className={styles['mark-read']} onClick={() => onMark([item.id])}> <span className={styles['mark-read']} onClick={() => onMark([item.id])}>{$t('mark.as.read')}</span>
标记为已读
</span>
</div> </div>
<div className={styles.time}> <div className={styles.time}>
<span>{message.time}</span> <span>{message.time}</span>
</div> </div>
<div className={styles.notice}> <div className={styles.notice}>
<a onClick={() => viewDetail(message)}>{message.title},请查看</a> <a onClick={() => viewDetail(message)}>{message.title}{$t('please.check')}</a>
</div> </div>
</div> </div>
); );
...@@ -71,9 +69,7 @@ const Message = props => { ...@@ -71,9 +69,7 @@ const Message = props => {
return ( return (
<div className={classNames(styles['message-reminder'], styles[animationClass])}> <div className={classNames(styles['message-reminder'], styles[animationClass])}>
<div className={styles['message-reminder__header']}> <div className={styles['message-reminder__header']}>
<div className={styles['message-reminder__header--title']}> <div className={styles['message-reminder__header--title']}>{$t('notifications')}<span className={styles.close} onClick={toggle}>
消息提醒
<span className={styles.close} onClick={toggle}>
<CloseOutlined /> <CloseOutlined />
</span> </span>
</div> </div>
...@@ -86,24 +82,20 @@ const Message = props => { ...@@ -86,24 +82,20 @@ const Message = props => {
.filter((e, i) => i < 10) .filter((e, i) => i < 10)
.map(item => <ReminderItem key={item.id} item={item} />) .map(item => <ReminderItem key={item.id} item={item} />)
) : ( ) : (
<Empty text="暂无数据" /> <Empty text={$t('no.data')} />
)} )}
</div> </div>
</Spin> </Spin>
</div> </div>
<div className={styles['message-reminder__footer']}> <div className={styles['message-reminder__footer']}>
<div className={styles['message-reminder__footer--actions']}> <div className={styles['message-reminder__footer--actions']}>
<div className={styles.more} onClick={openComplex}> <div className={styles.more} onClick={openComplex}>{$t('view.more')}</div>
查看更多
</div>
<div <div
className={styles['mark-all']} className={styles['mark-all']}
onClick={() => { onClick={() => {
onMark(messageData.filter((e, i) => i < 10).map(item => item.id)); onMark(messageData.filter((e, i) => i < 10).map(item => item.id));
}} }}
> >{$t('mark.all.as.read')}</div>
全部标记为已读
</div>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -19,7 +19,7 @@ const UNIT = 1024 * 1024; ...@@ -19,7 +19,7 @@ const UNIT = 1024 * 1024;
const UploadButton = ( const UploadButton = (
<div> <div>
<PlusOutlined /> <PlusOutlined />
<div style={{ marginTop: 8 }}>上传图片</div> <div style={{ marginTop: 8 }}>{$t('upload.image')}</div>
</div> </div>
); );
...@@ -39,7 +39,7 @@ const renderFile = item => { ...@@ -39,7 +39,7 @@ const renderFile = item => {
return ( return (
<div className={styles.imgLoading}> <div className={styles.imgLoading}>
<LoadingOutlined /> <LoadingOutlined />
<div className={styles.imgLoadingText}>文件上传中</div> <div className={styles.imgLoadingText}>{$t('uploading')}</div>
</div> </div>
); );
}; };
...@@ -151,7 +151,7 @@ const UploadImage = forwardRef((props, ref) => { ...@@ -151,7 +151,7 @@ const UploadImage = forwardRef((props, ref) => {
item => (item.width !== width && width !== 0) || (item.height !== height && height !== 0), item => (item.width !== width && width !== 0) || (item.height !== height && height !== 0),
); );
if (checkSize) { if (checkSize) {
notification.warning({ message: '图片尺寸不正确' }); notification.warning({ message: $t('incorrect.image.size') });
return false; return false;
} }
return true; return true;
...@@ -164,7 +164,7 @@ const UploadImage = forwardRef((props, ref) => { ...@@ -164,7 +164,7 @@ const UploadImage = forwardRef((props, ref) => {
if (limit && fileListRef.current.length + fileArray.length > limit) { if (limit && fileListRef.current.length + fileArray.length > limit) {
Modal.warning({ Modal.warning({
maskClosable: true, maskClosable: true,
title: '超出上传个数', title: $t('exceed.upload.limit'),
}); });
return Upload.LIST_IGNORE; return Upload.LIST_IGNORE;
} }
...@@ -190,7 +190,7 @@ const UploadImage = forwardRef((props, ref) => { ...@@ -190,7 +190,7 @@ const UploadImage = forwardRef((props, ref) => {
bundleChange(newFiles); bundleChange(newFiles);
} else { } else {
notification.warning({ notification.warning({
message: '警告', message: $t('warning'),
description: res.msg, description: res.msg,
}); });
} }
...@@ -201,14 +201,14 @@ const UploadImage = forwardRef((props, ref) => { ...@@ -201,14 +201,14 @@ const UploadImage = forwardRef((props, ref) => {
setUploadLoading(false); setUploadLoading(false);
Modal.warning({ Modal.warning({
maskClosable: true, maskClosable: true,
title: '上传失败,请重新尝试!', title: $t('upload.failed.try.again'),
}); });
} }
return null; return null;
}), }),
); );
return ( return (
<Spin tip="正在上传..." spinning={uploadLoading} delay={100}> <Spin tip={$t('uploading')} spinning={uploadLoading} delay={100}>
<div> <div>
{fileList.length > 0 && ( {fileList.length > 0 && (
<ReactSortable animation={300} list={fileList} setList={list => bundleChange(list)}> <ReactSortable animation={300} list={fileList} setList={list => bundleChange(list)}>
......
...@@ -27,7 +27,7 @@ export const checkConfirm = () => { ...@@ -27,7 +27,7 @@ export const checkConfirm = () => {
const mt = ''; const mt = '';
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
confirm({ confirm({
title: '风险提示', title: $t('risk.warning'),
icon: <ExclamationCircleOutlined />, icon: <ExclamationCircleOutlined />,
content: `确定关闭${mt}餐品类型?此餐品类型下关联的商户及商品将一并删除,不可逆请谨慎操作!`, content: `确定关闭${mt}餐品类型?此餐品类型下关联的商户及商品将一并删除,不可逆请谨慎操作!`,
onOk() { onOk() {
......
...@@ -12,10 +12,10 @@ const MealLimit = props => ( ...@@ -12,10 +12,10 @@ const MealLimit = props => (
wrapperCol={{ span: 14 }} wrapperCol={{ span: 14 }}
rules={[ rules={[
{ validator: validateRequired, message: `请输入${props.label}限额` }, { validator: validateRequired, message: `请输入${props.label}限额` },
{ validator: isCheckPriceTwoDecimal, message: '请输入正确的价格' }, { validator: isCheckPriceTwoDecimal, message: $t('enter.valid.price') },
]} ]}
> >
<InputNumber addonAfter="元" max={999.99} /> <InputNumber addonAfter={$t('cny')} max={999.99} />
</Form.Item> </Form.Item>
); );
export default MealLimit; export default MealLimit;
...@@ -24,8 +24,8 @@ const MealSection = props => ( ...@@ -24,8 +24,8 @@ const MealSection = props => (
rules={ rules={
props.meals[field] props.meals[field]
? [ ? [
{ type: 'array', required: true, message: '请选择!' }, { type: 'array', required: true, message: $t('selection.required') },
{ validator: props.validateMeals, message: '时间段不能交叉!' }, { validator: props.validateMeals, message: $t('time.slots.cannot.overlap') },
] ]
: [] : []
} }
......
...@@ -40,7 +40,7 @@ const CustomerInfo = props => { ...@@ -40,7 +40,7 @@ const CustomerInfo = props => {
if (resp && resp.data) { if (resp && resp.data) {
// 保存成功后刷新列表 // 保存成功后刷新列表
closeModal(0); closeModal(0);
notification.success({ message: '保存成功!' }); notification.success({ message: $t('saved.successfully') });
} }
}; };
...@@ -156,7 +156,7 @@ const CustomerInfo = props => { ...@@ -156,7 +156,7 @@ const CustomerInfo = props => {
return ( return (
<BetaSchemaForm <BetaSchemaForm
layoutType="ModalForm" layoutType="ModalForm"
title="企业客户信息" title={$t('enterprise.customer.info')}
open={props.visible} open={props.visible}
width="900px" width="900px"
modalProps={{ modalProps={{
......
...@@ -4,8 +4,8 @@ import MealSection from './components/MealSection'; ...@@ -4,8 +4,8 @@ import MealSection from './components/MealSection';
import MealFormListLimit from './components/MealFormListLimitForm'; import MealFormListLimit from './components/MealFormListLimitForm';
import { getPickSelf } from './bll'; import { getPickSelf } from './bll';
const hideEnums = { hidePrice: '隐藏商品价格', hideImage: '隐藏商品图片' }; const hideEnums = { hidePrice: $t('hide.product.price'), hideImage: $t('hide.product.image') };
const weekMap = new Map([[1, ''], [0, '']]); const weekMap = new Map([[1, $t('yes')], [0, $t('no')]]);
export const layout = { export const layout = {
labelCol: { span: 4 }, labelCol: { span: 4 },
...@@ -14,15 +14,15 @@ export const layout = { ...@@ -14,15 +14,15 @@ export const layout = {
// 餐品类型 // 餐品类型
export const mealType = { export const mealType = {
1: '外卖', 1: $t('takeaway'),
2: '自助餐', 2: $t('buffet'),
4: '到店', 4: $t('instore'),
}; };
// 餐段 // 餐段
export const mealSections = { export const mealSections = {
1: '早餐', 1: $t('breakfast'),
2: '午餐', 2: $t('lunch'),
4: '晚餐', 4: $t('dinner'),
}; };
// 校验时间 // 校验时间
...@@ -55,7 +55,7 @@ const validateMeals = (refForm, selectedMealSections) => { ...@@ -55,7 +55,7 @@ const validateMeals = (refForm, selectedMealSections) => {
}); });
if (validTime) { if (validTime) {
// eslint-disable-next-line prefer-promise-reject-errors // eslint-disable-next-line prefer-promise-reject-errors
return Promise.reject('时间段不能交叉!'); return Promise.reject($t('time.slots.cannot.overlap'));
} }
return Promise.resolve(); return Promise.resolve();
}; };
...@@ -73,15 +73,15 @@ export const getBaseFormItem = options => { ...@@ -73,15 +73,15 @@ export const getBaseFormItem = options => {
const baseColumn = [ const baseColumn = [
{ {
title: '企业名称', title: $t('enterprise.name'),
dataIndex: 'name', dataIndex: 'name',
formItemProps: { formItemProps: {
rules: [{ required: true, message: '请输入企业名称' }], rules: [{ required: true, message: $t('enter.company.name') }],
}, },
}, },
{ {
hideInForm: !!id, hideInForm: !!id,
title: '企业取餐点', title: $t('enterprise.pickup.point'),
dataIndex: 'pickSelfIds', dataIndex: 'pickSelfIds',
valueType: 'select', valueType: 'select',
fieldProps: { fieldProps: {
...@@ -89,26 +89,26 @@ export const getBaseFormItem = options => { ...@@ -89,26 +89,26 @@ export const getBaseFormItem = options => {
}, },
request: getPickSelf, request: getPickSelf,
formItemProps: { formItemProps: {
rules: [{ required: true, message: '请选择企业取餐点' }], rules: [{ required: true, message: $t('select.pickup.point') }],
}, },
}, },
{ {
title: '企业截止时间', title: $t('enterprise.deadline'),
dataIndex: 'endOrderTime', dataIndex: 'endOrderTime',
valueType: 'digit', valueType: 'digit',
formItemProps: { formItemProps: {
rules: [{ required: true, message: '请输入企业截止时间' }], rules: [{ required: true, message: $t('enter.deadline') }],
addonAfter: '分钟', addonAfter: $t('minutes'),
extra: <span>企业员工下单的截至时间,仅支持正整数,单位为分钟。</span>, extra: <span>{$t('employee.order.cutoff.time.minutes.positive.integers.only')}</span>,
}, },
}, },
{ {
title: '餐品类型', title: $t('food.type'),
dataIndex: 'mealType', dataIndex: 'mealType',
valueType: 'checkbox', valueType: 'checkbox',
valueEnum: mealType, valueEnum: mealType,
formItemProps: { formItemProps: {
rules: [{ required: true, message: '请选择餐品类型' }], rules: [{ required: true, message: $t('select.meal.type') }],
}, },
fieldProps: { fieldProps: {
onChange: onChangeMealType, onChange: onChangeMealType,
...@@ -116,10 +116,10 @@ export const getBaseFormItem = options => { ...@@ -116,10 +116,10 @@ export const getBaseFormItem = options => {
}, },
}, },
{ {
title: '餐段配置', title: $t('meal.period.config'),
dataIndex: 'mealTimePeriod', dataIndex: 'mealTimePeriod',
formItemProps: { formItemProps: {
rules: [{ required: true, message: '请选择餐段配置' }], rules: [{ required: true, message: $t('select.period.config') }],
}, },
fieldProps: { fieldProps: {
copyIconProps: false, // 隐藏复制行按钮 copyIconProps: false, // 隐藏复制行按钮
...@@ -142,7 +142,7 @@ export const getBaseFormItem = options => { ...@@ -142,7 +142,7 @@ export const getBaseFormItem = options => {
wrapperCol: { span: 22 }, wrapperCol: { span: 22 },
}, },
fieldProps: { fieldProps: {
children: '企业单笔消费限额', children: $t('business.transaction.limit'),
orientation: 'left', orientation: 'left',
}, },
}, },
...@@ -156,16 +156,16 @@ export const getBaseFormItem = options => { ...@@ -156,16 +156,16 @@ export const getBaseFormItem = options => {
renderFormItem: () => MealFormListLimit(selectedMealSections, selectedMealTypes), renderFormItem: () => MealFormListLimit(selectedMealSections, selectedMealTypes),
}, },
{ {
title: '商品隐藏信息', title: $t('hidden.product.info'),
dataIndex: 'hideInfo', dataIndex: 'hideInfo',
valueType: 'checkbox', valueType: 'checkbox',
valueEnum: hideEnums, valueEnum: hideEnums,
}, },
{ {
title: '是否周预览', title: $t('weekly.preview'),
dataIndex: 'weekPreview', dataIndex: 'weekPreview',
formItemProps: { formItemProps: {
rules: [{ required: true, message: '请选择是否周预览' }], rules: [{ required: true, message: $t('select.week.preview') }],
}, },
valueType: 'radio', valueType: 'radio',
valueEnum: weekMap, valueEnum: weekMap,
......
...@@ -58,9 +58,7 @@ const BusinessCustomer = () => { ...@@ -58,9 +58,7 @@ const BusinessCustomer = () => {
setId(''); setId('');
setVisible(!0); setVisible(!0);
}} }}
> >{$t('add.corporate.client')}</Button>,
添加企业客户
</Button>,
]} ]}
/> />
{visible && <CustomerInfo visible={visible} id={id} onClose={onClose} />} {visible && <CustomerInfo visible={visible} id={id} onClose={onClose} />}
......
...@@ -8,28 +8,28 @@ export const layout = { ...@@ -8,28 +8,28 @@ export const layout = {
// 餐品类型:(1外卖 2 自助餐 4到店) // 餐品类型:(1外卖 2 自助餐 4到店)
export const mealType = { export const mealType = {
1: '外卖', 1: $t('takeaway'),
2: '自助餐', 2: $t('buffet'),
4: '到店', 4: $t('instore'),
}; };
export const infoOptions = [ export const infoOptions = [
{ label: '商品价格及图片', value: 1 }, { label: $t('product.price.image'), value: 1 },
{ label: '仅商品价格', value: 2 }, { label: $t('product.price.only'), value: 2 },
{ label: '仅商品图片', value: 3 }, { label: $t('product.image.only'), value: 3 },
{ label: '均不展示', value: 4 }, { label: $t('hide.all'), value: 4 },
]; ];
export const boolOptions = [{ label: '', value: 1 }, { label: '', value: 0 }]; export const boolOptions = [{ label: $t('yes'), value: 1 }, { label: $t('no'), value: 0 }];
export const hideOptions = [ export const hideOptions = [
{ label: '隐藏商品价格', value: 'hidePrice' }, { label: $t('hide.product.price'), value: 'hidePrice' },
{ label: '隐藏商品图片', value: 'hideImage' }, { label: $t('hide.product.image'), value: 'hideImage' },
]; ];
export const mealSections = { export const mealSections = {
1: '早餐', 1: $t('breakfast'),
2: '午餐', 2: $t('lunch'),
4: '晚餐', 4: $t('dinner'),
}; };
// 企业列表字段 // 企业列表字段
...@@ -49,20 +49,20 @@ export const customerColumn = options => { ...@@ -49,20 +49,20 @@ export const customerColumn = options => {
hideInSearch: true, hideInSearch: true,
}, },
{ {
title: '公司名称', title: $t('company.name'),
dataIndex: 'name', dataIndex: 'name',
width: 120, width: 120,
align: 'center', align: 'center',
}, },
{ {
title: '截单时间(分钟)', title: $t('cutoff.time.mins'),
dataIndex: 'endOrderTime', dataIndex: 'endOrderTime',
width: 120, width: 120,
align: 'center', align: 'center',
hideInSearch: true, hideInSearch: true,
}, },
{ {
title: '餐品类型', title: $t('food.type'),
dataIndex: 'mealType', dataIndex: 'mealType',
width: 120, width: 120,
align: 'center', align: 'center',
...@@ -76,30 +76,28 @@ export const customerColumn = options => { ...@@ -76,30 +76,28 @@ export const customerColumn = options => {
}, },
}, },
{ {
title: '创建人', title: $t('created.by'),
dataIndex: 'createdBy', dataIndex: 'createdBy',
width: 120, width: 120,
align: 'center', align: 'center',
hideInSearch: true, hideInSearch: true,
}, },
{ {
title: '创建时间', title: $t('creation.time'),
dataIndex: 'createdAt', dataIndex: 'createdAt',
width: 120, width: 120,
align: 'center', align: 'center',
hideInSearch: true, hideInSearch: true,
}, },
{ {
title: '操作', title: $t('actions'),
hideInSearch: true, hideInSearch: true,
dataIndex: 'action', dataIndex: 'action',
width: 200, width: 200,
align: 'center', align: 'center',
fixed: 'right', fixed: 'right',
render: (val, r) => ( render: (val, r) => (
<Button key="edit" onClick={() => onEdit(r.id)}> <Button key="edit" onClick={() => onEdit(r.id)}>{$t('edit')}</Button>
编辑
</Button>
), ),
}, },
]; ];
......
This diff is collapsed.
This diff is collapsed.
...@@ -169,7 +169,7 @@ const BasicLayout = props => { ...@@ -169,7 +169,7 @@ const BasicLayout = props => {
return [ return [
{ {
path: '/', path: '/',
breadcrumbName: '首页', breadcrumbName: $t('home'),
}, },
...routers, ...routers,
]; ];
...@@ -192,11 +192,11 @@ const BasicLayout = props => { ...@@ -192,11 +192,11 @@ const BasicLayout = props => {
<div className={style['custom-title-box']} onClick={toIndex}> <div className={style['custom-title-box']} onClick={toIndex}>
<div className={style['custom-title-box-logo']}> <div className={style['custom-title-box-logo']}>
<div> <div>
<img className={style['custom-title-box-logoImg']} alt="量星球" src={logo} /> <img className={style['custom-title-box-logoImg']} alt={$t('quantity.star')} src={logo} />
</div> </div>
{!siderCollapsed && <div className={style['custom-title-box-logoName']}>量星球</div>} {!siderCollapsed && <div className={style['custom-title-box-logoName']}>{$t('quantity.star')}</div>}
</div> </div>
{!siderCollapsed && <div className={style['custom-title-box-title']}>商户管理系统</div>} {!siderCollapsed && <div className={style['custom-title-box-title']}>{$t('merchant.system')}</div>}
</div> </div>
)} )}
{...props} {...props}
......
...@@ -36,7 +36,7 @@ const UserLayout = props => { ...@@ -36,7 +36,7 @@ const UserLayout = props => {
<div className={styles.top}> <div className={styles.top}>
<div className={styles.header}> <div className={styles.header}>
<img alt="logo" className={styles.logo} src={logo} /> <img alt="logo" className={styles.logo} src={logo} />
<span className={styles.title}>量星球商户管理系统</span> <span className={styles.title}>{$t('quantity.star.merchant.system')}</span>
</div> </div>
</div> </div>
{children} {children}
......
...@@ -26,7 +26,7 @@ const Model = { ...@@ -26,7 +26,7 @@ const Model = {
}); });
yield put(routerRedux.replace('/')); yield put(routerRedux.replace('/'));
} else { } else {
notification.error({ message: response.msg || '登录失败!' }); notification.error({ message: response.msg || $t('login.failed') });
} }
}, },
......
...@@ -21,7 +21,7 @@ const MenuModel = { ...@@ -21,7 +21,7 @@ const MenuModel = {
menuData: [ menuData: [
{ {
path: '/', path: '/',
name: '主页', name: $t('homepage'),
icon: 'home', icon: 'home',
key: '', key: '',
}, },
......
...@@ -5,7 +5,7 @@ import themeColorClient from '../components/SettingDrawer/themeColorClient'; ...@@ -5,7 +5,7 @@ import themeColorClient from '../components/SettingDrawer/themeColorClient';
const updateTheme = newPrimaryColor => { const updateTheme = newPrimaryColor => {
if (newPrimaryColor) { if (newPrimaryColor) {
const timeOut = 0; const timeOut = 0;
const hideMessage = message.loading('正在切换主题!', timeOut); const hideMessage = message.loading($t('switching.theme'), timeOut);
themeColorClient.changeColor(newPrimaryColor).finally(() => hideMessage()); themeColorClient.changeColor(newPrimaryColor).finally(() => hideMessage());
} }
}; };
......
...@@ -23,11 +23,11 @@ const Admin = props => { ...@@ -23,11 +23,11 @@ const Admin = props => {
return ( return (
<div> <div>
<h2>欢迎使用商户管理后台系统</h2> <h2>{$t('welcome.to.merchant.system')}</h2>
<div> <div>
<div> <div>
<span className={style.orderleft}></span> <span className={style.orderleft}></span>
<span className={style.orderRight}>待办事项</span> <span className={style.orderRight}>{$t('pending')}</span>
</div> </div>
<div style={{ marginTop: '20px' }}> <div style={{ marginTop: '20px' }}>
<Row className={style.orderContent}> <Row className={style.orderContent}>
...@@ -35,7 +35,7 @@ const Admin = props => { ...@@ -35,7 +35,7 @@ const Admin = props => {
<Col span={2} className="titleOne"> <Col span={2} className="titleOne">
<div> <div>
<FileTextOutlined /> <FileTextOutlined />
<p>订单</p> <p>{$t('order')}</p>
</div> </div>
</Col> </Col>
) : ( ) : (
...@@ -51,7 +51,7 @@ const Admin = props => { ...@@ -51,7 +51,7 @@ const Admin = props => {
}} }}
> >
<strong>{pendingNum?.pendingShipNum || 0}</strong> <strong>{pendingNum?.pendingShipNum || 0}</strong>
<p>待发货</p> <p>{$t('pending.shipment')}</p>
</Link> </Link>
</Col> </Col>
<Col span={3}> <Col span={3}>
...@@ -62,7 +62,7 @@ const Admin = props => { ...@@ -62,7 +62,7 @@ const Admin = props => {
}} }}
> >
<strong>{pendingNum?.timeOutShipNum || 0}</strong> <strong>{pendingNum?.timeOutShipNum || 0}</strong>
<p>超时发货{'>'}48小时</p> <p>{$t('late.shipment')}{'>'}{$t('48.hours')}</p>
</Link> </Link>
</Col> </Col>
</> </>
...@@ -80,7 +80,7 @@ const Admin = props => { ...@@ -80,7 +80,7 @@ const Admin = props => {
}} }}
> >
<strong>{pendingNum?.cancelOrderPendingAuditNum || 0}</strong> <strong>{pendingNum?.cancelOrderPendingAuditNum || 0}</strong>
<p>取消订单审核{'<'}24小时</p> <p>{$t('cancel.order.review')}{'<'}{$t('24.hours')}</p>
</Link> </Link>
</Col> </Col>
) : ( ) : (
...@@ -91,7 +91,7 @@ const Admin = props => { ...@@ -91,7 +91,7 @@ const Admin = props => {
<Col span={2} className="titleTwo" offset={4}> <Col span={2} className="titleTwo" offset={4}>
<div> <div>
<FileTextOutlined /> <FileTextOutlined />
<p> 售后</p> <p>{$t('aftersales')}</p>
</div> </div>
</Col> </Col>
...@@ -102,7 +102,7 @@ const Admin = props => { ...@@ -102,7 +102,7 @@ const Admin = props => {
}} }}
> >
<strong>{pendingNum?.afterOrderPendingAuditNum || 0}</strong> <strong>{pendingNum?.afterOrderPendingAuditNum || 0}</strong>
<p>退款待审核{'<'}24小时</p> <p>{$t('refund.pending')}{'<'}{$t('24.hours')}</p>
</Link> </Link>
</Col> </Col>
<Col span={4}> <Col span={4}>
...@@ -112,7 +112,7 @@ const Admin = props => { ...@@ -112,7 +112,7 @@ const Admin = props => {
}} }}
> >
<strong>{pendingNum?.interceptRefundPendingAuditNum || 0}</strong> <strong>{pendingNum?.interceptRefundPendingAuditNum || 0}</strong>
<p>物流拦截待审核{'<'}48小时</p> <p>{$t('pending.interception.review')}{'<'}{$t('48.hours')}</p>
</Link> </Link>
</Col> </Col>
</> </>
......
...@@ -9,7 +9,7 @@ const LogisticsCom = props => { ...@@ -9,7 +9,7 @@ const LogisticsCom = props => {
return ( return (
<Modal <Modal
destroyOnClose destroyOnClose
title="查看记录" title={$t('view.records')}
visible={visible} visible={visible}
onCancel={() => onCancel()} onCancel={() => onCancel()}
onOk={() => onCancel()} onOk={() => onCancel()}
...@@ -26,11 +26,9 @@ const LogisticsCom = props => { ...@@ -26,11 +26,9 @@ const LogisticsCom = props => {
))} ))}
</Timeline> </Timeline>
) : ( ) : (
'暂无查看记录' $t('no.view.records')
)} )}
<Button type="primary" onClick={props.onCancel} className={styles.logBtn}> <Button type="primary" onClick={props.onCancel} className={styles.logBtn}>{$t('close')}</Button>
关闭
</Button>
</Modal> </Modal>
); );
}; };
......
...@@ -20,23 +20,23 @@ const AuditModal = props => { ...@@ -20,23 +20,23 @@ const AuditModal = props => {
}; };
const treeData = [ const treeData = [
{ {
label: '同意', label: $t('agree'),
value: true, value: true,
}, },
{ {
label: '不同意', label: $t('disagree'),
value: false, value: false,
children: [ children: [
{ {
label: '订单已发货', label: $t('order.shipped'),
value: 10, value: 10,
}, },
{ {
label: '已与客户沟通继续发货', label: $t('confirmed.delivery.with.client'),
value: 20, value: 20,
}, },
{ {
label: '其他', label: $t('other'),
value: 30, value: 30,
}, },
], ],
...@@ -53,7 +53,7 @@ const AuditModal = props => { ...@@ -53,7 +53,7 @@ const AuditModal = props => {
serviceNo: formData?.serviceNo, serviceNo: formData?.serviceNo,
}); });
if (data.businessCode === '0000') { if (data.businessCode === '0000') {
notification.success({ message: approve?.[0] ? '审核成功' : '审核拒绝提交成功' }); notification.success({ message: approve?.[0] ? $t('review.success') : $t('rejection.submitted') });
handleCancel(true); handleCancel(true);
} }
} }
...@@ -68,13 +68,13 @@ const AuditModal = props => { ...@@ -68,13 +68,13 @@ const AuditModal = props => {
const isRefuse = () => approve && approve[0] !== 1; const isRefuse = () => approve && approve[0] !== 1;
return ( return (
<Modal <Modal
title="售后操作确认" title={$t('aftersales.confirmation')}
visible={visible} visible={visible}
onOk={() => handleOk()} onOk={() => handleOk()}
onCancel={() => handleCancel()} onCancel={() => handleCancel()}
> >
<Form {...layout} name="formData"> <Form {...layout} name="formData">
<FormItem label="审核结果"> <FormItem label={$t('review.result')}>
{getFieldDecorator('approve')( {getFieldDecorator('approve')(
<Cascader <Cascader
allowClear allowClear
...@@ -82,23 +82,23 @@ const AuditModal = props => { ...@@ -82,23 +82,23 @@ const AuditModal = props => {
style={{ width: '315px' }} style={{ width: '315px' }}
dropdownStyle={{ maxHeight: 400, overflow: 'auto' }} dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
options={treeData} options={treeData}
placeholder="请选择" placeholder={$t('select')}
/>, />,
)} )}
</FormItem> </FormItem>
{isRefuse() && approve[1] === 30 && ( {isRefuse() && approve[1] === 30 && (
<FormItem label="拒绝原因"> <FormItem label={$t('rejection.reason')}>
{getFieldDecorator('refuseReasonRemark', { {getFieldDecorator('refuseReasonRemark', {
initialValue: formData.refuseDesc, initialValue: formData.refuseDesc,
rules: [ rules: [
{ {
required: true, required: true,
message: '请填写拒绝原因!', message: $t('enter.rejection.reason'),
}, },
], ],
})( })(
<TextArea <TextArea
placeholder="请填写拒绝原因" placeholder={$t('enter.rejection.reason')}
allowClear allowClear
autoSize={{ minRows: 3, maxRows: 6 }} autoSize={{ minRows: 3, maxRows: 6 }}
/>, />,
......
...@@ -8,21 +8,21 @@ export default props => { ...@@ -8,21 +8,21 @@ export default props => {
}; };
const columns = [ const columns = [
{ {
title: '商品名称', title: $t('product.name'),
width: 400, width: 400,
dataIndex: 'skuName', dataIndex: 'skuName',
}, },
{ {
title: '商品属性', title: $t('product.attributes'),
dataIndex: 'skuAttr', dataIndex: 'skuAttr',
}, },
{ {
title: '商品件数', title: $t('item.count'),
dataIndex: 'count', dataIndex: 'count',
}, },
]; ];
return ( return (
<Modal title="订单详情" visible={visible} onCancel={handleCancel} footer={null} width={800}> <Modal title={$t('order.details')} visible={visible} onCancel={handleCancel} footer={null} width={800}>
<Table <Table
dataSource={dataSource} dataSource={dataSource}
columns={columns} columns={columns}
......
...@@ -27,7 +27,7 @@ const RejectModal = props => { ...@@ -27,7 +27,7 @@ const RejectModal = props => {
auditResult: 2, auditResult: 2,
}); });
if (data.code === '0000') { if (data.code === '0000') {
notification.success({ message: '操作成功' }); notification.success({ message: $t('operation.success') });
handleCancel(true); handleCancel(true);
} }
} }
...@@ -39,18 +39,18 @@ const RejectModal = props => { ...@@ -39,18 +39,18 @@ const RejectModal = props => {
wrapperCol: { span: 16 }, wrapperCol: { span: 16 },
}; };
return ( return (
<Modal title="驳回" visible={visible} onOk={() => handleOk()} onCancel={() => handleCancel()}> <Modal title={$t('reject')} visible={visible} onOk={() => handleOk()} onCancel={() => handleCancel()}>
<Form {...layout} name="formData"> <Form {...layout} name="formData">
<FormItem label="原因"> <FormItem label={$t('reason')}>
{getFieldDecorator('refuseReasonRemark', { {getFieldDecorator('refuseReasonRemark', {
rules: [ rules: [
{ {
required: true, required: true,
message: '请填写原因!', message: $t('enter.reason'),
}, },
], ],
})( })(
<TextArea placeholder="请填写原因" allowClear autoSize={{ minRows: 3, maxRows: 6 }} />, <TextArea placeholder={$t('enter.reason')} allowClear autoSize={{ minRows: 3, maxRows: 6 }} />,
)} )}
</FormItem> </FormItem>
</Form> </Form>
......
...@@ -18,7 +18,7 @@ const LogisticsRecordModal = (props, ref) => { ...@@ -18,7 +18,7 @@ const LogisticsRecordModal = (props, ref) => {
const res = await apiDeliveriesTraceList(params); const res = await apiDeliveriesTraceList(params);
setLoading(false); setLoading(false);
if (!res) { if (!res) {
notification.info({ message: '暂无物流信息' }); notification.info({ message: $t('no.logistics.info') });
return; return;
} }
...@@ -43,7 +43,7 @@ const LogisticsRecordModal = (props, ref) => { ...@@ -43,7 +43,7 @@ const LogisticsRecordModal = (props, ref) => {
})); }));
const modalProps = { const modalProps = {
title: '查看物流', title: $t('view.logistics'),
visible, visible,
onCancel, onCancel,
destroyOnClose: true, destroyOnClose: true,
...@@ -63,13 +63,13 @@ const LogisticsRecordModal = (props, ref) => { ...@@ -63,13 +63,13 @@ const LogisticsRecordModal = (props, ref) => {
dataList.map((dataItem, dataIndex) => ( dataList.map((dataItem, dataIndex) => (
<div className={styles['logistics-record']}> <div className={styles['logistics-record']}>
{!isSingle ? ( {!isSingle ? (
<div className={styles['logistics-record__topbar']}>包裹{dataIndex + 1}</div> <div className={styles['logistics-record__topbar']}>{$t('parcel')}{dataIndex + 1}</div>
) : ( ) : (
'' ''
)} )}
<div className={styles['logistics-record__head']}> <div className={styles['logistics-record__head']}>
<span className={styles.name}>物流公司:{dataItem.expressCompanyName}</span> <span className={styles.name}>{$t('logistics.company')}{dataItem.expressCompanyName}</span>
<span className={styles.no}>物流单号:{dataItem.expressNo}</span> <span className={styles.no}>{$t('tracking.number')}{dataItem.expressNo}</span>
</div> </div>
{dataItem.traceList.map(traceItem => ( {dataItem.traceList.map(traceItem => (
<Timeline> <Timeline>
...@@ -81,14 +81,14 @@ const LogisticsRecordModal = (props, ref) => { ...@@ -81,14 +81,14 @@ const LogisticsRecordModal = (props, ref) => {
</Timeline.Item> </Timeline.Item>
)) ))
) : ( ) : (
<div style={emptyStyle}>暂无物流信息</div> <div style={emptyStyle}>{$t('no.logistics.info')}</div>
)} )}
</Timeline> </Timeline>
))} ))}
</div> </div>
)) ))
) : ( ) : (
<div style={emptyStyle}>暂无物流信息</div> <div style={emptyStyle}>{$t('no.logistics.info')}</div>
)} )}
{/* 折叠 */} {/* 折叠 */}
......
...@@ -8,21 +8,21 @@ export default props => { ...@@ -8,21 +8,21 @@ export default props => {
}; };
const columns = [ const columns = [
{ {
title: '商品名称', title: $t('product.name'),
width: 400, width: 400,
dataIndex: 'skuName', dataIndex: 'skuName',
}, },
{ {
title: '商品属性', title: $t('product.attributes'),
dataIndex: 'skuAttr', dataIndex: 'skuAttr',
}, },
{ {
title: '商品件数', title: $t('item.count'),
dataIndex: 'count', dataIndex: 'count',
}, },
]; ];
return ( return (
<Modal title="订单详情" visible={visible} onCancel={handleCancel} footer={null} width={800}> <Modal title={$t('order.details')} visible={visible} onCancel={handleCancel} footer={null} width={800}>
<Table dataSource={dataSource} columns={columns} key="skuName" pagination={false} bordered /> <Table dataSource={dataSource} columns={columns} key="skuName" pagination={false} bordered />
</Modal> </Modal>
); );
......
...@@ -14,7 +14,7 @@ export default props => { ...@@ -14,7 +14,7 @@ export default props => {
setDetailModal(true); setDetailModal(true);
}; };
return ( return (
<Modal title="售后凭证" visible={visible} onCancel={handleCancel} footer={null} width={600}> <Modal title={$t('aftersales.proof')} visible={visible} onCancel={handleCancel} footer={null} width={600}>
<div className={style.proofsWrap}> <div className={style.proofsWrap}>
{data.map(item => ( {data.map(item => (
<img <img
...@@ -28,7 +28,7 @@ export default props => { ...@@ -28,7 +28,7 @@ export default props => {
))} ))}
</div> </div>
<Modal <Modal
title="凭证详情" title={$t('proof.details')}
visible={detailModal} visible={detailModal}
onCancel={() => setDetailModal(false)} onCancel={() => setDetailModal(false)}
footer={null} footer={null}
......
...@@ -27,7 +27,7 @@ const RejectModal = props => { ...@@ -27,7 +27,7 @@ const RejectModal = props => {
auditResult: 2, auditResult: 2,
}); });
if (data.code === '0000') { if (data.code === '0000') {
notification.success({ message: '操作成功' }); notification.success({ message: $t('operation.success') });
handleCancel(true); handleCancel(true);
} }
} }
...@@ -39,18 +39,18 @@ const RejectModal = props => { ...@@ -39,18 +39,18 @@ const RejectModal = props => {
wrapperCol: { span: 16 }, wrapperCol: { span: 16 },
}; };
return ( return (
<Modal title="驳回" visible={visible} onOk={() => handleOk()} onCancel={() => handleCancel()}> <Modal title={$t('reject')} visible={visible} onOk={() => handleOk()} onCancel={() => handleCancel()}>
<Form {...layout} name="formData"> <Form {...layout} name="formData">
<FormItem label="原因"> <FormItem label={$t('reason')}>
{getFieldDecorator('refuseDesc', { {getFieldDecorator('refuseDesc', {
rules: [ rules: [
{ {
required: true, required: true,
message: '请填写原因!', message: $t('enter.reason'),
}, },
], ],
})( })(
<TextArea placeholder="请填写原因" allowClear autoSize={{ minRows: 3, maxRows: 6 }} />, <TextArea placeholder={$t('enter.reason')} allowClear autoSize={{ minRows: 3, maxRows: 6 }} />,
)} )}
</FormItem> </FormItem>
</Form> </Form>
......
This diff is collapsed.
...@@ -118,7 +118,7 @@ const AfterSale = props => { ...@@ -118,7 +118,7 @@ const AfterSale = props => {
// 查看凭证 // 查看凭证
const viewProofs = proofs => { const viewProofs = proofs => {
if (!proofs) { if (!proofs) {
notification.warning({ message: '该订单没有凭证' }); notification.warning({ message: $t('no.credentials.for.this.order') });
return; return;
} }
const list = proofs.replace(/(\uff1b|\uff0c|\u003b)/g, ',').split(','); const list = proofs.replace(/(\uff1b|\uff0c|\u003b)/g, ',').split(',');
...@@ -161,22 +161,19 @@ const AfterSale = props => { ...@@ -161,22 +161,19 @@ const AfterSale = props => {
// 物流拦截 // 物流拦截
const openLogistics = r => { const openLogistics = r => {
confirm({ confirm({
title: '温馨提示', title: $t('reminder'),
okText: '确认拦截', okText: $t('confirm.interception'),
cancelText: '取消拦截', cancelText: $t('cancel.interception'),
content: ( content: (
<div> <div>{$t('intercept.logistics.within.48.hours.before.system.confirms')}<span className={styles.redTipBold}>{$t('auto.approve')}</span>{$t('refund')}</div>
请48小时内自行联系物流公司进行物流拦截,系统监测拦截成功后
<span className={styles.redTipBold}>自动同意</span>退款
</div>
), ),
async onOk() { async onOk() {
const data = await logisticsIntercept({ serviceNo: r.serviceNo }); const data = await logisticsIntercept({ serviceNo: r.serviceNo });
if (data.businessCode === '0000') { if (data.businessCode === '0000') {
notification.success({ message: '拦截成功' }); notification.success({ message: $t('block.success') });
actionRef.current.reload(); actionRef.current.reload();
} else { } else {
notification.error({ message: data.msg || '拦截失败' }); notification.error({ message: data.msg || $t('block.failed') });
} }
}, },
onCancel() { onCancel() {
...@@ -208,7 +205,7 @@ const AfterSale = props => { ...@@ -208,7 +205,7 @@ const AfterSale = props => {
auditResult: 1, auditResult: 1,
}); });
if (data.businessCode === '0000') { if (data.businessCode === '0000') {
notification.success({ message: '操作成功' }); notification.success({ message: $t('operation.success') });
closeModal(true); closeModal(true);
} }
}; };
...@@ -384,33 +381,33 @@ const AfterSale = props => { ...@@ -384,33 +381,33 @@ const AfterSale = props => {
size="large" size="large"
tabBarStyle={{ padding: '0 30px 0 15px', border: 'none' }} tabBarStyle={{ padding: '0 30px 0 15px', border: 'none' }}
> >
<TabPane key="" tab="全部"></TabPane> <TabPane key="" tab={$t('all')}></TabPane>
<TabPane <TabPane
key="1" key="1"
tab={ tab={
<TabCountElement <TabCountElement
text="仅退款(未发货)待审核" text={$t('pending.refund.review.unshipped')}
count={tabInfoData.cancelOrderPendingAuditNum} count={tabInfoData.cancelOrderPendingAuditNum}
/> />
} }
/> />
<TabPane <TabPane
key="2" key="2"
tab={<TabCountElement text="仅退款待审核" count={tabInfoData.refundPendingAuditNum} />} tab={<TabCountElement text={$t('pending.refund.review')} count={tabInfoData.refundPendingAuditNum} />}
/> />
<TabPane <TabPane
key="3" key="3"
tab={ tab={
<TabCountElement text="退货退款待审核" count={tabInfoData.returnPendingAuditNum} /> <TabCountElement text={$t('refund.pending')} count={tabInfoData.returnPendingAuditNum} />
} }
/> />
<TabPane <TabPane
key="4" key="4"
tab={<TabCountElement text="退货入库待审核" count={tabInfoData.returnWaitAuditNum} />} tab={<TabCountElement text={$t('return.pending.review')} count={tabInfoData.returnWaitAuditNum} />}
/> />
<TabPane <TabPane
key="5" key="5"
tab={<TabCountElement text="已完成" count={tabInfoData.afterSalseDoneNum} />} tab={<TabCountElement text={$t('completed')} count={tabInfoData.afterSalseDoneNum} />}
/> />
</Tabs> </Tabs>
</div> </div>
......
...@@ -49,7 +49,7 @@ export default props => { ...@@ -49,7 +49,7 @@ export default props => {
}; };
const viewProofs = proofs => { const viewProofs = proofs => {
if (!proofs) { if (!proofs) {
notification.warning({ message: '该订单没有凭证' }); notification.warning({ message: $t('no.credentials.for.this.order') });
return; return;
} }
const list = proofs.replace(/(\uff1b|\uff0c|\u003b)/g, ',').split(','); const list = proofs.replace(/(\uff1b|\uff0c|\u003b)/g, ',').split(',');
...@@ -62,7 +62,7 @@ export default props => { ...@@ -62,7 +62,7 @@ export default props => {
auditResult: 1, auditResult: 1,
}); });
if (data.businessCode === '0000') { if (data.businessCode === '0000') {
notification.success({ message: '操作成功' }); notification.success({ message: $t('operation.success') });
closeModal(true); closeModal(true);
} }
}; };
...@@ -80,7 +80,7 @@ export default props => { ...@@ -80,7 +80,7 @@ export default props => {
}; };
const data = await trackInfo({ expressCompanyCode, logisticsNo: deliveryNo }); const data = await trackInfo({ expressCompanyCode, logisticsNo: deliveryNo });
if (!data) { if (!data) {
notification.info({ message: '暂无物流信息' }); notification.info({ message: $t('no.logistics.info') });
return; return;
} }
tempObj.expressCompanyName = data.logisticsName; tempObj.expressCompanyName = data.logisticsName;
...@@ -101,27 +101,27 @@ export default props => { ...@@ -101,27 +101,27 @@ export default props => {
const columns = [ const columns = [
...columnPassAudit, ...columnPassAudit,
{ {
title: '售后凭证', title: $t('aftersales.proof'),
dataIndex: 'proofs', dataIndex: 'proofs',
hideInSearch: true, hideInSearch: true,
width: 120, width: 120,
order: 4, order: 4,
render: (_, r) => <a onClick={() => viewProofs(r.proofs)}>查看凭证</a>, render: (_, r) => <a onClick={() => viewProofs(r.proofs)}>{$t('view.proof')}</a>,
}, },
{ {
title: '售后申诉', title: $t('aftersales.appeal'),
dataIndex: 'appealFlag', dataIndex: 'appealFlag',
hideInSearch: true, hideInSearch: true,
width: 120, width: 120,
render: (appealFlag, r) => { render: (appealFlag, r) => {
if (appealFlag) { if (appealFlag) {
return <a onClick={() => viewAppeal(r)}>已申诉</a>; return <a onClick={() => viewAppeal(r)}>{$t('appealed')}</a>;
} }
return <div> 未申诉</div>; return <div>{$t('not.appealed')}</div>;
}, },
}, },
{ {
title: '操作', title: $t('actions'),
hideInSearch: true, hideInSearch: true,
width: 300, width: 300,
dataIndex: 'action', dataIndex: 'action',
...@@ -129,15 +129,15 @@ export default props => { ...@@ -129,15 +129,15 @@ export default props => {
render: (_, r) => { render: (_, r) => {
const operations = [ const operations = [
<Popconfirm <Popconfirm
title="确定允许退款?" title={$t('confirm.refund.approval')}
onConfirm={() => refund(r)} onConfirm={() => refund(r)}
okText="确认" okText={$t('confirm')}
cancelText="取消" cancelText={$t('cancel')}
key="pop" key="pop"
disabled={!r.showRefund} disabled={!r.showRefund}
> >
<Button key="link1" className="mr10 mt10" type="primary" disabled={!r.showRefund}> <Button key="link1" className="mr10 mt10" type="primary" disabled={!r.showRefund}>
{r.showRefunded ? '已退款' : '允许退款'} {r.showRefunded ? $t('refunded') : $t('allow.refund')}
</Button> </Button>
</Popconfirm>, </Popconfirm>,
<Button <Button
...@@ -146,24 +146,16 @@ export default props => { ...@@ -146,24 +146,16 @@ export default props => {
type="primary" type="primary"
className="mr10 mt10" className="mr10 mt10"
disabled={!r.showRefuse} disabled={!r.showRefuse}
> >{$t('reject')}</Button>,
驳回 <Button key="link3" onClick={() => viewDetail(r)} type="primary" className="mr10 mt10">{$t('order.details')}</Button>,
</Button>,
<Button key="link3" onClick={() => viewDetail(r)} type="primary" className="mr10 mt10">
订单详情
</Button>,
<Button <Button
key="link4" key="link4"
onClick={() => handleCom(r)} onClick={() => handleCom(r)}
type="primary" type="primary"
className="mr10 mt10" className="mr10 mt10"
disabled={!r.showLogistics} disabled={!r.showLogistics}
> >{$t('view.logistics')}</Button>,
查看物流 <Button className="mr10 mt10" type="primary" onClick={() => viewLog(r)}>{$t('view.records')}</Button>,
</Button>,
<Button className="mr10 mt10" type="primary" onClick={() => viewLog(r)}>
查看记录
</Button>,
]; ];
// 没权限返回详情、查看物流、查看记录 // 没权限返回详情、查看物流、查看记录
......
...@@ -9,7 +9,7 @@ const LogisticsCom = props => { ...@@ -9,7 +9,7 @@ const LogisticsCom = props => {
return ( return (
<Modal <Modal
destroyOnClose destroyOnClose
title="查看记录" title={$t('view.records')}
visible={visible} visible={visible}
onCancel={() => onCancel()} onCancel={() => onCancel()}
onOk={() => onCancel()} onOk={() => onCancel()}
...@@ -26,11 +26,9 @@ const LogisticsCom = props => { ...@@ -26,11 +26,9 @@ const LogisticsCom = props => {
))} ))}
</Timeline> </Timeline>
) : ( ) : (
'暂无查看记录' $t('no.view.records')
)} )}
<Button type="primary" onClick={props.onCancel} className={styles.logBtn}> <Button type="primary" onClick={props.onCancel} className={styles.logBtn}>{$t('close')}</Button>
关闭
</Button>
</Modal> </Modal>
); );
}; };
......
...@@ -8,21 +8,21 @@ export default props => { ...@@ -8,21 +8,21 @@ export default props => {
}; };
const columns = [ const columns = [
{ {
title: '商品名称', title: $t('product.name'),
width: 400, width: 400,
dataIndex: 'skuName', dataIndex: 'skuName',
}, },
{ {
title: '商品属性', title: $t('product.attributes'),
dataIndex: 'skuAttr', dataIndex: 'skuAttr',
}, },
{ {
title: '商品件数', title: $t('item.count'),
dataIndex: 'count', dataIndex: 'count',
}, },
]; ];
return ( return (
<Modal title="订单详情" visible={visible} onCancel={handleCancel} footer={null} width={800}> <Modal title={$t('order.details')} visible={visible} onCancel={handleCancel} footer={null} width={800}>
<Table dataSource={dataSource} columns={columns} key="skuName" pagination={false} bordered /> <Table dataSource={dataSource} columns={columns} key="skuName" pagination={false} bordered />
</Modal> </Modal>
); );
......
This diff is collapsed.
...@@ -14,10 +14,10 @@ function AfterSale(props) { ...@@ -14,10 +14,10 @@ function AfterSale(props) {
return ( return (
<PageHeaderWrapper> <PageHeaderWrapper>
<Tabs defaultActiveKey="1"> <Tabs defaultActiveKey="1">
<TabPane tab="未审核" key="1"> <TabPane tab={$t('unaudited')} key="1">
<Pending canEditable={canEditable} /> <Pending canEditable={canEditable} />
</TabPane> </TabPane>
<TabPane tab="已审核" key="2"> <TabPane tab={$t('reviewed')} key="2">
<PassAudit canEditable={canEditable} /> <PassAudit canEditable={canEditable} />
</TabPane> </TabPane>
</Tabs> </Tabs>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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