From 31a116f666ea52854fee19c253cbd5696570ad88 Mon Sep 17 00:00:00 2001
From: chengxiangling <291105840@qq.com>
Date: 星期二, 13 五月 2025 13:38:35 +0800
Subject: [PATCH] 焊缝统计i18n
---
.env.development | 2
src/utils/i18n/locales/plan/index.js | 82 +++++
src/utils/i18n/locales/common/index.js | 6
src/views/mainPlan/weldSeam/index.vue | 803 +++++++++++++++++++++++++++++++---------------------
4 files changed, 560 insertions(+), 333 deletions(-)
diff --git a/.env.development b/.env.development
index f0b6c1e..605a602 100644
--- a/.env.development
+++ b/.env.development
@@ -10,4 +10,4 @@
# 閰嶅悎鍚庣鏈嶅姟
# VITE_APP_LOCAL = 'int'
# VITE_APP_LOCAL = 'zhl'
-VITE_APP_LOCAL = 'sfd'
\ No newline at end of file
+VITE_APP_LOCAL = 'hjy'
\ No newline at end of file
diff --git a/src/utils/i18n/locales/common/index.js b/src/utils/i18n/locales/common/index.js
index b8781a9..88b1412 100644
--- a/src/utils/i18n/locales/common/index.js
+++ b/src/utils/i18n/locales/common/index.js
@@ -24,7 +24,8 @@
operate:"鎿嶄綔",
batchUpdate:"鎵归噺鏇存柊",
close:"鍏抽棴",
- require:"闇�姹�"
+ require:"闇�姹�",
+ modify:"淇敼"
},
};
export const en = {
@@ -53,6 +54,7 @@
operate:"Operate",
batchUpdate:"Batch update",
close:"Close",
- require:"Require"
+ require:"Require",
+ modify:"Modify"
},
};
diff --git a/src/utils/i18n/locales/plan/index.js b/src/utils/i18n/locales/plan/index.js
index 58035bd..802bf02 100644
--- a/src/utils/i18n/locales/plan/index.js
+++ b/src/utils/i18n/locales/plan/index.js
@@ -5,7 +5,10 @@
viewAssociatedRequirements:"鏌ョ湅鍏宠仈闇�姹�",
setMode:"璁剧疆妯″紡",
CustomizePlannedCompletionDate:"鑷畾涔夎鍒掑畬宸ユ棩",
- tipsBugSheetMetal:"灏嗙敓鎴愮殑閽i噾闇�姹傜殑璁″垝寮�宸ユ棩鍜岃鍒掑畬宸ユ棩璧嬪�肩粰宸ュ崟"
+ tipsBugSheetMetal:"灏嗙敓鎴愮殑閽i噾闇�姹傜殑璁″垝寮�宸ユ棩鍜岃鍒掑畬宸ユ棩璧嬪�肩粰宸ュ崟",
+ metalWeldWork:"鐒婄紳宸ュ崟鏁版嵁",
+ parseUpload:"宸叉垚鍔熶笂浼犲拰瑙f瀽",
+ weld:"鐒婄紳"
},
options: {
monthlyStatic: "鎸夋湀缁熻",
@@ -54,13 +57,17 @@
selectDateRange: "閫夋嫨鍖洪棿",
requireTraceID: "闇�姹傝拷婧疘D",
itemNumber: "鏂欏彿",
-
+ pipelineOrderRequire:"绠¤矾璁㈠崟闇�姹�",
+ gasHolderOrderRequire:"姘旀煖璁㈠崟闇�姹�",
+ pipelinePredictionDemand:"绠¤矾棰勬祴闇�姹�",
+ gasHolderForecastDemand:"姘旀煖棰勬祴闇�姹�",
},
upload: {
prevText: "灏嗘枃浠舵嫋鍒版澶勶紝鎴�",
uploadPartWorkOrderData: "闆朵欢宸ュ崟鏁版嵁涓婁紶",
uploadSheetMetalPlanData: "閽i噾璁″垝鏁版嵁涓婁紶",
uploadGasPipelineData: "姘斾綋绠¤矾璁″垝鏁版嵁涓婁紶",
+ uploadWeldSeamData: "鐒婄紳宸ュ崟鏁版嵁涓婁紶",
info: "涓婁紶Excel鏂囦欢锛屽寘鍚浂浠跺伐鍗曚俊鎭�傜郴缁熷皢瑙f瀽鏁版嵁骞朵繚瀛樺埌鏈湴锛岀敤浜庡叧鑱斿埌闆朵欢璁″垝涓��",
weldSeamInfo:
"涓婁紶Excel鏂囦欢锛屽寘鍚剨缂濆伐鍗曚俊鎭�傜郴缁熷皢瑙f瀽鏁版嵁骞朵繚瀛樺埌鏈湴锛岀敤浜庡叧鑱斿埌鐒婄紳璁″垝涓��",
@@ -69,11 +76,14 @@
dataPreview: "鏁版嵁棰勮",
totalUpload: "鍏变笂浼�",
itemUpload: "鏉¢浂浠跺伐鍗曟暟鎹�",
+ itemWeldSeamUpload:"鏉$剨缂濆伐鍗曟暟鎹�",
confirmUpload: "纭涓婁紶",
cancel: "鍙� 娑�",
errorResult: "瀵煎叆缁撴灉",
uploadParsePartWorkOrderData: "闆朵欢宸ュ崟鏁版嵁宸叉垚鍔熶笂浼犲拰瑙f瀽",
uploadParseGasPipelineData: "姘斾綋绠¤矾璁″垝鏁版嵁宸叉垚鍔熶笂浼犲拰瑙f瀽",
+ uploadParseWeldSeamData:"鐒婄紳宸ュ崟鏁版嵁宸叉垚鍔熻В鏋�",
+ uploadErrorParseWeldSeamData:"鐒婄紳宸ュ崟鏁版嵁宸茶В鏋愬け璐�"
},
table: {
mainPartNumber: "涓讳欢鏂欏彿",
@@ -95,11 +105,37 @@
planworkOrderTime: "宸ュ崟璁″垝涓嬪彂鏃堕棿",
planEndDay: "绯荤粺瀹屽伐鏃堕棿",
seq: "搴忓彿",
+ year:"骞翠唤",
+ month:"鏈堜唤",
+ piping:"绠¤矾",
+ gasHolder:"姘旀煖",
+ forecastDemand:"棰勬祴闇�姹�",
+ reserveOrderOutput:"棰勭暀绱ф�ヨ鍗曚骇鍑�",
+ calTotal:"鍚堣",
+ days:"澶╂暟",
+ requirementDayWeldSeam:"闇�姹傛棩鐒婄紳",
+ productionDayWeldSeam:"鐢熶骇鏃ョ剨缂�",
+ customerDrawingNumber:"瀹㈡埛鍥惧彿",
+ organizationalAccount:"缁勭粐璐﹀彿",
+ isRequirements:"鏄惁婊¤冻",
+ materialCode: "鐗╂枡缂栫爜",
+ classification:"鍒嗙被(姘旀煖/绠¤矾)",
+ productionYear:"鐢熶骇骞翠唤",
+ productionMonth:"鐢熶骇鏈堜唤",
+ generateQuantity:"鐢熸垚鏁伴噺",
+ mainWorkOrderNumber:"涓诲伐鍗曞彿",
+ superiorWorkOrderNumber:"涓婄骇宸ュ崟鍙�",
masterPlanner: "涓昏鍒掑憳",
weekDay: "鍛ㄦ棩",
weekCycle: "鍛ㄥ害",
mainPartDrawingNumber: "涓讳欢鍥惧彿",
customer: "瀹㈡埛鍚嶇О",
+ singleWeldSeam:"鍗曚欢鐒婄紳",
+ totalWeldSeam:"鎬荤剨缂�",
+ dateFeedback:"鏈鍙嶉鏃ユ湡",
+ materialRequirementDate:"鐗╂枡闇�姹傛棩鏈�",
+ salesOrder:"閿�鍞鍗曞彿",
+ salesOrderLine:"閿�鍞鍗曡",
goodProductsQuantity: "鑹搧鏁伴噺",
processNumber: "宸ュ簭鍙�",
factoryCenter: "宸ヤ綔涓績",
@@ -142,7 +178,6 @@
dayProduceUnit: "鏃ヤ骇鍑哄崟浣�",
personnelNumber: "浜哄憳鏁伴噺",
dayProduceAllNum: "鏃ヤ骇鍑烘�绘暟閲�",
- days: "澶╂暟",
monthProduceAllNum: "鏈堜骇鍑烘暟閲�",
remark: "澶囨敞",
// 閽i噾渚涘簲缂哄彛鎶ヨ〃
@@ -156,6 +191,7 @@
requirementDate:"闇�姹傛棩鏈�",
applicableFactories:"閫傜敤宸ュ巶",
productionBase:"鐢熶骇鍩哄湴",
+ orderRequirements:"璁㈠崟闇�姹�",
// 閽i噾鍐椾綑宸ュ崟鎶ヨ〃
subItemPartNumber:"瀛愪欢鏂欏彿",
mismatchedProductionQuantity:"鏈尮閰嶇敓浜ф暟閲�",
@@ -181,7 +217,8 @@
viewAssociatedRequirements:"View associated requirements",
setMode:"Set Mode",
CustomizePlannedCompletionDate:"Customize the planned completion date",
- tipsBugSheetMetal:"Assign the planned start date and planned completion date of the generated sheet metal requirements to the work order"
+ tipsBugSheetMetal:"Assign the planned start date and planned completion date of the generated sheet metal requirements to the work order",
+ weld:"weld seam",
},
options: {
monthlyStatic: "Monthly statistics",
@@ -231,18 +268,27 @@
selectDateRange: "Select interval",
requireTraceID: "Require track ID",
itemNumber: "Item number",
+ pipelineOrderRequire:"Pipeline order requirements",
+ gasHolderOrderRequire:"Gas cabinet order demand",
+ pipelinePredictionDemand:"Pipeline prediction demand",
+ gasHolderForecastDemand:"Gas holder forecast demand"
},
upload: {
prevText: "Drag the file here, or",
uploadPartWorkOrderData: "Upload part work order data",
uploadSheetMetalPlanData: "Upload sheet metal plan data",
+ uploadGasPipelineData: "Upload gas pipeline plan data",
+ uploadWeldSeamData: "Upload welding work order data",
info: "Upload an Excel file containing part work order information. The system will parse the data and save it locally for association with the part plan.",
+ weldSeamInfo:
+ "Upload an Excel file containing weld work order information. The system will parse the data and save it locally for association with the weld seam plan.",
uploadText: " Click to upload",
fileTypeImport:
"Only xls and xlsx format files are allowed to be imported.",
dataPreview: "Data Preview",
totalUpload: "Upload",
itemUpload: "part work order data in total",
+ itemWeldSeamUpload:"weld seam work order data",
confirmUpload: "Confirm upload",
cancel: "Cancel",
errorResult: "Import results",
@@ -250,6 +296,8 @@
"The part work order data has been successfully uploaded and parsed",
uploadParseGasPipelineData:
"The gas pipeline plan data has been successfully uploaded and parsed",
+ uploadParseWeldSeamData:"The weld work order data has been successfully parsed",
+ uploadErrorParseWeldSeamData:"Failed to parse weld work order data"
},
table: {
mainPartNumber: "Main part number",
@@ -271,11 +319,36 @@
planworkOrderTime: "Work order plan issuance time",
planEndDay: "System completion time",
seq: "Serial Number",
+ year:"Year",
+ month:"Month",
+ piping:"Piping",
+ gasHolder:"Gas holder",
+ forecastDemand:"Forecast demand",
+ reserveOrderOutput:"Reserve emergency order output",
+ calTotal:"Total",
+ requirementDayWeldSeam:"Requirement day weld seam",
+ productionDayWeldSeam:"Production day weld seam",
+ customerDrawingNumber:"Customer drawing number",
+ organizationalAccount:"Organizational account",
+ isRequirements:"Is requirements",
+ materialCode:"material code",
+ classification:"Classification(Gas holder/pipeline)",
+ productionYear:"Production year",
+ productionMonth:"Production Month",
+ generateQuantity:"Generate quantity",
+ mainWorkOrderNumber:"Main work order number",
+ superiorWorkOrderNumber:"Superior work order number",
masterPlanner: "Master scheduler",
weekDay: "Sunday",
weekCycle: "Week cycle",
mainPartDrawingNumber: "Main component drawing number",
customer: "Customer Name",
+ singleWeldSeam:"Single piece weld seam",
+ totalWeldSeam:"Total weld seam",
+ dateFeedback:"Date of this feedback",
+ materialRequirementDate:"Material requirement date",
+ salesOrder:"Sales Order No",
+ salesOrderLine:"Sales order line",
goodProductsQuantity: "Quantity of good products",
processNumber: "Process number",
factoryCenter: "Work center",
@@ -332,6 +405,7 @@
requirementDate:"Requirement Date",
applicableFactories:"Applicable Factories",
productionBase:"Production Base",
+ orderRequirements:"Order requirements",
// 閽i噾鍐椾綑宸ュ崟鎶ヨ〃
subItemPartNumber:"Sub Item Part Number",
mismatchedProductionQuantity:"Mismatched Production Quantity",
diff --git a/src/views/mainPlan/weldSeam/index.vue b/src/views/mainPlan/weldSeam/index.vue
index 62279a6..fe40515 100644
--- a/src/views/mainPlan/weldSeam/index.vue
+++ b/src/views/mainPlan/weldSeam/index.vue
@@ -1,15 +1,15 @@
<template>
<div class="app-container">
-
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
- <el-button
- type="info"
- plain
- icon="Upload"
- @click="handleImport"
+ <el-button
+ type="info"
+ plain
+ icon="Upload"
+ @click="handleImport"
v-hasPermi="['weldSeam:weldSeam:importData']"
- >{{ $t("common.common.import") }}</el-button>
+ >{{ $t("common.common.import") }}</el-button
+ >
</el-col>
<el-col :span="1.5">
<el-button
@@ -18,64 +18,99 @@
icon="Download"
@click="handleExport"
v-hasPermi="['weldSeam:weldSeam:export']"
- >{{ $t("common.common.export") }}</el-button>
+ >{{ $t("common.common.export") }}</el-button
+ >
</el-col>
<right-toolbar :search="false" @queryTable="getList"></right-toolbar>
</el-row>
<HxlhTable
- style="width: 100%"
- :columns="columns"
- :data="dataList"
- :loading="loading"
- :height="height"
- @on-checkbox="handleCheckboxChange"
+ style="width: 100%"
+ :columns="columns"
+ :data="dataList"
+ :loading="loading"
+ :height="height"
+ @on-checkbox="handleCheckboxChange"
>
- <template #buttons="{row}">
- <vxe-button mode="text" @click="viewEvent(row)">{{ $t("common.common.edit") }}</vxe-button>
+ <template #buttons="{ row }">
+ <vxe-button mode="text" @click="viewEvent(row)">{{
+ $t("common.common.edit")
+ }}</vxe-button>
<!-- <vxe-button mode="text" @row-click="viewEvent(row.year)">缂栬緫</vxe-button> -->
</template>
</HxlhTable>
<!-- 瀵煎叆瀵硅瘽妗� -->
- <el-dialog :title="upload.title" v-model="upload.open" width="90%" append-to-body @close="dialogCancel">
+ <el-dialog
+ :title="upload.title"
+ v-model="upload.open"
+ width="90%"
+ append-to-body
+ @close="dialogCancel"
+ >
<el-row :gutter="10">
<el-col>
- <div style="border-bottom: 1px solid #ccc;" >
- <p>涓婁紶Excel鏂囦欢锛屽寘鍚剨缂濆伐鍗曚俊鎭�傜郴缁熷皢瑙f瀽鏁版嵁骞朵繚瀛樺埌鏈湴锛岀敤浜庡叧鑱斿埌鐒婄紳璁″垝涓��</p>
+ <div style="border-bottom: 1px solid #ccc">
+ <p>{{ $t("plan.upload.weldSeamInfo") }}</p>
</div>
</el-col>
- <el-col >
+ <el-col>
<div></div>
</el-col>
</el-row>
<el-row>
<el-col>
- <el-upload ref="uploadRef" :limit="1" accept=".xlsx, .xls" :headers="upload.headers" :action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading" :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="true" drag>
+ <el-upload
+ ref="uploadRef"
+ :limit="1"
+ accept=".xlsx, .xls"
+ :headers="upload.headers"
+ :action="upload.url + '?updateSupport=' + upload.updateSupport"
+ :disabled="upload.isUploading"
+ :on-progress="handleFileUploadProgress"
+ :on-success="handleFileSuccess"
+ :auto-upload="true"
+ drag
+ >
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
- <div class="el-upload__text">灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em></div>
+ <div class="el-upload__text">
+ {{ $t("plan.upload.prevText")
+ }}<em>{{ $t("plan.upload.uploadText") }}</em>
+ </div>
<template #tip>
<div class="el-upload__tip">
- <span>浠呭厑璁稿鍏ls銆亁lsx鏍煎紡鏂囦欢銆�</span>
+ <span>{{ $t("plan.upload.fileTypeImport") }}</span>
</div>
</template>
</el-upload>
</el-col>
</el-row>
<el-row>
- <el-col style="margin-top: 20px;">
+ <el-col style="margin-top: 20px">
<div v-show="isVisible">
- <el-alert icon="Check" :show-icon="true" title="鐒婄紳宸ュ崟鏁版嵁宸叉垚鍔熻В鏋�" type="success" :closable="false"/>
+ <el-alert
+ icon="Check"
+ :show-icon="true"
+ :title="$t('plan.upload.uploadParseWeldSeamData')"
+ type="success"
+ :closable="false"
+ />
</div>
<div v-show="isError">
- <el-alert icon="Close" :show-icon="true" title="鐒婄紳宸ュ崟鏁版嵁宸茶В鏋愬け璐�" type="error" :closable="false"/>
+ <el-alert
+ icon="Close"
+ :show-icon="true"
+ :title="$t('plan.upload.uploadErrorParseWeldSeamData')"
+ type="error"
+ :closable="false"
+ />
</div>
</el-col>
</el-row>
<el-row v-show="isVisible">
<el-col>
<div>
- <h2>鏁版嵁棰勮</h2>
+ <h2>{{ $t("plan.upload.dataPreview") }}</h2>
</div>
<HxlhTable
style="width: 100%"
@@ -87,67 +122,109 @@
</HxlhTable>
</el-col>
<el-col>
- <div style="text-align: right;">
- <h4>鍏变笂浼�<span style="color: blue;">{{ total }}</span>鏉$剨缂濆伐鍗曟暟鎹�</h4>
+ <div style="text-align: right">
+ <h4>
+ {{ $t("plan.upload.totalUpload")
+ }}<span style="color: blue">{{ total }}</span
+ >{{ $t("plan.upload.itemWeldSeamUpload") }}
+ </h4>
</div>
</el-col>
</el-row>
<template #footer>
<div class="dialog-footer">
<el-button
- type="success"
- plain
- icon="Check"
- :disabled="planned"
- @click="uploadParse"
- v-hasPermi="['weldSeam:weldSeam:confirmWeldSeam']"
- >纭涓婁紶</el-button>
- <el-button @click="dialogCancel">鍙� 娑�</el-button>
+ type="success"
+ plain
+ icon="Check"
+ :disabled="planned"
+ @click="uploadParse"
+ v-hasPermi="['weldSeam:weldSeam:confirmWeldSeam']"
+ >{{ $t("plan.upload.confirmUpload") }}</el-button
+ >
+ <el-button @click="dialogCancel">{{
+ $t("plan.upload.cancel")
+ }}</el-button>
</div>
</template>
</el-dialog>
<!-- 娣诲姞鎴栦慨鏀圭剨缂濆璇濇 -->
<el-dialog :title="title" v-model="open" width="700px" append-to-body>
- <el-form ref="weldSeamRef" :model="form" :rules="rules" label-width="150px">
- <el-form-item label="骞翠唤" prop="year">
- <el-input v-model="form.year" :disabled="isDisabled"/>
+ <el-form
+ ref="weldSeamRef"
+ :model="form"
+ :rules="rules"
+ :label-width="locale === 'zh' ? '150px' : '230px'"
+ >
+ <el-form-item :label="$t('plan.table.year')" prop="year">
+ <el-input v-model="form.year" :disabled="isDisabled" />
</el-form-item>
- <el-form-item label="鏈堜唤" prop="month">
- <el-input v-model="form.month" :disabled="isDisabled"/>
+ <el-form-item :label="$t('plan.table.month')" prop="month">
+ <el-input v-model="form.month" :disabled="isDisabled" />
</el-form-item>
- <el-form-item label="鐢熶骇鍩哄湴" prop="productionBase">
- <el-input v-model="form.productionBase" :disabled="isDisabled"/>
+ <el-form-item :label="$t('plan.table.productionBase')" prop="productionBase">
+ <el-input v-model="form.productionBase" :disabled="isDisabled" />
</el-form-item>
- <el-form-item label="绠¤矾璁㈠崟闇�姹�" prop="pipingOrderRequirement">
- <el-input v-model="form.pipingOrderRequirement" :disabled="isDisabled"/>
+ <el-form-item :label="$t('plan.query.pipelineOrderRequire')" prop="pipingOrderRequirement">
+ <el-input
+ v-model="form.pipingOrderRequirement"
+ :disabled="isDisabled"
+ />
</el-form-item>
- <el-form-item label="姘旀煖璁㈠崟闇�姹�" prop="gasOrderRequirement">
- <el-input v-model="form.gasOrderRequirement" :disabled="isDisabled"/>
+ <el-form-item :label="$t('plan.query.gasHolderOrderRequire')" prop="gasOrderRequirement">
+ <el-input v-model="form.gasOrderRequirement" :disabled="isDisabled" />
</el-form-item>
- <el-form-item label="绠¤矾棰勬祴闇�姹�" prop="pipingPredictionRequirement">
- <el-input v-model="form.pipingPredictionRequirement" :disabled="isDisabled"/>
+ <el-form-item :label="$t('plan.query.pipelinePredictionDemand')" prop="pipingPredictionRequirement">
+ <el-input
+ v-model="form.pipingPredictionRequirement"
+ :disabled="isDisabled"
+ />
</el-form-item>
- <el-form-item label="姘旀煖棰勬祴闇�姹�" prop="gasPredictionRequirement">
- <el-input v-model="form.gasPredictionRequirement" :disabled="isDisabled"/>
+ <el-form-item :label="$t('plan.query.gasHolderForecastDemand')" prop="gasPredictionRequirement">
+ <el-input
+ v-model="form.gasPredictionRequirement"
+ :disabled="isDisabled"
+ />
</el-form-item>
- <el-form-item label="棰勭暀绱ф�ヨ鍗曚骇鍑�" prop="reserveEmergencyOrderOutput">
- <el-input-number :min="0" v-model="form.reserveEmergencyOrderOutput" placeholder="璇疯緭棰勭暀绱ф�ヨ鍗曚骇鍑�" style="width: 100%;"/>
+ <el-form-item
+ label="棰勭暀绱ф�ヨ鍗曚骇鍑�"
+ prop="reserveEmergencyOrderOutput"
+ >
+ <el-input-number
+ :min="0"
+ v-model="form.reserveEmergencyOrderOutput"
+ placeholder="璇疯緭棰勭暀绱ф�ヨ鍗曚骇鍑�"
+ style="width: 100%"
+ />
</el-form-item>
<el-form-item label="鍚堣" prop="total">
- <el-input v-model="form.total" :disabled="isDisabled"/>
+ <el-input v-model="form.total" :disabled="isDisabled" />
</el-form-item>
<el-form-item label="澶╂暟" prop="days">
- <el-input-number :min="0" v-model="form.days" placeholder="璇疯緭鍏ュぉ鏁�" style="width: 100%;"/>
+ <el-input-number
+ :min="0"
+ v-model="form.days"
+ placeholder="璇疯緭鍏ュぉ鏁�"
+ style="width: 100%"
+ />
</el-form-item>
<el-form-item label="闇�姹傛棩鐒婄紳" prop="requirementDayWeldSeam">
- <el-input v-model="form.requirementDayWeldSeam" :disabled="isDisabled"/>
+ <el-input
+ v-model="form.requirementDayWeldSeam"
+ :disabled="isDisabled"
+ />
</el-form-item>
<el-form-item label="鐢熶骇鏃ョ剨缂�" prop="productionDayWeldSeam">
- <el-input-number :min="0" v-model="form.productionDayWeldSeam" placeholder="璇疯緭鐢熶骇鏃ョ剨缂�" style="width: 100%;"/>
+ <el-input-number
+ :min="0"
+ v-model="form.productionDayWeldSeam"
+ placeholder="璇疯緭鐢熶骇鏃ョ剨缂�"
+ style="width: 100%"
+ />
</el-form-item>
<el-form-item label="鏄惁婊¤冻" prop="isSatisfy">
- <el-input v-model="form.isSatisfy" :disabled="isDisabled"/>
+ <el-input v-model="form.isSatisfy" :disabled="isDisabled" />
</el-form-item>
</el-form>
<template #footer>
@@ -161,12 +238,22 @@
</template>
<script setup name="WeldSeam">
-import { listWeldSeam, getWeldSeam, delWeldSeam, addWeldSeam, updateWeldSeam ,examplePlan ,confirmWeldSeam ,query} from "@/api/mainPlan/weldSeam/weldSeam";
+import {
+ listWeldSeam,
+ getWeldSeam,
+ delWeldSeam,
+ addWeldSeam,
+ updateWeldSeam,
+ examplePlan,
+ confirmWeldSeam,
+ query,
+} from "@/api/mainPlan/weldSeam/weldSeam";
import { getToken } from "@/utils/auth";
-import HxlhTable from '@/components/HxlhTable'
+import HxlhTable from "@/components/HxlhTable";
import { ref } from "vue";
-import * as XLSX from 'xlsx';
-
+import * as XLSX from "xlsx";
+import { useI18n } from "vue-i18n"; //瑕佸湪js涓娇鐢ㄥ浗闄呭寲
+const { t, locale } = useI18n();
const { proxy } = getCurrentInstance();
const open = ref(false);
@@ -181,7 +268,7 @@
const isVisible = ref(false);
const isError = ref(false);
const planned = ref(true);
-const height = ref(document.documentElement.clientHeight - 170 + "px;")
+const height = ref(document.documentElement.clientHeight - 170 + "px;");
const exampleHeight = ref("500px");
const uploadRef = ref();
const exampleList = ref([]);
@@ -190,7 +277,11 @@
const isDisabled = ref(true);
const headers = ref([]);
const exportData = ref([]);
+// 琛ㄦ牸閰嶇疆
+const columns = ref([]);
+// 琛ㄦ牸閰嶇疆
+const exampleColumns = ref([]);
/** 瀵煎叆鍙傛暟 */
const upload = reactive({
// 鏄惁鏄剧ず寮瑰嚭灞傦紙鐢ㄦ埛瀵煎叆锛�
@@ -202,200 +293,13 @@
// 鏄惁鏇存柊宸茬粡瀛樺湪鐨勭敤鎴锋暟鎹�
updateSupport: 0,
// 璁剧疆涓婁紶鐨勮姹傚ご閮�
- headers: { Authorization: "Bearer " + getToken() ,local: import.meta.env.VITE_APP_LOCAL },
+ headers: {
+ Authorization: "Bearer " + getToken(),
+ local: import.meta.env.VITE_APP_LOCAL,
+ },
// 涓婁紶鐨勫湴鍧�
- url: import.meta.env.VITE_APP_BASE_API + "/aps/weldSeam/importData"
+ url: import.meta.env.VITE_APP_BASE_API + "/aps/weldSeam/importData",
});
-
-// 琛ㄦ牸閰嶇疆
-const columns = ref([
- { type: 'seq', title: '搴忓彿', width: 60, fixed: 'left' },
- {
- title: '骞翠唤',
- field: 'year',
- width: 100,
- fixed: 'left'
- },
- {
- title: '鏈堜唤',
- field: 'month',
- width: 80,
- fixed: 'left'
- },
- {
- title: '鐢熶骇鍩哄湴',
- field: 'productionBaseStr',
- width: 150,
- fixed: 'left',
- type: 'html'
- },
- {
- title: '璁㈠崟闇�姹�',
- field: 'order',
- children: [
- { field: 'pipingOrderRequirement', title: '绠¤矾', width: 140 },
- { field: 'gasOrderRequirement', title: '姘旀煖', width: 120 },
- ],
- width: 150,
- },
- {
- title: '棰勬祴闇�姹�',
- field: 'info',
- children: [
- { field: 'pipingPredictionRequirement', title: '绠¤矾', width: 140 },
- { field: 'gasPredictionRequirement', title: '姘旀煖', width: 120 },
- ],
- width: 150,
- },
- {
- title: '棰勭暀绱ф�ヨ鍗曚骇鍑�',
- field: 'reserveEmergencyOrderOutput',
- width: 150,
- },
- {
- title: '鍚堣',
- field: 'total',
- width: 150,
- },
- {
- title: '澶╂暟',
- field: 'days',
- width: 150,
- },
- {
- title: '闇�姹傛棩鐒婄紳',
- field: 'requirementDayWeldSeam',
- width: 100,
- },
- {
- title: '鐢熶骇鏃ョ剨缂�',
- field: 'productionDayWeldSeam',
- width: 150,
- },
- {
- title: '鏄惁婊¤冻',
- field: 'isSatisfyStr',
- width: 150,
- type: 'html'
- },
- { title: '鎿嶄綔', width: 100, fixed:"right", slots: { default: 'buttons' } }
-]);
-
-// 琛ㄦ牸閰嶇疆
-const exampleColumns = ref([
- { type: 'seq', title: '搴忓彿', width: 60 },
- {
- title: '宸ュ崟绫诲瀷',
- field: 'workOrderType',
- width: 80,
- },
- /* {
- title: '鍛ㄦ棩',
- field: 'weekDay',
- width: 100,
- formatter: (({ cellValue, row, column }) => {
- if (cellValue) {
- const weekDay = new Date(cellValue);
- const year = weekDay.getFullYear();
- const month = String(weekDay.getMonth() + 1).padStart(2, '0');
- const day = String(weekDay.getDate()).padStart(2, '0');
- return `${month}-${day}`;
- }
- return '';
- })
- }, */
- {
- title: '鐗╂枡缂栫爜',
- field: 'materialCode',
- width: 160,
- },
- {
- title: '瀹㈡埛鍥惧彿',
- field: 'customerDrawingNumber',
- width: 100,
- },
- {
- title: '缁勭粐璐﹀彿',
- field: 'organizeNumber',
- width: 200,
- },
- {
- title: '鐢熶骇鍩哄湴',
- field: 'productionBase',
- width: 100,
- },
- {
- title: '鍒嗙被(姘旀煖/绠¤矾)',
- field: 'classification',
- width: 150,
- },
- {
- title: '鐢熶骇骞翠唤',
- field: 'produceYear',
- width: 150,
- },
- {
- title: '鐢熶骇鏈堜唤',
- field: 'produceMonth',
- width: 150,
- },
- {
- title: '鐢熸垚鏁伴噺',
- field: 'productionQuantity',
- width: 100,
- },
- {
- title: '瀹㈡埛',
- field: 'customer',
- width: 150,
- },
- {
- title: '鍗曚欢鐒婄紳',
- field: 'singleWeldSeam',
- width: 150,
- },
- {
- title: '鎬荤剨缂�',
- field: 'totalWeldSeam',
- width: 100,
- },
- {
- title: '鏈鍙嶉鏃ユ湡',
- field: 'thisFeedbackDay',
- width: 100,
- },
- {
- title: '鐗╂枡闇�姹傛棩鏈�',
- field: 'materialsRequirementDay',
- width: 100,
- },
- {
- title: '閿�鍞鍗曞彿',
- field: 'saleOrderNo',
- width: 150,
- },
- {
- title: '閿�鍞鍗曡',
- field: 'saleOrderLine',
- width: 150,
- },
- {
- title: '涓诲伐鍗曞彿',
- field: 'mainWorkOrderNo',
- width: 180,
- },
- {
- title: '涓婄骇宸ュ崟鍙�',
- field: 'superiorWorkOrderNo',
- width: 180,
- },
- {
- title: '宸ュ崟鍙�',
- field: 'workOrderNo',
- width: 180,
- },
-]);
-
const data = reactive({
form: {},
queryParams: {
@@ -421,42 +325,238 @@
superiorWorkOrderNo: null,
workOrderNo: null,
plant: null,
- batchNumber: null
+ batchNumber: null,
},
rules: {
reserveEmergencyOrderOutput: [
{
required: true,
- message: '璇疯緭鍏ラ鐣欑揣鎬ヨ鍗曚骇鍑�',
- trigger: 'blur',
+ message: "璇疯緭鍏ラ鐣欑揣鎬ヨ鍗曚骇鍑�",
+ trigger: "blur",
},
],
days: [
{
required: true,
- message: '璇疯緭鍏ュぉ鏁�',
- trigger: 'blur',
+ message: "璇疯緭鍏ュぉ鏁�",
+ trigger: "blur",
},
],
productionDayWeldSeam: [
{
required: true,
- message: '璇疯緭鍏ラ鐣欑揣鎬ヨ鍗曚骇鍑�',
- trigger: 'blur',
+ message: "璇疯緭鍏ラ鐣欑揣鎬ヨ鍗曚骇鍑�",
+ trigger: "blur",
},
],
- }
+ },
});
const { queryParams, form, rules } = toRefs(data);
-
+watch(
+ locale,
+ (newLocale) => {
+ columns.value = [
+ { type: "seq", title: t("plan.table.seq"), width: 60, fixed: "left" },
+ {
+ title: t("plan.table.year"),
+ field: "year",
+ width: 100,
+ fixed: "left",
+ },
+ {
+ title: t("plan.table.month"),
+ field: "month",
+ width: 80,
+ fixed: "left",
+ },
+ {
+ title: t("plan.table.productionBase"),
+ field: "productionBaseStr",
+ width: 150,
+ fixed: "left",
+ type: "html",
+ },
+ {
+ title: t("plan.table.orderRequirements"),
+ field: "order",
+ children: [
+ {
+ field: "pipingOrderRequirement",
+ title: t("plan.table.piping"),
+ width: 140,
+ },
+ {
+ field: "gasOrderRequirement",
+ title: t("plan.table.gasHolder"),
+ width: 120,
+ },
+ ],
+ width: 150,
+ },
+ {
+ title: t("plan.table.forecastDemand"),
+ field: "info",
+ children: [
+ {
+ field: "pipingPredictionRequirement",
+ title: t("plan.table.piping"),
+ width: 140,
+ },
+ {
+ field: "gasPredictionRequirement",
+ title: t("plan.table.gasHolder"),
+ width: 120,
+ },
+ ],
+ width: 150,
+ },
+ {
+ title: t("plan.table.reserveOrderOutput"),
+ field: "reserveEmergencyOrderOutput",
+ width: 150,
+ },
+ {
+ title: t("plan.table.calTotal"),
+ field: "total",
+ width: 150,
+ },
+ {
+ title: t("plan.table.days"),
+ field: "days",
+ width: 150,
+ },
+ {
+ title: t("plan.table.requirementDayWeldSeam"),
+ field: "requirementDayWeldSeam",
+ width: 100,
+ },
+ {
+ title: t("plan.table.productionDayWeldSeam"),
+ field: "productionDayWeldSeam",
+ width: 150,
+ },
+ {
+ title: t("plan.table.isRequirements"),
+ field: "isSatisfyStr",
+ width: 150,
+ type: "html",
+ },
+ {
+ title: t("common.common.operate"),
+ width: 100,
+ fixed: "right",
+ slots: { default: "buttons" },
+ },
+ ];
+ exampleColumns.value = [
+ { type: "seq", title: t("plan.table.seq"), width: 60 },
+ {
+ title: t("basic.table.workOrderType"),
+ field: "workOrderType",
+ width: 80,
+ },
+ {
+ title: t("plan.table.materialCode"),
+ field: "materialCode",
+ width: 160,
+ },
+ {
+ title: t("plan.table.customerDrawingNumber"),
+ field: "customerDrawingNumber",
+ width: 100,
+ },
+ {
+ title: t("plan.table.organizationalAccount"),
+ field: "organizeNumber",
+ width: 200,
+ },
+ {
+ title: t("plan.table.productionBase"),
+ field: "productionBase",
+ width: 100,
+ },
+ {
+ title: t("plan.table.classification"),
+ field: "classification",
+ width: 150,
+ },
+ {
+ title: t("plan.table.productionYear"),
+ field: "produceYear",
+ width: 150,
+ },
+ {
+ title: t("plan.table.productionMonth"),
+ field: "produceMonth",
+ width: 150,
+ },
+ {
+ title: t("plan.table.generateQuantity"),
+ field: "productionQuantity",
+ width: 100,
+ },
+ {
+ title: t("plan.table.customer"),
+ field: "customer",
+ width: 150,
+ },
+ {
+ title: t("plan.table.singleWeldSeam"),
+ field: "singleWeldSeam",
+ width: 150,
+ },
+ {
+ title: t("plan.table.totalWeldSeam"),
+ field: "totalWeldSeam",
+ width: 100,
+ },
+ {
+ title: t("plan.table.dateFeedback"),
+ field: "thisFeedbackDay",
+ width: 100,
+ },
+ {
+ title: t("plan.table.materialRequirementDate"),
+ field: "materialsRequirementDay",
+ width: 100,
+ },
+ {
+ title: t("plan.table.salesOrder"),
+ field: "saleOrderNo",
+ width: 150,
+ },
+ {
+ title: t("plan.table.salesOrderLine"),
+ field: "saleOrderLine",
+ width: 150,
+ },
+ {
+ title: t("plan.table.mainWorkOrderNumber"),
+ field: "mainWorkOrderNo",
+ width: 180,
+ },
+ {
+ title: t("plan.table.superiorWorkOrderNumber"),
+ field: "superiorWorkOrderNo",
+ width: 180,
+ },
+ {
+ title: t("plan.table.workOrderNo"),
+ field: "workOrderNo",
+ width: 180,
+ },
+ ];
+ },
+ { immediate: true, deep: true }
+);
/** 鏌ヨ鐒婄紳鍒楄〃 */
function getList() {
loading.value = true;
- query(queryParams.value).then(response => {
+ query(queryParams.value).then((response) => {
let responseData = response.rows;
// exportData.value = response.rows;
- responseData.forEach(item=>{
+ responseData.forEach((item) => {
let data = [];
data.push(item.year);
data.push(item.month);
@@ -472,10 +572,16 @@
data.push(item.productionDayWeldSeam);
data.push(item.isSatisfy);
- item.productionBaseStr = item.isSatisfy === '鍚�' ? `<div class='el-badge'><sup class="el-badge__content is-fixed is-dot" style="right: 2px; top: 2px;"></sup>${item.productionBase}</div>` : item.productionBase
- item.isSatisfyStr = item.isSatisfy === '鍚�' ? `<font color='red'>${item.isSatisfy}</font>` : item.isSatisfy
+ item.productionBaseStr =
+ item.isSatisfy === "鍚�"
+ ? `<div class='el-badge'><sup class="el-badge__content is-fixed is-dot" style="right: 2px; top: 2px;"></sup>${item.productionBase}</div>`
+ : item.productionBase;
+ item.isSatisfyStr =
+ item.isSatisfy === "鍚�"
+ ? `<font color='red'>${item.isSatisfy}</font>`
+ : item.isSatisfy;
exportData.value.push(data);
- })
+ });
dataList.value = responseData;
loading.value = false;
});
@@ -509,7 +615,7 @@
mainWorkOrderNo: null,
superiorWorkOrderNo: null,
workOrderNo: null,
- plant: null
+ plant: null,
};
proxy.resetForm("weldSeamRef");
}
@@ -530,41 +636,41 @@
// 澶氶�夋閫変腑鏁版嵁
function handleSelectionChange(selection) {
- ids.value = selection.map(item => item.id);
+ ids.value = selection.map((item) => item.id);
single.value = selection.length != 1;
multiple.value = !selection.length;
}
/** 鏂板鎸夐挳鎿嶄綔 */
-function handleAdd() {
- reset();
- open.value = true;
- title.value = "娣诲姞鐒婄紳";
-}
+// function handleAdd() {
+// reset();
+// open.value = true;
+// title.value = "娣诲姞鐒婄紳";
+// }
/** 淇敼鎸夐挳鎿嶄綔 */
-function handleUpdate(row) {
- reset();
- const _id = row.id || ids.value
- getWeldSeam(_id).then(response => {
- form.value = response.data;
- open.value = true;
- title.value = "淇敼鐒婄紳";
- });
-}
+// function handleUpdate(row) {
+// reset();
+// const _id = row.id || ids.value;
+// getWeldSeam(_id).then((response) => {
+// form.value = response.data;
+// open.value = true;
+// title.value = "淇敼鐒婄紳";
+// });
+// }
/** 鎻愪氦鎸夐挳 */
function submitForm() {
- proxy.$refs["weldSeamRef"].validate(valid => {
+ proxy.$refs["weldSeamRef"].validate((valid) => {
if (valid) {
if (form.value.id != null) {
- updateWeldSeam(form.value).then(response => {
+ updateWeldSeam(form.value).then((response) => {
proxy.$modal.msgSuccess("淇敼鎴愬姛");
open.value = false;
getList();
});
} else {
- addWeldSeam(form.value).then(response => {
+ addWeldSeam(form.value).then((response) => {
proxy.$modal.msgSuccess("鏂板鎴愬姛");
open.value = false;
getList();
@@ -577,27 +683,61 @@
/** 鍒犻櫎鎸夐挳鎿嶄綔 */
function handleDelete(row) {
const _ids = row.id || ids.value;
- proxy.$modal.confirm('鏄惁纭鍒犻櫎鐒婄紳缂栧彿涓�"' + _ids + '"鐨勬暟鎹」锛�').then(function() {
- return delWeldSeam(_ids);
- }).then(() => {
- getList();
- proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
- }).catch(() => {});
+ proxy.$modal
+ .confirm('鏄惁纭鍒犻櫎鐒婄紳缂栧彿涓�"' + _ids + '"鐨勬暟鎹」锛�')
+ .then(function () {
+ return delWeldSeam(_ids);
+ })
+ .then(() => {
+ getList();
+ proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+ })
+ .catch(() => {});
}
/** 瀵煎叆鎸夐挳鎿嶄綔 */
function handleImport() {
- upload.title = "鐒婄紳宸ュ崟鏁版嵁涓婁紶";
+ upload.title = t("plan.upload.uploadWeldSeamData");
upload.open = true;
-};
+}
/** 瀵煎嚭鎸夐挳鎿嶄綔 */
function handleExport() {
- const headersOne = ["骞翠唤","鏈堜唤","鐢熶骇鍩哄湴","璁㈠崟闇�姹�","","棰勬祴闇�姹�","","棰勭暀绱ф�ヨ鍗曚骇鍑�","鍚堣","澶╂暟","闇�姹傛棩鐒婄紳","鐢熶骇鏃ョ剨缂�","鏄惁婊¤冻"]
- const headersTwo = ["","","","绠¤矾","姘旀煖","绠¤矾","姘旀煖","","","","","",""]
+ const headersOne = [
+ "骞翠唤",
+ "鏈堜唤",
+ "鐢熶骇鍩哄湴",
+ "璁㈠崟闇�姹�",
+ "",
+ "棰勬祴闇�姹�",
+ "",
+ "棰勭暀绱ф�ヨ鍗曚骇鍑�",
+ "鍚堣",
+ "澶╂暟",
+ "闇�姹傛棩鐒婄紳",
+ "鐢熶骇鏃ョ剨缂�",
+ "鏄惁婊¤冻",
+ "鍒嗙被"
+ ];
+ const headersTwo = [
+ "",
+ "",
+ "",
+ "绠¤矾",
+ "姘旀煖",
+ "绠¤矾",
+ "姘旀煖",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ ];
headers.value.push(headersOne);
headers.value.push(headersTwo);
-
+
// 鍚堝苟琛ㄥご鍜屾暟鎹�
const finalData = [...headers.value, ...exportData.value];
@@ -605,7 +745,7 @@
const ws = XLSX.utils.aoa_to_sheet(finalData);
// 鍚堝苟鍗曞厓鏍硷紙濡傛灉闇�瑕侊級
- ws['!merges'] = [
+ ws["!merges"] = [
{ s: { r: 0, c: 0 }, e: { r: 1, c: 0 } },
{ s: { r: 0, c: 1 }, e: { r: 1, c: 1 } },
{ s: { r: 0, c: 2 }, e: { r: 1, c: 2 } },
@@ -622,28 +762,30 @@
// ws['!merges'] = merges;
// 璁剧疆灞呬腑鏍峰紡
- const centerStyle = { alignment: { horizontal: 'center', vertical: 'center' } };
- const range = XLSX.utils.decode_range(ws['!ref']);
- for (let R = range.s.r; R <= range.e.r; ++R) {
- for (let C = range.s.c; C <= range.e.c; ++C) {
- const cellAddress = XLSX.utils.encode_cell({ r: R, c: C });
- const cell = ws[cellAddress];
- if (cell) {
- cell.s = centerStyle;
- }
- }
+ const centerStyle = {
+ alignment: { horizontal: "center", vertical: "center" },
+ };
+ const range = XLSX.utils.decode_range(ws["!ref"]);
+ for (let R = range.s.r; R <= range.e.r; ++R) {
+ for (let C = range.s.c; C <= range.e.c; ++C) {
+ const cellAddress = XLSX.utils.encode_cell({ r: R, c: C });
+ const cell = ws[cellAddress];
+ if (cell) {
+ cell.s = centerStyle;
+ }
}
-
+ }
+
// 鍒涘缓 workbook
const wb = XLSX.utils.book_new();
// 灏� worksheet 娣诲姞鍒� workbook 涓�
- XLSX.utils.book_append_sheet(wb, ws, 'Sheet1');
+ XLSX.utils.book_append_sheet(wb, ws, "Sheet1");
// 瀵煎嚭鏂囦欢
- XLSX.writeFile(wb, `apsPartRouteStat_${new Date().getTime()}.xlsx`);
+ XLSX.writeFile(wb, `welSeam_${new Date().getTime()}.xlsx`);
}
/** dialog鍙栨秷 */
-function dialogCancel(){
+function dialogCancel() {
if (uploadRef.value) {
uploadRef.value.clearFiles();
}
@@ -661,15 +803,24 @@
/** 鏂囦欢涓婁紶鎴愬姛澶勭悊 */
const handleFileSuccess = (response, file, fileList) => {
- if(response.code == '200'){
+ if (response.code == "200") {
batchNumber.value = response.data;
isVisible.value = true;
planned.value = false;
isError.value = false;
getExampleList();
- }else{
+ } else {
isError.value = true;
- proxy.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "瀵煎叆缁撴灉", { dangerouslyUseHTMLString: true });
+ proxy.$alert(
+ "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
+ response.msg +
+ "</div>",
+ t("plan.upload.errorResult"),
+ { dangerouslyUseHTMLString: true,
+ confirmButtonText: t("plan.btns.confirm"),
+ cancelButtonText: t("plan.btns.cancel"),
+ }
+ );
}
proxy.$refs["uploadRef"].handleRemove(file);
upload.isUploading = false;
@@ -679,7 +830,7 @@
function uploadParse() {
queryParams.value.params = {};
queryParams.value.params["batchNumber"] = batchNumber.value;
- confirmWeldSeam(queryParams.value).then(response => {
+ confirmWeldSeam(queryParams.value).then((response) => {
exampleList.value = response.rows;
loading.value = false;
isVisible.value = false;
@@ -688,9 +839,9 @@
upload.open = false;
getList();
ElMessage({
- message: '鐒婄紳宸ュ崟鏁版嵁宸叉垚鍔熶笂浼犲拰瑙f瀽',
- type: 'success',
- })
+ message: `${t("plan.title.metalWeldWork")}${t("plan.title.parseUpload")}`,
+ type: "success",
+ });
});
}
@@ -699,17 +850,17 @@
loading.value = true;
queryParams.value = {};
queryParams.value.batchNumber = batchNumber.value;
- examplePlan(queryParams.value).then(response => {
+ examplePlan(queryParams.value).then((response) => {
exampleList.value = response.rows;
total.value = response.total;
loading.value = false;
});
}
-function viewEvent(row){
+function viewEvent(row) {
open.value = true;
- title.value = "淇敼鐒婄紳";
- form.value = {...row};
+ title.value = `${t("common.common.modify")} ${t("plan.title.weld")}`;
+ form.value = { ...row };
}
getList();
--
Gitblit v1.9.3