From 5e4dc3af68c2bb0a5a33fcb395e7704207125ce8 Mon Sep 17 00:00:00 2001
From: CD配唱片 <CD配唱片>
Date: 星期二, 06 五月 2025 18:49:19 +0800
Subject: [PATCH] 提交中英文
---
src/views/mainPlan/sheetMetalSupplyGap/index.vue | 213 ++++++++++++++++++++++++++++------------------------
1 files changed, 114 insertions(+), 99 deletions(-)
diff --git a/src/views/mainPlan/sheetMetalSupplyGap/index.vue b/src/views/mainPlan/sheetMetalSupplyGap/index.vue
index d60e9aa..3ec494f 100644
--- a/src/views/mainPlan/sheetMetalSupplyGap/index.vue
+++ b/src/views/mainPlan/sheetMetalSupplyGap/index.vue
@@ -6,37 +6,44 @@
ref="queryRef"
:inline="true"
v-show="showSearch"
- label-width="90px"
+ :label-width="locale === 'zh' ? '90px' : '200px'"
>
<el-row type="flex" justify="left">
- <el-col :span="5">
- <el-form-item label="闇�姹傝拷婧疘D" prop="description">
+ <el-col :span="locale === 'zh' ? 5 : 10">
+ <el-form-item
+ :label="$t('plan.query.requireTraceID')"
+ prop="description"
+ >
<el-input
- style="width: 140px"
+ :style="{ width: locale === 'zh' ? '140px' : '300px' }"
v-model="queryParams.description"
- placeholder="璇疯緭鍏ラ渶姹傝拷婧疘D"
+ :placeholder="`${$t('plan.placeholder.requireTraceID')}`"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
</el-col>
- <el-col :span="5">
- <el-form-item label="鏂欏彿" prop="description">
+ <el-col :span="locale === 'zh' ? 8 : 9">
+ <el-form-item :label="$t('plan.query.itemNumber')" prop="description">
<el-input
- style="width: 140px"
+ :style="{ width: locale === 'zh' ? '140px' : '210px' }"
v-model="queryParams.description"
- placeholder="璇疯緭鍏ユ枡鍙�"
+ :placeholder="`${$t('common.common.placeholder')}${$t(
+ 'plan.query.itemNumber'
+ )}`"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
</el-col>
- <el-col :span="14" style="text-align: right">
+ <el-col :span="locale === 'zh' ? 11 : 5" style="text-align: right">
<el-form-item class="column-with-margin">
- <el-button type="primary" icon="Search" @click="handleQuery"
- >鏌ヨ</el-button
- >
- <el-button icon="Refresh" @click="resetQuery">閲嶇疆</el-button>
+ <el-button type="primary" icon="Search" @click="handleQuery">{{
+ $t("common.common.query")
+ }}</el-button>
+ <el-button icon="Refresh" @click="resetQuery">{{
+ $t("common.common.reset")
+ }}</el-button>
</el-form-item>
</el-col>
</el-row>
@@ -50,7 +57,7 @@
icon="Download"
@click="handleExport"
v-hasPermi="['core:calendar:export']"
- >瀵煎嚭</el-button
+ >{{ $t("common.common.export") }}</el-button
>
</el-col>
<right-toolbar
@@ -88,6 +95,8 @@
import { listAll_plant } from "@/api/basicData/plant";
import { listAll_shop, listAps_shop } from "@/api/basicData/shop";
import { selectProcessNameList } from "@/api/basicData/processRoute.js";
+import { useI18n } from "vue-i18n"; //瑕佸湪js涓娇鐢ㄥ浗闄呭寲
+const { t, locale } = useI18n();
const { proxy } = getCurrentInstance();
const tableRef = ref();
const calendarList = ref([]);
@@ -123,96 +132,102 @@
const processList = ref([]);
const height = ref(document.documentElement.clientHeight - 220 + "px;");
// 琛ㄦ牸閰嶇疆-鍒楄〃
-const columns = ref([
- {
- title: "闇�姹侷D",
- field: "description",
- width: 150,
- align: "center",
- },
- {
- title: "闇�姹傝拷婧疘D",
- field: "type",
- width: 200,
- align: "center",
- },
- {
- title: "鏂欏彿",
- field: "effectiveDate",
- width: 200,
- align: "center",
- },
- {
- title: "BOM浣庨樁鐮�",
- field: "expiringDate",
- width: 200,
- align: "center",
- },
- {
- title: "鍖归厤鐘舵��",
- field: "expiringDate",
- width: 200,
- align: "center",
- },
- {
- title: "鍖归厤妯″紡",
- field: "createTime",
- width: 200,
- align: "center",
- },
- {
- title: "鏈尮閰嶉渶姹傛暟閲�",
- field: "createTime",
- width: 200,
- align: "center",
- },
- {
- title: "璁″垝寮�宸ユ棩",
- field: "createTime",
- width: 200,
- align: "center",
- },
- {
- title: "璁″垝瀹屽伐鏃�",
- field: "updateTime",
- width: 100,
- align: "center",
- },
- {
- title: "闇�姹傛棩鏈�",
- field: "updateTime",
- width: 100,
- align: "center",
- },
- {
- title: "閫傜敤宸ュ巶",
- field: "applicableFactory",
- width: 200,
- align: "center",
- formatter: ({ cellValue, row, column }) => {
- if (cellValue) {
- for (let i = 0; i < plantList.value.length; i++) {
- if (cellValue === plantList.value[i].plantCode) {
- return plantList.value[i].plantName;
- }
- }
- }
- },
- },
- {
- title: "鐢熶骇鍩哄湴",
- field: "updateTime",
- width: 100,
- align: "center",
- },
-]);
+const columns = ref([]);
// 鍒嗛〉灞炴��
const page = ref({
total: 0,
current: 1,
size: 10,
});
-
+watch(
+ locale,
+ (newLocale) => {
+ columns.value = [
+ {
+ title: t("plan.table.requireID"),
+ field: "description",
+ width: 150,
+ align: "center",
+ },
+ {
+ title: t("plan.table.requireTraceID"),
+ field: "type",
+ width: 200,
+ align: "center",
+ },
+ {
+ title: t("plan.table.itemNumber"),
+ field: "effectiveDate",
+ width: 200,
+ align: "center",
+ },
+ {
+ title: t("plan.table.bomLowCode"),
+ field: "expiringDate",
+ width: 200,
+ align: "center",
+ },
+ {
+ title: t("plan.table.matchState"),
+ field: "expiringDate",
+ width: 200,
+ align: "center",
+ },
+ {
+ title: t("plan.table.matchPattern"),
+ field: "createTime",
+ width: 200,
+ align: "center",
+ },
+ {
+ title: t("plan.table.unmatchedDemandQuantity"),
+ field: "createTime",
+ width: 200,
+ align: "center",
+ },
+ {
+ title: t("plan.table.planStartDay"),
+ field: "createTime",
+ width: 200,
+ align: "center",
+ },
+ {
+ title: t("plan.table.planEndDayDate"),
+ field: "updateTime",
+ width: 100,
+ align: "center",
+ },
+ {
+ title: t("plan.table.requirementDate"),
+ field: "updateTime",
+ width: 100,
+ align: "center",
+ },
+ {
+ title: t("plan.table.applicableFactories"),
+ field: "applicableFactory",
+ width: 200,
+ align: "center",
+ formatter: ({ cellValue, row, column }) => {
+ if (cellValue) {
+ for (let i = 0; i < plantList.value.length; i++) {
+ if (cellValue === plantList.value[i].plantCode) {
+ return plantList.value[i].plantName;
+ }
+ }
+ }
+ },
+ },
+ {
+ title: t("plan.table.productionBase"),
+ field: "updateTime",
+ width: 100,
+ align: "center",
+ },
+ ];
+ },
+ { immediate: true, deep: true }
+);
/** 鏌ヨ鏃ュ巻绠$悊鍒楄〃 */
function getList() {
loading.value = true;
--
Gitblit v1.9.3