Commit e970c1c3 authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

feat: 物流能力国际化

parent 5b5f4796
export default {
'logistics.shoujihaoma': '手机号码',
'logistics.fanhui': '返回',
'logistics.baocun': '保存',
'logistics.ninhaiyouweibao': '您还有未保存的内容,是否确定要离开?',
'logistics.fahuoren': '发货人',
'logistics.qingshurufahuo': '请输入发货人',
'logistics.shengfen/zhi': '-省份/直辖市-',
'logistics.shiqu': '-市-',
'logistics.qu': '-区/县-',
'logistics.xiangxidizhi': '详细地址',
'logistics.qingshuruxiangxi': '请输入详细地址',
'logistics.youbian': '邮编',
'logistics.qingxuanze': '请选择',
'logistics.qingshurunide': '请输入你的手机号码',
'logistics.qingshuruzhengque': '请输入正确格式的手机号',
'logistics.dianhuahaoma': '电话号码',
'logistics.qingshurunide1': '请输入你的电话号码',
'logistics.qingshuruzhengque1': '请输入正确格式的电话号码',
'logistics.shifoumoren': '是否默认',
'logistics.shouhuoren': '收货人',
'logistics.qingshurushouhuo': '请输入收货人',
'logistics.jiedao': '-街道/乡/镇--',
'logistics.zhakan': '查看',
'logistics.xinjian': '新建',
'logistics.bianji': '编辑',
'logistics.yunfeimuban': '运费模板',
'logistics.jibenxinxi': '基本信息',
'logistics.mubanmingcheng': '模板名称',
'logistics.qingshurumuban': '请输入模板名称',
'logistics.jijiafangshi': '计价方式',
'logistics.anzhongliang': '按重量',
'logistics.yunsongfangshi': '运送方式',
'logistics.kuaidi': '快递',
'logistics.morenyunfei': '默认运费',
'logistics.nei': '内',
'logistics.shuzileixing3': '数字类型,可保留3位小数',
'logistics.yuan': '元',
'logistics.shuzileixing2': '数字类型,可保留2位小数',
'logistics.meizengjia': '每增加',
'logistics.zengjiayunfei': '增加运费',
'logistics.yunfeishuoming': '运费说明',
'logistics.zuichang60gezi': '最长60个字符,30个汉字',
'logistics.zhidingdiquyun': '指定地区运费',
'logistics.caozuo': '操作',
'logistics.shanchu': '删除',
'logistics.tianjiazhidingdi': '添加指定地区',
'logistics.yunsongdao': '运送到',
'logistics.shoujian': '首件(件/KG)',
'logistics.shoufei': '首费(元)',
'logistics.xujian': '续件(件/KG)',
'logistics.xufei': '续费(元)',
'logistics.xinjianfahuodi': '新建发货地址',
'logistics.shouhuodiqu': '收货地区',
'logistics.zhuangtai': '状态',
'logistics.quedingyaoshanchu': '确定要删除吗?',
'logistics.shi': '是',
'logistics.fou': '否',
}
import React, { useState, useEffect, useMemo, useRef } from 'react';
import { Card, Spin, Button } from 'antd';
import { history, Prompt } from 'umi';
import { getIntl, history, Prompt } from 'umi';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import NiceForm from '@/components/NiceForm';
import ReutrnEle from '@/components/ReturnEle';
......@@ -10,7 +10,7 @@ import { useLinkEnumEffect } from '@/components/NiceForm/linkages/linkEnum';
import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
import styles from './index.less';
import { getManageAreaAll, getManageAreaByPcode, getManageCountryAreaGetTelCode } from '@/services/ManageV2Api';
const intl = getIntl();
const formActions = createFormActions();
const {
onFormInputChange$,
......@@ -65,7 +65,7 @@ const AddressForm: React.FC<AddressFormProps> = (props: any) => {
const PhoneLabel = (
<div className={styles.label}>
手机号码
{intl.formatMessage({ id: 'logistics.shoujihaoma'})}
</div>
);
......@@ -137,7 +137,7 @@ const AddressForm: React.FC<AddressFormProps> = (props: any) => {
<Spin spinning={infoLoading}>
<PageHeaderWrapper
onBack={() => history.goBack()}
backIcon={<ReutrnEle description="返回" />}
backIcon={<ReutrnEle description={intl.formatMessage({ id: 'logistics.fanhui' })} />}
extra={[
(isEdit && <Button
key="1"
......@@ -146,7 +146,7 @@ const AddressForm: React.FC<AddressFormProps> = (props: any) => {
loading={submitLoading}
onClick={() => formActions.submit()}
>
保存
{intl.formatMessage({ id: 'logistics.baocun' })}
</Button>)
]}
>
......@@ -222,7 +222,7 @@ const AddressForm: React.FC<AddressFormProps> = (props: any) => {
/>
</Card>
</PageHeaderWrapper>
<Prompt when={unsaved} message="您还有未保存的内容,是否确定要离开?" />
<Prompt when={unsaved} message={intl.formatMessage({ id: 'logistics.ninhaiyouweibao' })}/>
</Spin>
)
}
......
......@@ -10,7 +10,7 @@ import {
SchemaMarkupField as Field,
createFormActions,
} from '@formily/antd'
import { history, Prompt } from 'umi'
import { getIntl, history, Prompt } from 'umi'
import { Row, Col, Card, Button, Select as ISelect } from 'antd';
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import {
......@@ -22,6 +22,8 @@ import ReutrnEle from '@/components/ReturnEle'
import { PATTERN_MAPS } from '@/constants/regExp'
import { getManageAreaByPcodeAll } from '@/services/ManageV2Api';
import { getLogisticsFreightTemplateGet, postLogisticsFreightTemplateAdd, postLogisticsFreightTemplateUpdate } from '@/services/LogisticsV2Api';
const intl = getIntl();
//列表带来的参数
export interface ListProps {
title?: React.ReactNode
......@@ -406,6 +408,6 @@ const diaLogForm: React.FC<ListProps> = (props) => {
)
}
diaLogForm.defaultProps = {
title: '新建发货地址12'
title: '新建发货地址'
}
export default diaLogForm
import React, { useRef } from 'react';
import { history } from 'umi';
import { getIntl, history } from 'umi';
import { Button, Row, Col, Space, Popconfirm, Switch } from 'antd';
import Table from '@/pages/transaction/components/tableLayout';
import { ColumnType } from 'antd/lib/table/interface';
......@@ -8,7 +8,7 @@ import { PlusOutlined } from '@ant-design/icons';
import StatusSwitch from '@/components/StatusSwitch';
import EyePreview from '@/components/EyePreview';
import { getLogisticsFreightTemplatePage, postLogisticsFreightTemplateDelete, postLogisticsFreightTemplateEnable } from '@/services/LogisticsV2Api';
const intl = getIntl();
const STATUS = {
/** 有效 */
VALID: 1,
......
import React, { useCallback, useEffect, useState, useMemo } from 'react';
import { Card, Spin, Button } from 'antd';
import { history, Prompt } from 'umi';
import { getIntl, history, Prompt } from 'umi';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import NiceForm from '@/components/NiceForm';
import ReutrnEle from '@/components/ReturnEle';
......@@ -13,7 +13,7 @@ import { FORM_FILTER_PATH } from '@/formSchema/const';
import { ColumnType } from 'antd/lib/table/interface';
import { getLogisticsCompanyGet, getLogisticsSelectListMemberCompanySelected, postLogisticsCompanyAdd, postLogisticsCompanyUpdate } from '@/services/LogisticsV2Api';
import { postMemberManageLogisticsPage } from '@/services/MemberV2Api';
const intl = getIntl();
const formActions = createFormActions();
const {
onFieldChange$,
......
import React, { useState, useEffect } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { history, Prompt } from 'umi';
import { getIntl, history, Prompt } from 'umi';
import ReutrnEle from '@/components/ReturnEle';
import { Button, Card, Spin } from 'antd';
import NiceForm from '@/components/NiceForm';
......@@ -11,7 +11,7 @@ import { createFormActions, FormEffectHooks } from '@formily/antd'
import { getLogisticsReceiverAddressGet, postLogisticsReceiverAddressAdd, postLogisticsReceiverAddressUpdate } from '@/services/LogisticsV2Api';
import { SaveOutlined } from '@ant-design/icons';
import { useFetchAreaEnumLinkageEffect } from '@/components/AddressSelect';
const intl = getIntl();
export interface AddressModalProps {
/** 类型 */
mode: 'add' | 'edit' | 'preview' | 'default',
......@@ -157,11 +157,11 @@ const AddedAddressLayout: React.FC<AddressModalProps> = (props) => {
properties: {
receiverName: {
type: 'string',
title: '收货人',
title: intl.formatMessage({ id: 'logistics.logistics.shouhuoren' }),
"x-rules": [
{
required: true,
message: '请输入收货人',
message: intl.formatMessage({ id: 'logistics.logistics.qingshurushouhuo' }),
},
{
limitByte: true,
......@@ -192,7 +192,7 @@ const AddedAddressLayout: React.FC<AddressModalProps> = (props) => {
enum: [],
required: true,
"x-component-props": {
placeholder: '-省份/直辖市-',
placeholder: intl.formatMessage({ id: 'logistics.shengfen/zhi' }),
},
"x-mega-props": {
span: 1
......@@ -211,7 +211,7 @@ const AddedAddressLayout: React.FC<AddressModalProps> = (props) => {
enum: [],
required: true,
"x-component-props": {
placeholder: '-市-',
placeholder: intl.formatMessage({ id: 'logistics.shiqu' }),
},
"x-mega-props": {
span: 1
......@@ -266,7 +266,7 @@ const AddedAddressLayout: React.FC<AddressModalProps> = (props) => {
rows: 3,
placeholder: '',
},
title: '详细地址',
title: intl.formatMessage({ id: 'logistics.xiangxidizhi' }),
"x-rules": [
{
required: true,
......@@ -280,7 +280,7 @@ const AddedAddressLayout: React.FC<AddressModalProps> = (props) => {
},
postalCode: {
type: 'string',
title: '邮编',
title: intl.formatMessage({ id: 'logistics.youbian' }),
"x-rules": [
{
limitByte: true,
......@@ -311,7 +311,7 @@ const AddedAddressLayout: React.FC<AddressModalProps> = (props) => {
type: 'string',
enum: [],
'x-component-props': {
placeholder: '请选择',
placeholder: intl.formatMessage({ id: 'logistics.qingxuanze' }),
},
},
phone: {
......@@ -321,13 +321,13 @@ const AddedAddressLayout: React.FC<AddressModalProps> = (props) => {
span: 3,
},
'x-component-props': {
placeholder: '请输入你的手机号码',
placeholder: intl.formatMessage({ id: 'logistics.qingshurunide' }),
maxLength: 11,
},
'x-rules': [
{
pattern: PATTERN_MAPS.phone,
message: '请输入正确格式的手机号',
message: intl.formatMessage({ id: 'logistics.qingshuruzhengque' }),
},
],
},
......@@ -336,11 +336,11 @@ const AddedAddressLayout: React.FC<AddressModalProps> = (props) => {
}
},
tel: {
title: '电话号码',
title: intl.formatMessage({ id: 'logistics.dianhuahaoma' }),
type: 'string'
},
isDefault: {
title: '是否默认',
title: intl.formatMessage({ id: 'logistics.logistics.shifoumoren' }),
type: 'boolean',
"x-mega-props": {
wrapperWidth: 36
......
......@@ -32,7 +32,7 @@ const ReceivingAddress = () => {
dataIndex: 'fullAddress',
},
{
title: '邮编',
title: intl.formatMessage({ id: 'logistics.youbian' }),
key: 'postalCode',
dataIndex: 'postalCode',
},
......@@ -42,12 +42,12 @@ const ReceivingAddress = () => {
dataIndex: 'phone',
},
{
title: '电话号码',
title: intl.formatMessage({ id: 'logistics.dianhuahaoma' }),
key: 'tel',
dataIndex: 'tel',
},
{
title: '是否默认',
title: intl.formatMessage({ id: 'logistics.logistics.shifoumoren' }),
key: 'isDefault',
dataIndex: 'isDefault',
render: (text) => <Switch disabled defaultChecked={text == 0 ? false : true} />
......
import React, { useState, useEffect } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { history, Prompt } from 'umi';
import { getIntl, history, Prompt } from 'umi';
import ReutrnEle from '@/components/ReturnEle';
import { Button, Card, Spin } from 'antd';
import NiceForm from '@/components/NiceForm';
......@@ -12,7 +12,7 @@ import { getLogisticsShipperAddressGet, postLogisticsShipperAddressAdd, postLogi
import { SaveOutlined } from '@ant-design/icons';
import { isEmpty } from 'lodash';
import { useFetchAreaEnumLinkageEffect } from '@/components/AddressSelect';
const intl = getIntl();
export interface AddressModalProps {
/** 类型 */
mode: 'add' | 'edit' | 'preview' | 'default',
......@@ -158,11 +158,11 @@ const AddedAddressLayout: React.FC<AddressModalProps> = (props) => {
properties: {
shipperName: {
type: 'string',
title: '发货人',
title: intl.formatMessage({ id: 'logistics.fahuoren' }),
"x-rules": [
{
required: true,
message: '请输入发货人',
message: intl.formatMessage({ id: 'logistics.qingshurufahuo' }),
},
{
limitByte: true,
......@@ -193,7 +193,7 @@ const AddedAddressLayout: React.FC<AddressModalProps> = (props) => {
enum: [],
required: true,
"x-component-props": {
placeholder: '-省份/直辖市-',
placeholder: intl.formatMessage({ id: 'logistics.shengfen/zhi' }),
},
"x-mega-props": {
span: 1
......@@ -212,7 +212,7 @@ const AddedAddressLayout: React.FC<AddressModalProps> = (props) => {
enum: [],
required: true,
"x-component-props": {
placeholder: '-市-',
placeholder: intl.formatMessage({ id: 'logistics.shiqu' }),
},
"x-mega-props": {
span: 1
......@@ -267,7 +267,7 @@ const AddedAddressLayout: React.FC<AddressModalProps> = (props) => {
rows: 3,
placeholder: '',
},
title: '详细地址',
title: intl.formatMessage({ id: 'logistics.xiangxidizhi' }),
"x-rules": [
{
required: true,
......@@ -281,7 +281,7 @@ const AddedAddressLayout: React.FC<AddressModalProps> = (props) => {
},
postalCode: {
type: 'string',
title: '邮编',
title: intl.formatMessage({ id: 'logistics.youbian' }),
"x-rules": [
{
limitByte: true,
......@@ -312,7 +312,7 @@ const AddedAddressLayout: React.FC<AddressModalProps> = (props) => {
type: 'string',
enum: [],
'x-component-props': {
placeholder: '请选择',
placeholder: intl.formatMessage({ id: 'logistics.qingxuanze' }),
},
},
phone: {
......@@ -322,13 +322,13 @@ const AddedAddressLayout: React.FC<AddressModalProps> = (props) => {
span: 3,
},
'x-component-props': {
placeholder: '请输入你的手机号码',
placeholder: intl.formatMessage({ id: 'logistics.qingshurunide' }),
maxLength: 11,
},
'x-rules': [
{
pattern: PATTERN_MAPS.phone,
message: '请输入正确格式的手机号',
message: intl.formatMessage({ id: 'logistics.qingshuruzhengque' }),
},
],
},
......@@ -337,11 +337,11 @@ const AddedAddressLayout: React.FC<AddressModalProps> = (props) => {
}
},
tel: {
title: '电话号码',
title: intl.formatMessage({ id: 'logistics.dianhuahaoma' }),
type: 'string'
},
isDefault: {
title: '是否默认',
title: intl.formatMessage({ id: 'logistics.logistics.shifoumoren' }),
type: 'boolean',
"x-mega-props": {
wrapperWidth: 36
......@@ -354,7 +354,7 @@ const AddedAddressLayout: React.FC<AddressModalProps> = (props) => {
/>
</Card>
</PageHeaderWrapper>
<Prompt when={unsaved} message="您还有未保存的内容,是否确定要离开?" />
<Prompt when={unsaved} message={intl.formatMessage({ id: 'logistics.ninhaiyouweibao' })} />
</Spin>
)
}
......
......@@ -32,7 +32,7 @@ const ShipmentsAddress = () => {
dataIndex: 'fullAddress',
},
{
title: '邮编',
title: intl.formatMessage({ id: 'logistics.youbian' }),
key: 'postalCode',
dataIndex: 'postalCode',
},
......@@ -42,12 +42,12 @@ const ShipmentsAddress = () => {
dataIndex: 'phone',
},
{
title: '电话号码',
title: intl.formatMessage({ id: 'logistics.dianhuahaoma' }),
key: 'tel',
dataIndex: 'tel',
},
{
title: '是否默认',
title: intl.formatMessage({ id: 'logistics.logistics.shifoumoren' }),
key: 'isDefault',
dataIndex: 'isDefault',
render: (text) => <Switch disabled defaultChecked={text == 0 ? false : true} />
......
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