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

fix: 修改翻译

parent 7f77e82f
......@@ -51,6 +51,10 @@
&-anchors {
display: flex;
align-items: center;
&:hover {
overflow-x: auto;
}
}
:global {
......
......@@ -78,12 +78,12 @@ const HeaderDropdown: React.FC = () => {
console.log(getLocale(), "locale")
if (locales) {
setLocale(locales as any, true);
removeCookie('locales', { path: '/', domain: getTopDomainByHost(TOP_DOMAIN_NO_PORT, true) })
}
setCurrentLangKey(getLocale())
}, [])
const setLang = (langItem: countryItem) => {
removeCookie('locales', { path: '/', domain: getTopDomainByHost(TOP_DOMAIN_NO_PORT, true) })
setLocale(langItem.key, true)
}
......
......@@ -9,7 +9,7 @@ export default {
'commodity.goods.columns.brand':'Brand',
'commodity.goods.columns.unit':'Unit',
'commodity.goods.columns.costPrice':'Into unit price',
'commodity.goods.columns.currency':'¥',
'commodity.goods.columns.currency':'$',
'commodity.goods.columns.batch':'Import batch',
'commodity.goods.columns.option':'Operation',
'commodity.goods.columns.option.button.1':'Modify',
......
......@@ -14,7 +14,6 @@ import { IButtonFilter, IFormFilter } from 'god/dist/src/standard-table/TableCon
import { getMemberRolePage, postMemberRoleDelete, postMemberRoleUpdatestatus } from '@/services/MemberV2Api';
import StatusSwitch from '@/components/StatusSwitch';
import EyePreview from '@/components/EyePreview';
import { STATUS_ENUM } from '@/constants';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import PopConfirmControl from '@/components/PopConfirmControl';
......@@ -94,6 +93,21 @@ const MemberSystem: React.FC<{}> = () => {
}
];
const STATUS_ENUM = [
{
label: intl.formatMessage({id: 'common.text.all'}),
value: null
},
{
label: intl.formatMessage({id: 'common.status.effective'}),
value: 1
},
{
label: intl.formatMessage({id: 'common.status.invalid'}),
value: 0
}
]
return (
<PageHeaderWrapper>
......
......@@ -12,6 +12,13 @@ import { getIntl } from 'umi';
const intl = getIntl();
const layout: any = {
colon: false,
labelCol: { style: { width: '174px' } },
wrapperCol: { span: 16 },
labelAlign: "left"
}
const AddInfo = (props: any) => {
const { currentRef, basicsData } = props;
const refs = useRef({});
......@@ -141,7 +148,7 @@ const AddInfo = (props: any) => {
const tagList: any = [];
res.data.payPlanList.map((item, index) => {
tagList.push({
name: item.payWay == 1 ? intl.formatMessage({id: 'contract.zhangqi'}) : item.payWay == 2 ? intl.formatMessage({id: 'contract.yuejie'}) : intl.formatMessage({id: 'contract.xianjie'}),
name: item.payWay == 1 ? intl.formatMessage({ id: 'contract.zhangqi' }) : item.payWay == 2 ? intl.formatMessage({ id: 'contract.yuejie' }) : intl.formatMessage({ id: 'contract.xianjie' }),
payParam: item.payParam,
Index: index + 1,
payWay: item.payWay,
......@@ -161,6 +168,7 @@ const AddInfo = (props: any) => {
return (
<div className={style.revise_info}>
<Form
{...layout}
form={attrValueForm}
name="edit_infomation"
layout="horizontal"
......@@ -178,47 +186,45 @@ const AddInfo = (props: any) => {
}}>
<Form.Item
label={intl.formatMessage({id: 'contract.qingkuandanzhaiyao'})}
label={intl.formatMessage({ id: 'contract.qingkuandanzhaiyao' })}
labelAlign="left"
labelCol={{ span: 4 }}
wrapperCol={{ span: 18 }}
name="applyAbstract"
rules={[
{
required: true,
message: intl.formatMessage({id: 'contract.qingshuruqingkuandanzhaiyao'}),
message: intl.formatMessage({ id: 'contract.qingshuruqingkuandanzhaiyao' }),
},
]}
>
<Input placeholder={intl.formatMessage({id: 'contract.qingshuruqingkuandanzhaiyao'})} />
<Input placeholder={intl.formatMessage({ id: 'contract.qingshuruqingkuandanzhaiyao' })} />
</Form.Item>
<Form.Item
label={intl.formatMessage({id: 'contract.hetongbianhao'})}
label={intl.formatMessage({ id: 'contract.hetongbianhao' })}
labelAlign="left"
labelCol={{ span: 4 }}
name="contractNo"
wrapperCol={{ span: 18 }}
>
<Input placeholder={intl.formatMessage({id: 'contract.zuichang60gezifu30ge'})} disabled />
<Input placeholder={intl.formatMessage({ id: 'contract.zuichang60gezifu30ge' })} disabled />
</Form.Item>
<Form.Item label={intl.formatMessage({id: 'contract.shoukuanfang'}) }labelAlign="left" labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
<Form.Item label={intl.formatMessage({ id: 'contract.shoukuanfang' })} labelAlign="left" >
<span>{basics.account}</span>
</Form.Item>
<Form.Item label={intl.formatMessage({id: 'contract.shoukuanzhanghao'})} labelAlign="left" labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
<Form.Item label={intl.formatMessage({ id: 'contract.shoukuanzhanghao' })} labelAlign="left" >
<span>{basics.payeeName}</span>
</Form.Item>
<Form.Item label={intl.formatMessage({id: 'contract.yinhangkahao'})} labelAlign="left" labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
<Form.Item label={intl.formatMessage({ id: 'contract.yinhangkahao' })} labelAlign="left" >
<span>{basics.bankAccount}</span>
</Form.Item>
<Form.Item label={intl.formatMessage({id: 'contract.kaihuhang'})} labelAlign="left" labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
<Form.Item label={intl.formatMessage({ id: 'contract.kaihuhang' })} labelAlign="left" >
<span>{basics.bankDeposit}</span>
</Form.Item>
<Form.Item
label={intl.formatMessage({id: 'contract.hetongfukuanjieduan'})}
label={intl.formatMessage({ id: 'contract.hetongfukuanjieduan' })}
labelAlign="left"
name="payPlanId"
initialValue={basics.payPlanId}
labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
>
<Select
onChange={(e) => onSelect(e)}
>
......@@ -229,36 +235,32 @@ const AddInfo = (props: any) => {
}
</Select>
</Form.Item>
<Form.Item label={intl.formatMessage({id: 'contract.hetongfukuanbili'})}
<Form.Item label={intl.formatMessage({ id: 'contract.hetongfukuanbili' })}
labelAlign="left"
labelCol={{ span: 4 }}
name="payRatio"
wrapperCol={{ span: 18 }}
initialValue={basics.payRatio}
>
<Input addonAfter="%" />
</Form.Item>
<Form.Item
label={intl.formatMessage({id: 'contract.qingkuanjine'})}
label={intl.formatMessage({ id: 'contract.qingkuanjine' })}
name="applyAmount"
labelAlign="left"
initialValue={basics.applyAmount}
labelCol={{ span: 4 }}
wrapperCol={{ span: 18 }}
rules={[
{
required: true,
message: intl.formatMessage({id: 'contract.qingshuruqingkuanjine'}),
message: intl.formatMessage({ id: 'contract.qingshuruqingkuanjine' }),
},
]}
>
<Input addonAfter={intl.formatMessage({id: 'contract.yuan'})} />
<Input addonAfter={intl.formatMessage({ id: 'contract.yuan' })} />
</Form.Item>
<Form.Item
label={intl.formatMessage({id: 'contract.yujifukuanshijian'})}
label={intl.formatMessage({ id: 'contract.yujifukuanshijian' })}
labelAlign="left"
labelCol={{ span: 4 }}
wrapperCol={{ span: 18 }}
name="expectPayTime"
>
<DatePicker
......@@ -272,7 +274,7 @@ const AddInfo = (props: any) => {
{
tag.length != 0 &&
<>
<Form.Item label={intl.formatMessage({id: 'contract.fukuanfangshi'})} labelAlign="left" labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
<Form.Item label={intl.formatMessage({ id: 'contract.fukuanfangshi' })} labelAlign="left" >
{
tag.map((item: any) => {
return (
......@@ -281,13 +283,13 @@ const AddInfo = (props: any) => {
})
}
</Form.Item>
<Form.Item label=" " labelAlign="left" labelCol={{ span: 4 }} wrapperCol={{ span: 18 }} >
<Form.Item label=" " labelAlign="left"  >
{/* * payWay 1 账期  2 月结 3 现结 */}
<Input addonAfter={Index === 2 ? intl.formatMessage({id: 'contract.tian'}) : Index === 3 ? intl.formatMessage({id: 'contract.hao'}) : null} value={tag[Index - 1].name === intl.formatMessage({id: 'contract.xianjie'}) ? '' : tag[Index - 1].payParam} disabled={tag[Index - 1].name === intl.formatMessage({id: 'contract.xianjie'}) ? true : false} />
<Input addonAfter={Index === 2 ? intl.formatMessage({ id: 'contract.tian' }) : Index === 3 ? intl.formatMessage({ id: 'contract.hao' }) : null} value={tag[Index - 1].name === intl.formatMessage({ id: 'contract.xianjie' }) ? '' : tag[Index - 1].payParam} disabled={tag[Index - 1].name === intl.formatMessage({ id: 'contract.xianjie' }) ? true : false} />
</Form.Item>
</>
}
<Form.Item label={intl.formatMessage({id: 'contract.zhifufangshi'})} labelAlign="left" labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
<Form.Item label={intl.formatMessage({ id: 'contract.zhifufangshi' })} labelAlign="left" >
<div
style={{
display: 'flex',
......@@ -302,7 +304,7 @@ const AddInfo = (props: any) => {
// marginRight: 20,
}}
>
<Option value="2" key={2}>{intl.formatMessage({id: 'contract.xianxiazhifu'})}</Option>
<Option value="2" key={2}>{intl.formatMessage({ id: 'contract.xianxiazhifu' })}</Option>
</Select>
<Select
......@@ -312,7 +314,7 @@ const AddInfo = (props: any) => {
width: '290px'
}}
>
<Option value="5" key={5}>{intl.formatMessage({id: 'contract.xianxiazhifuxianshangqueren'})}</Option>
<Option value="5" key={5}>{intl.formatMessage({ id: 'contract.xianxiazhifuxianshangqueren' })}</Option>
</Select>
</div>
</Form.Item>
......@@ -322,28 +324,26 @@ const AddInfo = (props: any) => {
flex: 1,
}}>
<Form.Item
label={intl.formatMessage({id: 'contract.qingkuanbeizhu'})}
label={intl.formatMessage({ id: 'contract.qingkuanbeizhu' })}
labelAlign="left"
name="remark"
labelCol={{ span: 4 }}
wrapperCol={{ span: 18 }}
rules={[
{
required: true,
message: intl.formatMessage({id: 'contract.qingshuruqingkuanbeizhu'}),
message: intl.formatMessage({ id: 'contract.qingshuruqingkuanbeizhu' }),
},
]}
>
<TextArea placeholder={intl.formatMessage({id: 'contract.zuichang160zifu80gehan'})} maxLength={160} style={{ height: 72 }} />
<TextArea placeholder={intl.formatMessage({ id: 'contract.zuichang160zifu80gehan' })} maxLength={160} style={{ height: 72 }} />
</Form.Item>
<Form.Item label={intl.formatMessage({id: 'contract.fapiaobianhaokaipiaori'})} labelAlign="left" labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
<Form.Item label={intl.formatMessage({ id: 'contract.fapiaobianhaokaipiaori' })} labelAlign="left" >
<span>{basics.number}</span>
</Form.Item>
<Form.Item label={intl.formatMessage({id: 'contract.danjushijian'})} labelAlign="left" labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
<Form.Item label={intl.formatMessage({ id: 'contract.danjushijian' })} labelAlign="left" >
<span>{basics.orderTime}</span>
</Form.Item>
<Form.Item label={intl.formatMessage({id: 'contract.neibuzhuangtai'})} labelAlign="left" labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
<Form.Item label={intl.formatMessage({ id: 'contract.neibuzhuangtai' })} labelAlign="left" >
<span>{basics.statusName}</span>
</Form.Item>
</div>
......
......@@ -66,13 +66,13 @@ const table = (props: any) => {
title: (
<Space direction='vertical'>
<Text>{intl.formatMessage({id: 'contract.danjujine'})}</Text>
<Text>{intl.formatMessage({id: 'contract.heji'})}: {toorderAmount}</Text>
<Text>{intl.formatMessage({id: 'contract.heji'})}: {intl.formatMessage({id: 'commodity.products.directChannel.columns.currency'})}{toorderAmount}</Text>
</Space>
),
dataIndex: 'orderAmount', align: 'center',
render: (text, record) =>
<div>
<div>{record.orderType == 2 ? `-${text}` : text}</div>
<div>{intl.formatMessage({id: 'commodity.products.directChannel.columns.currency'})}{record.orderType == 2 ? `-${text}` : text}</div>
</div>
},
......@@ -90,12 +90,12 @@ const table = (props: any) => {
title: (
<Space direction='vertical'>
<Text>{intl.formatMessage({id: 'contract.yifukuan'})}</Text>
<Text>{intl.formatMessage({id: 'contract.heji'})}: {topayAmount}</Text>
<Text>{intl.formatMessage({id: 'contract.heji'})}: {intl.formatMessage({id: 'commodity.products.directChannel.columns.currency'})}{topayAmount}</Text>
</Space>
),
render: (text) =>
<div>
<div>{text ? text : 0}</div>
<div>{intl.formatMessage({id: 'commodity.products.directChannel.columns.currency'})}{text ? text : 0}</div>
</div>
},
{
......@@ -103,12 +103,12 @@ const table = (props: any) => {
title: (
<Space direction='vertical'>
<Text>{intl.formatMessage({id: 'contract.yiqingkuandaifukuan'})}</Text>
<Text>{intl.formatMessage({id: 'contract.heji'})}: {tounPayApplyAmount}</Text>
<Text>{intl.formatMessage({id: 'contract.heji'})}: {intl.formatMessage({id: 'commodity.products.directChannel.columns.currency'})}{tounPayApplyAmount}</Text>
</Space>
),
render: (text, record) =>
<div>
<div>{text ? text : 0}</div>
<div>{intl.formatMessage({id: 'commodity.products.directChannel.columns.currency'})}{text ? text : 0}</div>
</div>
},
{
......@@ -116,13 +116,13 @@ const table = (props: any) => {
title: (
<Space direction='vertical'>
<Text>{intl.formatMessage({id: 'contract.qingkuanjine'})}</Text>
<Text>{intl.formatMessage({id: 'contract.heji'})}: {applyAmount}</Text>
<Text>{intl.formatMessage({id: 'contract.heji'})}: {intl.formatMessage({id: 'commodity.products.directChannel.columns.currency'})}{applyAmount}</Text>
</Space>
),
render: (_, item, index) =>
<Input
addonBefore="¥"
addonBefore={intl.formatMessage({id: 'commodity.products.directChannel.columns.currency'})}
style={{
width: 130,
}}
......@@ -257,7 +257,7 @@ const table = (props: any) => {
align: 'center',
render: (text, record) =>
<div>
<div>{text}</div>
<div>{intl.formatMessage({id: 'commodity.products.directChannel.columns.currency'})}{text}</div>
</div>
},
{
......@@ -266,7 +266,7 @@ const table = (props: any) => {
align: 'center',
render: (text, record) =>
<div>
<div>{text}</div>
<div>{intl.formatMessage({id: 'commodity.products.directChannel.columns.currency'})}{text}</div>
</div>
},
]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment