Browse Source

中英文翻译

master_hella_20240701
yufei0306 6 months ago
parent
commit
f22b2279ae
  1. 2
      src/components/Annex/src/Annex.vue
  2. 5
      src/components/Descriptions/src/Descriptions.vue
  3. 4
      src/components/Detail/src/Detail.vue
  4. 5
      src/components/DictTag/src/DictTag.vue
  5. 5
      src/components/Remarks/src/Remarks.vue
  6. 3
      src/components/Tabs/src/Tabs.vue
  7. 15
      src/components/UploadFile/src/UploadFile.vue
  8. 24
      src/locales/en-US.ts
  9. 24
      src/locales/zh-CN.ts
  10. 3
      src/views/home/components/supplierIndex.vue

2
src/components/Annex/src/Annex.vue

@ -3,7 +3,7 @@
<div class="annex">
<div class="title flex items-center">
<!-- <div class="title-txt">附件</div> -->
<UploadFile :isShowFile="false" :isShowTip="false" :fileType="fileType" title="添加附件" :upData="upData" :limit="10"
<UploadFile :isShowFile="false" :isShowTip="false" :fileType="fileType" :title="t('ts.添加附件')" :upData="upData" :limit="10"
@update:modelValue="handleAnnexSuccess" v-if="annexData.annexList.length<5"/>
</div>
<div class="list">

5
src/components/Descriptions/src/Descriptions.vue

@ -5,6 +5,7 @@ import { useDesign } from '@/hooks/web/useDesign'
import { propTypes } from '@/utils/propTypes'
import { useAppStore } from '@/store/modules/app'
import { DescriptionsSchema } from '@/types/descriptions'
const { t } = useI18n() //
defineOptions({ name: 'Descriptions' })
@ -99,7 +100,7 @@ const showAll = () =>{
>
<div :class="[`${prefixCls}-header__title`, 'relative font-18px font-bold ml-10px']">
<div class="flex items-center">
{{ title }}
{{ t(`ts.${title}`).replace('ts.', '') }}
<ElTooltip v-if="message" :content="message" placement="right">
<Icon class="ml-5px" icon="ep:warning" />
</ElTooltip>
@ -133,7 +134,7 @@ const showAll = () =>{
:row="{
label: item.label
}"
>{{ item.label }}
>{{ t(`ts.${item.label}`).replace('ts.', '') }}
</slot>
</template>

4
src/components/Detail/src/Detail.vue

@ -2,14 +2,14 @@
<div>
<el-drawer
v-model="isShowDrawer"
title="详情"
:title="t(`ts.详情`).replace('ts.','')"
direction="rtl"
size="80%"
v-loading="detailLoading"
>
<template #header>
<div class="font-size-18px">
{{ titleValueRef }} <span class="ml-20px font-size-16px">{{ titleNameRef }}</span>
{{ titleValueRef }} <span class="ml-20px font-size-16px">{{ t(`ts.${titleNameRef}`).replace('ts.','') }}</span>
</div>
</template>
<Tabs ref="tabRef" :tabsList="tabsList" :current="current" @change="change" />

5
src/components/DictTag/src/DictTag.vue

@ -3,6 +3,7 @@ import { defineComponent, PropType, ref } from 'vue'
import { isHexColor } from '@/utils/color'
import { ElTag } from 'element-plus'
import { DictDataType, getDictOptions } from '@/utils/dict'
const { t } = useI18n() //
export default defineComponent({
name: 'DictTag',
@ -55,7 +56,7 @@ export default defineComponent({
}
disableTransitions={true}
>
{dictData.value?.label}
{t(`ts.${dictData.value?.label}`).replace('ts.', '')}
</ElTag>
)
} else {
@ -71,7 +72,7 @@ export default defineComponent({
}
disableTransitions={true}
>
{item?.label}
{t(`ts.${item?.label}`).replace('ts.', '')}
</ElTag>
})
)

5
src/components/Remarks/src/Remarks.vue

@ -20,9 +20,9 @@
</div>
</div>
<div class="add-remarks flex items-center mt-20px">
<el-input v-model="data.remark" placeholder="请输入备注" />
<el-input v-model="data.remark" :placeholder="t('ts.请输入备注')" />
<el-button class="ml-16px" type="primary" @click="handleSubmitrRemarks" >
确定
{{t('ts.确定')}}
</el-button>
</div>
</div>
@ -32,6 +32,7 @@
const message = useMessage() //
import * as RemarkApi from '@/api/wms/remark'
import { formatDate } from '@/utils/formatTime'
const { t } = useI18n() //
defineComponent({
name: 'Annex'

3
src/components/Tabs/src/Tabs.vue

@ -1,7 +1,7 @@
<!-- tabs组件 -->
<template>
<div class="tabs flex items-center">
<div :class="current == index ? 'active' : ''" v-for="(item, index) in tabsList" :key="index" @click="change(item, index)">{{ item.label }}</div>
<div :class="current == index ? 'active' : ''" v-for="(item, index) in tabsList" :key="index" @click="change(item, index)">{{ t(`ts.${item.label}`).replace('ts.','') }}</div>
</div>
</template>
@ -9,6 +9,7 @@
// const message = useMessage() //
import { emit } from "process";
const { t } = useI18n() //
// const { t } = useI18n() //
defineComponent({

15
src/components/UploadFile/src/UploadFile.vue

@ -42,6 +42,7 @@ import { PropType } from 'vue'
import { propTypes } from '@/utils/propTypes'
import { getAccessToken, getTenantId } from '@/utils/auth'
import type { UploadInstance, UploadUserFile, UploadProps, UploadRawFile } from 'element-plus'
const { t } = useI18n() //
defineOptions({ name: 'UploadFile' })
@ -78,7 +79,7 @@ const uploadHeaders = ref({
//
const beforeUpload: UploadProps['beforeUpload'] = (file: UploadRawFile) => {
if (fileList.value.length >= props.limit) {
message.error(`上传文件数量不能超过${props.limit}!`)
message.error(`${t('ts.上传文件数量不能超过')}${props.limit}!`)
return false
}
let fileExtension = ''
@ -91,14 +92,14 @@ const beforeUpload: UploadProps['beforeUpload'] = (file: UploadRawFile) => {
})
const isLimit = file.size < props.fileSize * 1024 * 1024
if (!isImg) {
message.error(`文件格式不正确, 请上传${props.fileType.join('/')}格式!`)
message.error(`${t(`ts.${'文件格式不正确, 请上传'}`)}${props.fileType.join('/')}${t('ts.格式')}!`)
return false
}
if (!isLimit) {
message.error(`上传文件大小不能超过${props.fileSize}MB!`)
message.error(`${t('ts.上传文件大小不能超过')}${props.fileSize}MB!`)
return false
}
message.success('正在上传文件,请稍候...')
message.success(t(`ts.${'正在上传文件,请稍候'}`))
uploadNumber.value++
}
//
@ -107,7 +108,7 @@ const beforeUpload: UploadProps['beforeUpload'] = (file: UploadRawFile) => {
// }
//
const handleFileSuccess: UploadProps['onSuccess'] = (res: any,uploadFile: any): void => {
message.success('上传成功')
message.success(t('ts.上传成功'))
const fileListNew = fileList.value
fileListNew.pop()
fileList.value = fileListNew
@ -121,11 +122,11 @@ const handleFileSuccess: UploadProps['onSuccess'] = (res: any,uploadFile: any):
}
//
const handleExceed: UploadProps['onExceed'] = (): void => {
message.error(`上传文件数量不能超过${props.limit}!`)
message.error(`${t('ts.上传文件数量不能过')}${props.limit}!`)
}
//
const excelUploadError: UploadProps['onError'] = (): void => {
message.error('导入数据失败,请您重新上传!')
message.error(t(`ts.导入数据失败,请您重新上传`))
}
//
const handleRemove = (file) => {

24
src/locales/en-US.ts

@ -1063,6 +1063,30 @@ export default {
:'Purchasing price approver',
:'Supplier\'s invoice number',
:'loading',
:'Please enter remarks',
'正在上传文件,请稍候':'Please wait while uploading files',
:'upload successful',
:'The number of uploaded files cannot exceed',
'导入数据失败,请您重新上传':'Failed to import data, please upload again!',
:'The size of the uploaded file cannot exceed',
'文件格式不正确, 请上传':'The file format is incorrect. Please upload it in',
:'format',
:'consignee',
:'phone',
:'delivery date',
:'Platform code',
:'Deadline',
:'Warehouse code',
'ERP单据号(无用)':'ERP document number (useless)',
:'Supplier approver',
:'Supplier approval time',
:'courier number',
:'Invoicing calendar management',
:'description'
},

24
src/locales/zh-CN.ts

@ -1063,6 +1063,30 @@ export default {
:'采购价格审批人',
:'供应商发货单号',
:'加载中',
:'请输入备注',
'正在上传文件,请稍候':'正在上传文件,请稍候...',
:'上传成功',
:'上传文件数量不能超过',
'导入数据失败,请您重新上传':'导入数据失败,请您重新上传!',
:'上传文件大小不能超过',
'文件格式不正确, 请上传':'文件格式不正确, 请上传',
:'格式',
:'收货人',
:'联系电话',
:'送达日期',
:'月台代码',
:'截止日期',
:'仓库代码',
'ERP单据号(无用)':'ERP单据号(无用)',
:'供应商审批人',
:'供应商审批时间',
:'快递单号',
:'开票日历管理',
:'描述'
},

3
src/views/home/components/supplierIndex.vue

@ -231,7 +231,8 @@
import { set } from 'lodash-es'
import { EChartsOption } from 'echarts'
import { lineOptions, pieOptions } from '../echarts-data'
import { formatDate } from '@/utils/formatTime'
import { formatDate,dateFormatter } from '@/utils/formatTime'
import * as NotifyMessageApi from '@/api/system/notify/message'
import * as IndexApi from '@/api/home'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'

Loading…
Cancel
Save