中英文翻译

This commit is contained in:
2025-04-14 17:40:58 +08:00
parent 39937a1602
commit 2ab2d3df93
8 changed files with 360 additions and 300 deletions

View File

@@ -6,12 +6,12 @@
<div class="selectItem" style="flex: 1;margin-right: 0">
<div class="piliang">
<el-button type="primary" size="small" @click="state.selectedDataShow = true">
<span>已选中 {{ state.selectedData.length }} 条数据去查看</span>
<span>{{ t('message.index.selected') }} {{ state.selectedData.length }} {{ t('message.index.items') }}{{ t('message.index.proceed') }}</span>
</el-button>
<el-date-picker
v-model="state.chengNuoJiaoQiP"
type="date"
placeholder="批量修改选中承诺日期"
:placeholder="t('message.index.batchUpdateEarliestDeliveryDate')"
size="small"
style="width: 45%; margin-left: 12px"
@change="chengNuoJiaoQiPFun('0')"
@@ -19,7 +19,7 @@
<el-date-picker
v-model="state.newChengNuoJiaoQiP"
type="date"
placeholder="批量修改选中承诺最新交期"
:placeholder="t('message.index.batchUpdateLatestDeliveryDate')"
size="small"
style="width: 45%; margin-left: 12px"
@change="chengNuoJiaoQiPFun('1')"
@@ -36,7 +36,9 @@
>
<template #fBillNo="{ row }">{{row.fBillNo}}</template>
<template #fDate="{ row }">{{row.fDate}}</template>
<template #fCancelStatus="{ row }">{{row.fCancelStatus === 'A' ? '未关闭' : '已关闭'}} </template>
<template #fCancelStatus="{ row }">
{{ row.fCancelStatus === 'A' ? t('message.index.closed') : t('message.index.unclosed') }}
</template>
<template #materialName="{ row }">
<el-tooltip :content="row.materialName" placement="top">
<div class="multi-line-omit">{{ row.materialName }}</div>
@@ -46,7 +48,7 @@
<el-date-picker
v-model="row.chengNuoJiaoQi"
type="date"
placeholder="日期"
:placeholder="t('message.index.date')"
size="small"
style="width: 220px"
format="YYYY-MM-DD"
@@ -58,7 +60,7 @@
<el-date-picker
v-model="row.newChengNuoJiaoQi"
type="date"
placeholder="日期"
:placeholder="t('message.index.date')"
size="small"
style="width: 220px"
format="YYYY-MM-DD"
@@ -74,12 +76,14 @@
<script lang="ts" setup>
import {reactive, onMounted, computed, nextTick, ref} from 'vue';
import { useRouter,useRoute } from 'vue-router';
import { useRoute } from 'vue-router';
import { listApi } from '../../api/list/index';
import { useI18n } from 'vue-i18n';
import SelectedData from '/@/views/mssPurchaseOrder/selectedData.vue';
import {ElMessage, ElMessageBox} from 'element-plus';
const selectedDataRef = ref()
const route = useRoute()
const { t } = useI18n();
// 定义变量内容
const state = reactive({
page: {
@@ -102,36 +106,37 @@ const state = reactive({
addBtn: false,
menu: false,
column: [
{ label: 'PO号', prop: 'fBillNo', /*search: true,*/ searchSpan: 3, width: '125' },
{ label: '采购日期', prop: 'fDate', /*search: true,*/ type: 'datetime', searchSpan: 6, searchRange: true },
{ label: computed(() => t('message.index.DocNumber')), prop: 'fBillNo', searchSpan: 3, width: '125' },
{ label: computed(() => t('message.index.date')), prop: 'fDate', type: 'datetime', searchSpan: 6, searchRange: true },
{
label: '关闭状态',
label: computed(() => t('message.index.status')),
prop: 'fCancelStatus',
dicData: [
{ label: '未关闭', value: 'A' },
{ label: '已关闭', value: 'B' },
{ label: computed(() => t('message.index.closed')), value: 'A' },
{ label: computed(() => t('message.index.unclosed')), value: 'B' },
],
width: '90',
},
{ label: '物料编码', prop: 'materialCode', width: '120' },
{ label: '物料名称', prop: 'materialName', width: '240' },
{ label: '采购单位', prop: 'unitName', width: '90' },
{ label: '采购数量', prop: 'qty', width: '90' },
{ label: '交货日期', prop: 'fDeliveryDate', width: '165' },
{ label: computed(() => t('message.index.partNumber')), prop: 'materialCode', width: '120' },
{ label: computed(() => t('message.index.materialName')), prop: 'materialName', width: '240' },
{ label: computed(() => t('message.index.specification')), prop: 'guige', width: '120' },
{ label: computed(() => t('message.index.unit')), prop: 'unitName', width: '90' },
{ label: computed(() => t('message.index.qty')), prop: 'qty', width: '90' },
{ label: computed(() => t('message.index.requestDate')), prop: 'fDeliveryDate', width: '165' },
{
label: '业务状态',
prop: 'fmrpCloseStatus' /*search: true,*/,
label: computed(() => t('message.index.DocStatus')),
prop: 'fmrpCloseStatus',
searchSpan: 3,
dicData: [
{ label: '正常', value: 'A' },
{ label: '业务关闭', value: 'B' },
{ label: computed(() => t('message.index.normal')), value: 'A' },
{ label: computed(() => t('message.index.closed')), value: 'B' },
],
width: '90',
},
{ label: '累计收料数量', prop: 'sendedQty', width: '110' },
{ label: '剩余收料数量', prop: 'notSendQty' },
{ label: '供应商承诺交期', prop: 'chengNuoJiaoQi', width: '220' },
{ label: '供应商承诺最新交期', prop: 'newChengNuoJiaoQi', width: '220' },
{ label: computed(() => t('message.index.receivedQTY')), prop: 'sendedQty', width: '110' },
{ label: computed(() => t('message.index.unreceivedQTY')), prop: 'notSendQty', width: '110' },
{ label: computed(() => t('message.index.earliestDeliveryDate')), prop: 'chengNuoJiaoQi', width: '160' },
{ label: computed(() => t('message.index.latestDeliveryDate')), prop: 'newChengNuoJiaoQi', width: '160' },
],
},
data: [],
@@ -163,21 +168,22 @@ const chengNuoJiaoQiPFun = (e: string) => {
ElMessageBox({
closeOnClickModal: false,
closeOnPressEscape: false,
title: '提示',
message: '是否要修正此项日期',
title: t('message.index.prompt'),
message: t('message.index.pleaseConfirmTheDateChange'),
confirmButtonText: t('message.user.logOutConfirm'),
cancelButtonText: t('message.user.logOutCancel'),
showCancelButton: true,
buttonSize: 'default',
beforeClose: (action, instance, done) => {
if (action === 'confirm') {
instance.confirmButtonLoading = true;
instance.confirmButtonText ='1';
listApi()
.batchSetChengNuoJiaoQi(arr)
.then((res: any) => {
done();
if (res.resultCode === 0) {
getList();
ElMessage.success('操作成功');
ElMessage.success(t('message.index.changedSuccessfully'));
}
if (res.resultCode === -1) {
getList();
@@ -197,8 +203,10 @@ const chengNuoJiaoQiPFun = (e: string) => {
ElMessageBox({
closeOnClickModal: false,
closeOnPressEscape: false,
title: '提示',
message: '是否要修正此项日期',
title: t('message.index.prompt'),
message: t('message.index.pleaseConfirmTheDateChange'),
confirmButtonText: t('message.user.logOutConfirm'),
cancelButtonText: t('message.user.logOutCancel'),
showCancelButton: true,
buttonSize: 'default',
beforeClose: (action, instance, done) => {
@@ -211,7 +219,7 @@ const chengNuoJiaoQiPFun = (e: string) => {
done();
if (res.resultCode === 0) {
getList();
ElMessage.success('操作成功');
ElMessage.success(t('message.index.changedSuccessfully'));
}
if (res.resultCode === -1) {
getList();
@@ -225,15 +233,17 @@ const chengNuoJiaoQiPFun = (e: string) => {
});
}
} else {
ElMessage.warning('请先选中数据');
ElMessage.warning(t('message.index.PleaseSelectItemsFirstly'));
}
};
const batchSetChengNuoJiaoQiFun = (arr: any) => {
ElMessageBox({
closeOnClickModal: false,
closeOnPressEscape: false,
title: '提示',
message: '是否要修正此项日期',
title: t('message.index.prompt'),
message: t('message.index.pleaseConfirmTheDateChange'),
confirmButtonText: t('message.user.logOutConfirm'),
cancelButtonText: t('message.user.logOutCancel'),
showCancelButton: true,
buttonSize: 'default',
beforeClose: (action, instance, done) => {
@@ -246,7 +256,7 @@ const batchSetChengNuoJiaoQiFun = (arr: any) => {
done();
if (res.resultCode === 0) {
getList();
ElMessage.success('操作成功');
ElMessage.success(t('message.index.changedSuccessfully'));
}
if (res.resultCode === -1) {
getList();
@@ -263,8 +273,10 @@ const batchSetNewChengNuoJiaoQiFun = (arr: any) => {
ElMessageBox({
closeOnClickModal: false,
closeOnPressEscape: false,
title: '提示',
message: '是否要修正此项日期',
title: t('message.index.prompt'),
message: t('message.index.pleaseConfirmTheDateChange'),
confirmButtonText: t('message.user.logOutConfirm'),
cancelButtonText: t('message.user.logOutCancel'),
showCancelButton: true,
buttonSize: 'default',
beforeClose: (action, instance, done) => {
@@ -277,7 +289,7 @@ const batchSetNewChengNuoJiaoQiFun = (arr: any) => {
done();
if (res.resultCode === 0) {
getList();
ElMessage.success('操作成功');
ElMessage.success(t('message.index.changedSuccessfully'));
}
if (res.resultCode === -1) {
getList();