From d07354c9a58fd20a640f65d9034a8252c37adc21 Mon Sep 17 00:00:00 2001 From: hwj Date: Thu, 2 Jul 2026 11:33:58 +0800 Subject: [PATCH] =?UTF-8?q?style=EF=BC=9A=E5=AE=A2=E6=88=B7=E7=AE=A1?= =?UTF-8?q?=E7=90=86-?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.local | 5 +- src/locales/en.ts | 150 ++++++++++++++++++ src/locales/zh-CN.ts | 150 ++++++++++++++++++ src/views/mes/customer/CustomerForm.vue | 72 ++++----- src/views/mes/customer/CustomerImportForm.vue | 37 +++-- .../customer/detail/CustomerDetailsHeader.vue | 11 +- .../customer/detail/CustomerDetailsInfo.vue | 39 ++--- src/views/mes/customer/detail/index.vue | 61 +++---- src/views/mes/customer/index.vue | 90 +++++------ .../limitConfig/CustomerLimitConfigForm.vue | 22 +-- .../limitConfig/CustomerLimitConfigList.vue | 24 +-- src/views/mes/customer/limitConfig/index.vue | 5 +- .../customer/pool/CustomerDistributeForm.vue | 12 +- src/views/mes/customer/pool/index.vue | 59 +++---- src/views/mes/customer/poolConfig/index.vue | 24 +-- 15 files changed, 541 insertions(+), 220 deletions(-) diff --git a/.env.local b/.env.local index 5d330e83..3ea86036 100644 --- a/.env.local +++ b/.env.local @@ -8,8 +8,9 @@ VITE_DEV=true # 线上环境 # VITE_BASE_URL='https://besure.ngsk.tech:7001' # 本地联调 -# VITE_BASE_URL='http://192.168.5.142:48081' -VITE_BASE_URL='http://192.168.43.233:48081' +VITE_BASE_URL='http://192.168.5.37:48081' +# VITE_BASE_URL='http://47.106.185.127:8089' +# VITE_BASE_URL='http://192.168.43.233:48081' # VITE_BASE_URL='http://192.168.5.5:48081' diff --git a/src/locales/en.ts b/src/locales/en.ts index fbd19150..c2c48d21 100644 --- a/src/locales/en.ts +++ b/src/locales/en.ts @@ -64,6 +64,147 @@ export default { no: 'No', code: 'Auto-generate on Save' }, + MesCustomer: { + fields: { + id: 'ID', + name: 'Customer Name', + customerCode: 'Customer Code', + contactName: 'Contact', + source: 'Customer Source', + mobile: 'Contact Mobile', + telephone: 'Contact Phone', + email: 'Contact Email', + ownerUser: 'Owner', + wechat: 'WeChat', + qq: 'QQ', + industry: 'Customer Industry', + industryBelong: 'Industry', + level: 'Customer Level', + address: 'Address', + detailAddress: 'Detailed Address', + contactNextTime: 'Next Contact Time', + remark: 'Remark', + lockStatus: 'Lock Status', + dealStatus: 'Deal Status', + contactLastTime: 'Last Follow-up Time', + contactLastContent: 'Last Follow-up Record', + poolDay: 'Days Before Pool', + ownerDept: 'Owner Department', + creator: 'Creator', + createTime: 'Create Time', + updateTime: 'Update Time', + operate: 'Operation' + }, + placeholders: { + name: 'Please enter customer name', + customerCode: 'Please enter customer code', + contactName: 'Please enter contact', + source: 'Please select customer source', + mobile: 'Please enter contact mobile', + telephone: 'Please enter contact phone', + email: 'Please enter contact email', + wechat: 'Please enter WeChat', + qq: 'Please enter QQ', + industry: 'Please select customer industry', + industryBelong: 'Please select industry', + level: 'Please select customer level', + city: 'Please select city', + detailAddress: 'Please enter detailed address', + contactNextTime: 'Select next contact time', + remark: 'Please enter remark' + }, + tabs: { + owner: 'My Customers', + participant: 'Participated', + subordinate: 'Subordinates', + followUp: 'Follow-up Records', + basicInfo: 'Basic Info', + contacts: 'Contacts', + team: 'Team Members', + business: 'Business Opportunities', + contract: 'Contracts', + receivable: 'Receivables', + operateLog: 'Operation Logs', + systemInfo: 'System Info' + }, + actions: { + transfer: 'Transfer', + updateDealStatus: 'Change Deal Status', + unlock: 'Unlock', + lock: 'Lock', + receive: 'Receive', + distribute: 'Distribute', + putPool: 'Move to Pool', + downloadTemplate: 'Download template' + }, + status: { + dealDone: 'Closed', + dealUndone: 'Not Closed' + }, + import: { + title: 'Customer Import', + dragText: 'Drag file here, or', + clickText: 'click to upload', + updateSupport: 'Update existing customer data if the customer name already exists', + formatLimit: 'Only xls and xlsx files are allowed.' + }, + messages: { + customerCodeRequired: 'Customer code is required', + nameRequired: 'Customer name is required', + ownerRequired: 'Owner is required', + uploadFileRequired: 'Please upload a file', + uploadFailed: 'Upload failed, please upload again!', + uploadFileLimit: 'Only one file can be uploaded!', + uploadCreateCount: 'Created successfully: {count};', + uploadUpdateCount: 'Updated successfully: {count};', + uploadFailureCount: 'Failed to update: {count};', + updateDealStatusConfirm: 'Change deal status to [{status}]?', + updateDealStatusSuccess: 'Deal status updated successfully', + lockConfirm: 'Lock customer [{name}]?', + lockSuccess: 'Customer [{name}] locked successfully', + unlockConfirm: 'Unlock customer [{name}]?', + unlockSuccess: 'Customer [{name}] unlocked successfully', + receiveConfirm: 'Receive customer [{name}]?', + receiveSuccess: 'Customer [{name}] received successfully', + putPoolConfirm: 'Move customer [{name}] to the pool?', + putPoolSuccess: 'Customer [{name}] moved to the pool successfully', + customerRequired: 'Invalid parameter: customer is required!', + distributeSuccess: 'Customer distributed successfully', + poolEnabledRequired: 'Customer pool enabled setting is required', + ruleTypeRequired: 'Rule type is required', + maxCountRequired: 'Max count is required' + }, + filenames: { + customerExport: 'Customer.xls', + importTemplate: 'CustomerImportTemplate.xls' + }, + poolConfig: { + title: 'Customer Pool Rule Settings', + ruleSetting: 'Customer Pool Rule Settings', + notifySetting: 'Advance Reminder Settings', + noFollowPrefix: 'days without follow-up or', + noDealSuffix: 'days without deal', + notifyPrefix: 'Remind', + notifySuffix: 'days in advance' + }, + limitConfig: { + customerQuantityLimit: 'Owned Customer Limit', + customerLockLimit: 'Locked Customer Limit', + ruleUsers: 'Applicable Users', + ruleDepts: 'Applicable Departments', + customerQuantityMax: 'Owned Customer Max', + customerLockMax: 'Locked Customer Max', + dealCountEnabled: 'Closed customers count toward owned customers', + maxCountPlaceholder: 'Please enter max count', + deptPlaceholder: 'Please select applicable departments' + }, + pool: { + exportFilename: 'CustomerPool.xls' + }, + units: { + days: 'days' + } + }, ReportDashboard: { DashboardList: { searchNameLabel: 'Name', @@ -4257,6 +4398,8 @@ export default { tabStoredLabel: 'Stored', tableCodeColumn: 'Code', + tableTaskNameColumn: 'Task Name', + tableCustomerNameColumn: 'Customer Name', tableOrderDateColumn: 'Order Date', tableDeliveryDateColumn: 'Delivery Date', tableTaskTypeColumn: 'Type', @@ -4273,6 +4416,11 @@ export default { detailTabTaskDetailLabel: 'Task Detail', + dialogTaskNameLabel: 'Task Name', + dialogTaskNamePlaceholder: 'Please enter task name', + dialogCustomerLabel: 'Customer', + dialogCustomerPlaceholder: 'Please select customer', + selectCustomerDialogTitle: 'Select Customer', dialogCodeLabel: 'Task Code', dialogCodeTooltip: 'Task code', dialogCodePlaceholder: 'Code will be generated automatically after saving', @@ -4288,6 +4436,8 @@ export default { dialogSubmitButtonText: 'Confirm', dialogCancelButtonText: 'Cancel', + validatorTaskNameRequired: 'Task name cannot be empty', + validatorCustomerRequired: 'Customer cannot be empty', validatorDeliveryDateRequired: 'Delivery date cannot be empty', validatorTaskTypeRequired: 'Task type cannot be empty', validatorIsUrgentRequired: 'Urgent flag cannot be empty', diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index af8b1676..cf16bf26 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -64,6 +64,147 @@ export default { no: '否', code: '编码保存后自动生成' }, + MesCustomer: { + fields: { + id: '编号', + name: '客户名称', + customerCode: '客户编码', + contactName: '联系人', + source: '客户来源', + mobile: '联系人手机', + telephone: '联系人电话', + email: '联系人邮箱', + ownerUser: '负责人', + wechat: '微信', + qq: 'QQ', + industry: '客户行业', + industryBelong: '所属行业', + level: '客户级别', + address: '地址', + detailAddress: '详细地址', + contactNextTime: '下次联系时间', + remark: '备注', + lockStatus: '锁定状态', + dealStatus: '成交状态', + contactLastTime: '最后跟进时间', + contactLastContent: '最后跟进记录', + poolDay: '距离进入公海天数', + ownerDept: '所属部门', + creator: '创建人', + createTime: '创建时间', + updateTime: '更新时间', + operate: '操作' + }, + placeholders: { + name: '请输入客户名称', + customerCode: '请输入客户编码', + contactName: '请输入联系人', + source: '请选择客户来源', + mobile: '请输入联系人手机', + telephone: '请输入联系人电话', + email: '请输入联系人邮箱', + wechat: '请输入微信', + qq: '请输入 QQ', + industry: '请选择客户行业', + industryBelong: '请选择所属行业', + level: '请选择客户级别', + city: '请选择城市', + detailAddress: '请输入详细地址', + contactNextTime: '选择下次联系时间', + remark: '请输入备注' + }, + tabs: { + owner: '我负责的', + participant: '我参与的', + subordinate: '下属负责的', + followUp: '跟进记录', + basicInfo: '基本信息', + contacts: '联系人', + team: '团队成员', + business: '商机', + contract: '合同', + receivable: '回款', + operateLog: '操作日志', + systemInfo: '系统信息' + }, + actions: { + transfer: '转移', + updateDealStatus: '更改成交状态', + unlock: '解锁', + lock: '锁定', + receive: '领取', + distribute: '分配', + putPool: '放入公海', + downloadTemplate: '下载模板' + }, + status: { + dealDone: '已成交', + dealUndone: '未成交' + }, + import: { + title: '客户导入', + dragText: '将文件拖到此处,或', + clickText: '点击上传', + updateSupport: '是否更新已经存在的客户数据(“客户名称”重复)', + formatLimit: '仅允许导入 xls、xlsx 格式文件。' + }, + messages: { + customerCodeRequired: '客户编码不能为空', + nameRequired: '客户名称不能为空', + ownerRequired: '负责人不能为空', + uploadFileRequired: '请上传文件', + uploadFailed: '上传失败,请您重新上传!', + uploadFileLimit: '最多只能上传一个文件!', + uploadCreateCount: '上传成功数量:{count};', + uploadUpdateCount: '更新成功数量:{count};', + uploadFailureCount: '更新失败数量:{count};', + updateDealStatusConfirm: '确定更新成交状态为【{status}】吗?', + updateDealStatusSuccess: '更新成交状态成功', + lockConfirm: '确定锁定客户【{name}】 吗?', + lockSuccess: '锁定客户【{name}】成功', + unlockConfirm: '确定解锁客户【{name}】 吗?', + unlockSuccess: '解锁客户【{name}】成功', + receiveConfirm: '确定领取客户【{name}】 吗?', + receiveSuccess: '领取客户【{name}】成功', + putPoolConfirm: '确定将客户【{name}】放入公海吗?', + putPoolSuccess: '客户【{name}】放入公海成功', + customerRequired: '参数错误,客户不能为空!', + distributeSuccess: '分配客户成功', + poolEnabledRequired: '是否启用客户公海不能为空', + ruleTypeRequired: '规则类型不能为空', + maxCountRequired: '数量上限不能为空' + }, + filenames: { + customerExport: '客户.xls', + importTemplate: '客户导入模版.xls' + }, + poolConfig: { + title: '客户公海规则设置', + ruleSetting: '客户公海规则设置', + notifySetting: '提前提醒设置', + noFollowPrefix: '天不跟进或', + noDealSuffix: '天未成交', + notifyPrefix: '提前', + notifySuffix: '天提醒' + }, + limitConfig: { + customerQuantityLimit: '拥有客户数限制', + customerLockLimit: '锁定客户数限制', + ruleUsers: '规则适用人群', + ruleDepts: '规则适用部门', + customerQuantityMax: '拥有客户数上限', + customerLockMax: '锁定客户数上限', + dealCountEnabled: '成交客户是否占用拥有客户数', + maxCountPlaceholder: '请输入数量上限', + deptPlaceholder: '请选择规则适用部门' + }, + pool: { + exportFilename: '客户公海.xls' + }, + units: { + days: '天' + } + }, ReportDashboard: { DashboardList: { searchNameLabel: '名称', @@ -4110,6 +4251,8 @@ export default { tabStoredLabel: '入库', tableCodeColumn: '编码', + tableTaskNameColumn: '任务单名称', + tableCustomerNameColumn: '客户名称', tableOrderDateColumn: '下达日期', tableDeliveryDateColumn: '交货日期', tableTaskTypeColumn: '类型', @@ -4126,6 +4269,11 @@ export default { detailTabTaskDetailLabel: '任务单明细', + dialogTaskNameLabel: '任务单名称', + dialogTaskNamePlaceholder: '请输入任务单名称', + dialogCustomerLabel: '客户', + dialogCustomerPlaceholder: '请选择客户', + selectCustomerDialogTitle: '选择客户', dialogCodeLabel: '任务单编码', dialogCodeTooltip: '任务单编码', dialogCodePlaceholder: '编码保存后自动生成', @@ -4141,6 +4289,8 @@ export default { dialogSubmitButtonText: '确 定', dialogCancelButtonText: '取 消', + validatorTaskNameRequired: '任务单名称不能为空', + validatorCustomerRequired: '客户不能为空', validatorDeliveryDateRequired: '交货日期不能为空', validatorTaskTypeRequired: '任务类型不能为空', validatorIsUrgentRequired: '是否急单不能为空', diff --git a/src/views/mes/customer/CustomerForm.vue b/src/views/mes/customer/CustomerForm.vue index c156b4c5..bab50a77 100644 --- a/src/views/mes/customer/CustomerForm.vue +++ b/src/views/mes/customer/CustomerForm.vue @@ -9,13 +9,13 @@ > - - + + - - + + - +
- - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - + - - + + @@ -210,16 +210,16 @@ const validateCustomerCode = (_rule, value, callback) => { return } if (value === undefined || value === null || String(value).trim() === '') { - callback(new Error('客户编码不能为空')) + callback(new Error(t('MesCustomer.messages.customerCodeRequired'))) return } callback() } const formRules = reactive({ - name: [{ required: true, message: '客户名称不能为空', trigger: 'blur' }], + name: [{ required: true, message: t('MesCustomer.messages.nameRequired'), trigger: 'blur' }], customerCode: [{ validator: validateCustomerCode, trigger: ['blur', 'change'] }], - ownerUserId: [{ required: true, message: '负责人不能为空', trigger: 'blur' }] + ownerUserId: [{ required: true, message: t('MesCustomer.messages.ownerRequired'), trigger: 'blur' }] }) const formRef = ref() // 表单 Ref diff --git a/src/views/mes/customer/CustomerImportForm.vue b/src/views/mes/customer/CustomerImportForm.vue index 29c47495..8a898fef 100644 --- a/src/views/mes/customer/CustomerImportForm.vue +++ b/src/views/mes/customer/CustomerImportForm.vue @@ -1,8 +1,8 @@ @@ -59,6 +63,7 @@ import { useUserStore } from '@/store/modules/user' defineOptions({ name: 'SystemUserImportForm' }) const message = useMessage() // 消息弹窗 +const { t } = useI18n() // 国际化 const dialogVisible = ref(false) // 弹窗的是否展示 const formLoading = ref(false) // 表单的加载中 @@ -81,7 +86,7 @@ defineExpose({ open }) // 提供 open 方法,用于打开弹窗 /** 提交表单 */ const submitForm = async () => { if (fileList.value.length == 0) { - message.error('请上传文件') + message.error(t('MesCustomer.messages.uploadFileRequired')) return } @@ -110,15 +115,17 @@ const submitFormSuccess = (response: any) => { } // 拼接提示语 const data = response.data - let text = '上传成功数量:' + data.createCustomerNames.length + ';' + let text = t('MesCustomer.messages.uploadCreateCount', { count: data.createCustomerNames.length }) for (let customerName of data.createCustomerNames) { text += '< ' + customerName + ' >' } - text += '更新成功数量:' + data.updateCustomerNames.length + ';' + text += t('MesCustomer.messages.uploadUpdateCount', { count: data.updateCustomerNames.length }) for (const customerName of data.updateCustomerNames) { text += '< ' + customerName + ' >' } - text += '更新失败数量:' + Object.keys(data.failureCustomerNames).length + ';' + text += t('MesCustomer.messages.uploadFailureCount', { + count: Object.keys(data.failureCustomerNames).length + }) for (const customerName in data.failureCustomerNames) { text += '< ' + customerName + ': ' + data.failureCustomerNames[customerName] + ' >' } @@ -131,7 +138,7 @@ const submitFormSuccess = (response: any) => { /** 上传错误提示 */ const submitFormError = (): void => { - message.error('上传失败,请您重新上传!') + message.error(t('MesCustomer.messages.uploadFailed')) formLoading.value = false } @@ -147,12 +154,12 @@ const resetForm = async () => { /** 文件数超出提示 */ const handleExceed = (): void => { - message.error('最多只能上传一个文件!') + message.error(t('MesCustomer.messages.uploadFileLimit')) } /** 下载模板操作 */ const importTemplate = async () => { const res = await CustomerApi.importCustomerTemplate() - download.excel(res, '客户导入模版.xls') + download.excel(res, t('MesCustomer.filenames.importTemplate')) } diff --git a/src/views/mes/customer/detail/CustomerDetailsHeader.vue b/src/views/mes/customer/detail/CustomerDetailsHeader.vue index 4c5cf186..56f29bcd 100644 --- a/src/views/mes/customer/detail/CustomerDetailsHeader.vue +++ b/src/views/mes/customer/detail/CustomerDetailsHeader.vue @@ -17,14 +17,14 @@
- + - - {{ customer.dealStatus ? '已成交' : '未成交' }} + + {{ customer.dealStatus ? t('MesCustomer.status.dealDone') : t('MesCustomer.status.dealUndone') }} - {{ customer.ownerUserName }} - + {{ customer.ownerUserName }} + {{ formatDate(customer.createTime) }} @@ -36,6 +36,7 @@ import * as CustomerApi from '@/api/mes/customer' import { formatDate } from '@/utils/formatTime' defineOptions({ name: 'MesCustomerDetailsHeader' }) +const { t } = useI18n() // 国际化 defineProps<{ customer: CustomerApi.CustomerVO // 客户信息 loading: boolean // 加载中 diff --git a/src/views/mes/customer/detail/CustomerDetailsInfo.vue b/src/views/mes/customer/detail/CustomerDetailsInfo.vue index dca82b32..7f991e61 100644 --- a/src/views/mes/customer/detail/CustomerDetailsInfo.vue +++ b/src/views/mes/customer/detail/CustomerDetailsInfo.vue @@ -3,53 +3,53 @@ - + {{ customer.name }} - + - {{ customer.mobile }} - {{ customer.telephone }} - {{ customer.email }} - + {{ customer.mobile }} + {{ customer.telephone }} + {{ customer.email }} + {{ customer.areaName }} {{ customer.detailAddress }} {{ customer.qq }} - {{ customer.wechat }} - + {{ customer.wechat }} + - + - + {{ formatDate(customer.contactNextTime) }} - {{ customer.remark }} + {{ customer.remark }} - {{ customer.ownerUserName }} - + {{ customer.ownerUserName }} + {{ customer.contactLastContent }} - + {{ formatDate(customer.contactLastTime) }}   - {{ customer.creatorName }} - + {{ customer.creatorName }} + {{ formatDate(customer.createTime) }} - + {{ formatDate(customer.updateTime) }} @@ -63,6 +63,7 @@ import { DICT_TYPE } from '@/utils/dict' import { formatDate } from '@/utils/formatTime' defineOptions({ name: 'MesCustomerDetailsInfo' }) +const { t } = useI18n() // 国际化 const { customer } = defineProps<{ customer: CustomerApi.CustomerVO // 客户明细 }>() diff --git a/src/views/mes/customer/detail/index.vue b/src/views/mes/customer/detail/index.vue index 5e336d19..4162f017 100644 --- a/src/views/mes/customer/detail/index.vue +++ b/src/views/mes/customer/detail/index.vue @@ -6,49 +6,51 @@ type="primary" @click="openForm" > - 编辑 + {{ t('action.update') }} - 转移 + {{ t('MesCustomer.actions.transfer') }} - 更改成交状态 + {{ t('MesCustomer.actions.updateDealStatus') }} - 解锁 + {{ t('MesCustomer.actions.unlock') }} - 锁定 + {{ t('MesCustomer.actions.lock') }} + + + {{ t('MesCustomer.actions.receive') }} - 领取 - 分配 + {{ t('MesCustomer.actions.distribute') }} - 放入公海 + {{ t('MesCustomer.actions.putPool') }} - + - + - + - + - + - + - + - + @@ -103,6 +105,7 @@ const CUSTOMER_BIZ_TYPE = 2 const customerId = ref(0) // 客户编号 const loading = ref(true) // 加载中 const message = useMessage() // 消息弹窗 +const { t } = useI18n() // 国际化 const { delView } = useTagsViewStore() // 视图操作 const { push, currentRoute } = useRouter() // 路由 @@ -131,10 +134,14 @@ const handleUpdateDealStatus = async () => { const dealStatus = !customer.value.dealStatus try { // 更新状态的二次确认 - await message.confirm(`确定更新成交状态为【${dealStatus ? '已成交' : '未成交'}】吗?`) + await message.confirm( + t('MesCustomer.messages.updateDealStatusConfirm', { + status: dealStatus ? t('MesCustomer.status.dealDone') : t('MesCustomer.status.dealUndone') + }) + ) // 发起更新 await CustomerApi.updateCustomerDealStatus(customerId.value, dealStatus) - message.success(`更新成交状态成功`) + message.success(t('MesCustomer.messages.updateDealStatusSuccess')) // 刷新数据 await getCustomer() } catch {} @@ -148,25 +155,25 @@ const transfer = () => { /** 锁定客户 */ const handleLock = async () => { - await message.confirm(`确定锁定客户【${customer.value.name}】 吗?`) + await message.confirm(t('MesCustomer.messages.lockConfirm', { name: customer.value.name })) await CustomerApi.lockCustomer(unref(customerId.value), true) - message.success(`锁定客户【${customer.value.name}】成功`) + message.success(t('MesCustomer.messages.lockSuccess', { name: customer.value.name })) await getCustomer() } /** 解锁客户 */ const handleUnlock = async () => { - await message.confirm(`确定解锁客户【${customer.value.name}】 吗?`) + await message.confirm(t('MesCustomer.messages.unlockConfirm', { name: customer.value.name })) await CustomerApi.lockCustomer(unref(customerId.value), false) - message.success(`解锁客户【${customer.value.name}】成功`) + message.success(t('MesCustomer.messages.unlockSuccess', { name: customer.value.name })) await getCustomer() } /** 领取客户 */ const handleReceive = async () => { - await message.confirm(`确定领取客户【${customer.value.name}】 吗?`) + await message.confirm(t('MesCustomer.messages.receiveConfirm', { name: customer.value.name })) await CustomerApi.receiveCustomer([unref(customerId.value)]) - message.success(`领取客户【${customer.value.name}】成功`) + message.success(t('MesCustomer.messages.receiveSuccess', { name: customer.value.name })) await getCustomer() } @@ -178,9 +185,9 @@ const handleDistributeForm = async () => { /** 客户放入公海 */ const handlePutPool = async () => { - await message.confirm(`确定将客户【${customer.value.name}】放入公海吗?`) + await message.confirm(t('MesCustomer.messages.putPoolConfirm', { name: customer.value.name })) await CustomerApi.putCustomerPool(unref(customerId.value)) - message.success(`客户【${customer.value.name}】放入公海成功`) + message.success(t('MesCustomer.messages.putPoolSuccess', { name: customer.value.name })) // 加载 close() } @@ -213,7 +220,7 @@ const close = () => { const { params } = useRoute() onMounted(() => { if (!params.id) { - message.warning('参数错误,客户不能为空!') + message.warning(t('MesCustomer.messages.customerRequired')) close() return } diff --git a/src/views/mes/customer/index.vue b/src/views/mes/customer/index.vue index e34488b4..9a667d86 100644 --- a/src/views/mes/customer/index.vue +++ b/src/views/mes/customer/index.vue @@ -11,30 +11,30 @@ class="-mb-15px" min-label-width="68px" > - + - + - + - + - + - 搜索 + {{ t('common.query') }} - 重置 + {{ t('common.reset') }} - 新增 + {{ t('action.create') }} - 导出 + {{ t('action.export') }} @@ -108,32 +108,32 @@ - + - - - + + + - - - - + + + + - + @@ -141,17 +141,17 @@ - - + + - + @@ -159,33 +159,33 @@ - - - - + + + + - - + + - - + + @@ -321,7 +321,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await CustomerApi.exportCustomer(queryParams) - download.excel(data, '客户.xls') + download.excel(data, t('MesCustomer.filenames.customerExport')) } catch { } finally { exportLoading.value = false diff --git a/src/views/mes/customer/limitConfig/CustomerLimitConfigForm.vue b/src/views/mes/customer/limitConfig/CustomerLimitConfigForm.vue index 322dea5e..6783a089 100644 --- a/src/views/mes/customer/limitConfig/CustomerLimitConfigForm.vue +++ b/src/views/mes/customer/limitConfig/CustomerLimitConfigForm.vue @@ -7,7 +7,7 @@ label-width="200px" v-loading="formLoading" > - + - + - + @@ -48,8 +48,8 @@ @@ -78,8 +78,8 @@ const formData = ref({ dealCountEnabled: false }) const formRules = reactive({ - type: [{ required: true, message: '规则类型不能为空', trigger: 'change' }], - maxCount: [{ required: true, message: '数量上限不能为空', trigger: 'blur' }] + type: [{ required: true, message: t('MesCustomer.messages.ruleTypeRequired'), trigger: 'change' }], + maxCount: [{ required: true, message: t('MesCustomer.messages.maxCountRequired'), trigger: 'blur' }] }) const formRef = ref() // 表单 Ref const deptTree = ref() // 部门树形结构 diff --git a/src/views/mes/customer/limitConfig/CustomerLimitConfigList.vue b/src/views/mes/customer/limitConfig/CustomerLimitConfigList.vue index 340fd50b..9a011ef3 100644 --- a/src/views/mes/customer/limitConfig/CustomerLimitConfigList.vue +++ b/src/views/mes/customer/limitConfig/CustomerLimitConfigList.vue @@ -1,12 +1,12 @@