盘点管理下5个页面国际化

This commit is contained in:
猫猫guowen
2025-06-05 16:02:04 +08:00
parent f3c2f3a1ac
commit 02d3734e9f
7 changed files with 1021 additions and 530 deletions

View File

@@ -1,16 +1,16 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="任务ID" prop="jobId">
<el-form-item :label="$t('checkJobOut.jobId')" prop="jobId"> <!-- 任务ID -->
<el-input
v-model="queryParams.jobId"
placeholder="请输入任务ID"
:placeholder="$t('checkJobOut.inputJobId')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="任务状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择任务状态" clearable>
<el-form-item :label="$t('checkJobOut.status')" prop="status"> <!-- 任务状态 -->
<el-select v-model="queryParams.status" :placeholder="$t('checkJobOut.selectStatus')" clearable>
<el-option
v-for="dict in dict.type.mydo_job_status"
:key="dict.value"
@@ -29,10 +29,10 @@
/>
</el-select>
</el-form-item>-->
<el-form-item label="任务号" prop="taskNo">
<el-form-item :label="$t('checkJobOut.taskNo')" prop="taskNo"> <!-- 任务号 -->
<el-input
v-model="queryParams.taskNo"
placeholder="请输入任务号"
:placeholder="$t('checkJobOut.inputTaskNo')"
clearable
@keyup.enter.native="handleQuery"
/>
@@ -61,10 +61,10 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>-->
<el-form-item label="托盘码" prop="trayCode">
<el-form-item :label="$t('checkJobOut.trayCode')" prop="trayCode"> <!-- 托盘码 -->
<el-input
v-model="queryParams.trayCode"
placeholder="请输入托盘码"
:placeholder="$t('checkJobOut.inputTrayCode')"
clearable
@keyup.enter.native="handleQuery"
/>
@@ -93,10 +93,10 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>-->
<el-form-item label="目标货位" prop="targetCargoSpaceId">
<el-form-item :label="$t('checkJobOut.targetCargoSpace')" prop="targetCargoSpaceId"> <!-- 目标货位 -->
<el-input
v-model="queryParams.targetCargoSpaceId"
placeholder="请输入目标货位ID"
:placeholder="$t('checkJobOut.inputTargetCargoSpace')"
clearable
@keyup.enter.native="handleQuery"
/>
@@ -125,8 +125,8 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>-->
<el-form-item label="执行阶段" prop="executionPhase">
<el-select v-model="queryParams.executionPhase" placeholder="请选择执行阶段" clearable>
<el-form-item :label="$t('checkJobOut.executionPhase')" prop="executionPhase"> <!-- 执行阶段 -->
<el-select v-model="queryParams.executionPhase" :placeholder="$t('checkJobOut.selectExecutionPhase')" clearable>
<el-option
v-for="dict in dict.type.execution_phase_type"
:key="dict.value"
@@ -135,8 +135,8 @@
/>
</el-select>
</el-form-item>
<el-form-item label="任务类型" prop="inOrOut">
<el-select v-model="queryParams.inOrOut" placeholder="请选择任务类型" clearable>
<el-form-item :label="$t('checkJobOut.jobType')" prop="inOrOut"> <!-- 任务类型 -->
<el-select v-model="queryParams.inOrOut" :placeholder="$t('checkJobOut.selectJobType')" clearable>
<el-option
v-for="dict in dict.type.check_out_job_type"
:key="dict.value"
@@ -145,34 +145,34 @@
/>
</el-select>
</el-form-item>
<el-form-item label="开始时间" prop="startTime">
<el-form-item :label="$t('checkJobOut.startTime')" prop="startTime"> <!-- 开始时间 -->
<el-date-picker clearable
v-model="queryParams.startTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择开始时间">
:placeholder="$t('checkJobOut.selectStartTime')">
</el-date-picker>
</el-form-item>
<el-form-item label="结束时间" prop="finishTime">
<el-form-item :label="$t('checkJobOut.finishTime')" prop="finishTime"> <!-- 结束时间 -->
<el-date-picker clearable
v-model="queryParams.finishTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择结束时间">
:placeholder="$t('checkJobOut.selectFinishTime')">
</el-date-picker>
</el-form-item>
<el-form-item label="入口" prop="entranceId">
<el-form-item :label="$t('checkJobOut.entranceId')" prop="entranceId"> <!-- 入口ID -->
<el-input
v-model="queryParams.entranceId"
placeholder="请输入入口ID"
:placeholder="$t('checkJobOut.inputEntranceId')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="出口" prop="exitId">
<el-form-item :label="$t('checkJobOut.exitId')" prop="exitId"> <!-- 出口ID -->
<el-input
v-model="queryParams.exitId"
placeholder="请输入出口ID"
:placeholder="$t('checkJobOut.inputExitId')"
clearable
@keyup.enter.native="handleQuery"
/>
@@ -185,10 +185,10 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>-->
<el-form-item label="仓库" prop="warehouseId">
<el-form-item :label="$t('checkJobOut.warehouse')" prop="warehouseId"> <!-- 仓库 -->
<el-input
v-model="queryParams.warehouseId"
placeholder="请输入仓库ID"
:placeholder="$t('checkJobOut.inputWarehouseId')"
clearable
@keyup.enter.native="handleQuery"
/>
@@ -202,12 +202,13 @@
/>
</el-form-item>-->
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{$t('checkJobOut.search')}}</el-button> <!-- 搜索 -->
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{$t('checkJobOut.reset')}}</el-button> <!-- 重置 -->
</el-form-item>
</el-form>
<!-- <el-row :gutter="10" class="mb8">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="danger"
@@ -216,7 +217,7 @@
size="mini"
@click="handleCompletedManually({type: 'invalid'})"
v-hasPermi="['job:mydoJob:CompletedManually']"
>手动作废</el-button>
>{{$t('checkJobOut.manualInvalid')}}</el-button> <!-- 手动作废 -->
</el-col>
<el-col :span="1.5">
<el-button
@@ -226,9 +227,9 @@
size="mini"
@click="handleCompletedManually({type: 'completed'})"
v-hasPermi="['job:mydoJob:CompletedManually']"
>手动完成</el-button>
>{{$t('checkJobOut.manualFinish')}}</el-button> <!-- 手动完成 -->
</el-col>
&lt;!&ndash; <el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button
type="warning"
plain
@@ -237,62 +238,73 @@
@click="handleExport"
v-hasPermi="['job:mydoJob:export']"
>导出</el-button>
</el-col>&ndash;&gt;
</el-col> -->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>-->
</el-row>
<el-table v-loading="loading" :data="mydoJobList" @selection-change="handleSelectionChange" @row-click="handleRowClick" highlight-current-row :current-row="currentRow"
max-height="300">
<el-table v-loading="loading" :data="jobList" @selection-change="handleSelectionChange" @row-click="handleRowClick">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="任务ID" align="center" prop="jobId" fixed />
<el-table-column label="任务状态" align="center" prop="status">
<el-table-column :label="$t('checkJobOut.jobId')" align="center" prop="jobId" /> <!-- 任务ID -->
<el-table-column :label="$t('checkJobOut.status')" align="center" prop="status"> <!-- 任务状态 -->
<template slot-scope="scope">
<dict-tag :options="dict.type.mydo_job_status" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="上线类型" align="center" prop="onLineType">
<el-table-column :label="$t('checkJobOut.onLineType')" align="center" prop="onLineType"> <!-- 上线类型 -->
<template slot-scope="scope">
<dict-tag :options="dict.type.on_line_type" :value="scope.row.onLineType"/>
</template>
</el-table-column>
<el-table-column label="任务类型" align="center" prop="inOrOut">
<el-table-column :label="$t('checkJobOut.jobType')" align="center" prop="inOrOut"> <!-- 任务类型 -->
<template slot-scope="scope">
<dict-tag :options="dict.type.check_out_job_type" :value="scope.row.inOrOut"/>
</template>
</el-table-column>
<el-table-column label="任务号" align="center" prop="taskNo" />
<el-table-column label="供应商" align="center" prop="supplierName" key="supplierId" value="supplierName" />
<!-- <el-table-column label="客户ID" align="center" prop="customerId" />-->
<el-table-column label="部门" align="center" prop="departmentName" />
<el-table-column label="托盘码" align="center" prop="trayCode" />
<el-table-column label="巷道ID" align="center" prop="roadwayId" />
<el-table-column label="货位" align="center" prop="cargoSpaceName" />
<el-table-column label="目标巷道" align="center" prop="targetRoadwayId" />
<el-table-column label="目标货位" align="center" prop="targetCargoSpaceName" />
<el-table-column label="产线ID" align="center" prop="lineId" />
<el-table-column label="车间ID" align="center" prop="workshopId" />
<el-table-column label="优先级" align="center" prop="priority" />
<el-table-column label="执行阶段" align="center" prop="executionPhase">
<el-table-column :label="$t('checkJobOut.taskNo')" align="center" prop="taskNo" /> <!-- 任务号 -->
<el-table-column :label="$t('checkJobOut.supplierId')" align="center" prop="supplierId" /> <!-- 供应商ID -->
<el-table-column :label="$t('checkJobOut.departmentId')" align="center" prop="departmentId" /> <!-- 部门ID -->
<el-table-column :label="$t('checkJobOut.trayCode')" align="center" prop="trayCode" /> <!-- 托盘码 -->
<el-table-column :label="$t('checkJobOut.roadwayId')" align="center" prop="roadwayId" /> <!-- 巷道ID -->
<el-table-column :label="$t('checkJobOut.cargoSpaceId')" align="center" prop="cargoSpaceId" /> <!-- 货位ID -->
<el-table-column :label="$t('checkJobOut.targetRoadwayId')" align="center" prop="targetRoadwayId" /> <!-- 目标巷道ID -->
<el-table-column :label="$t('checkJobOut.targetCargoSpace')" align="center" prop="targetCargoSpaceId" /> <!-- 目标货位 -->
<el-table-column :label="$t('checkJobOut.lineId')" align="center" prop="lineId" /> <!-- 产线ID -->
<el-table-column :label="$t('checkJobOut.workshopId')" align="center" prop="workshopId" /> <!-- 车间ID -->
<el-table-column :label="$t('checkJobOut.priority')" align="center" prop="priority" /> <!-- 优先级 -->
<el-table-column :label="$t('checkJobOut.executionPhase')" align="center" prop="executionPhase"> <!-- 执行阶段 -->
<template slot-scope="scope">
<dict-tag :options="dict.type.execution_phase_type" :value="scope.row.executionPhase"/>
</template>
</el-table-column>
<el-table-column label="开始时间" align="center" prop="startTime" width="180">
<el-table-column :label="$t('checkJobOut.startTime')" align="center" prop="startTime" width="180"> <!-- 开始时间 -->
<template slot-scope="scope">
<span>{{ parseTime(scope.row.startTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="结束时间" align="center" prop="finishTime" width="180">
<el-table-column :label="$t('checkJobOut.finishTime')" align="center" prop="finishTime" width="180"> <!-- 结束时间 -->
<template slot-scope="scope">
<span>{{ parseTime(scope.row.finishTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="入口ID" align="center" prop="entranceId" />
<!-- <el-table-column label="出口ID" align="center" prop="exitId" />-->
<el-table-column label="班组ID" align="center" prop="classId" />
<el-table-column label="仓库ID" align="center" prop="warehouseId" />
<el-table-column label="重分标记" align="center" prop="faultFlag" />
<el-table-column :label="$t('checkJobOut.entranceId')" align="center" prop="entranceId" /> <!-- 入口ID -->
<el-table-column :label="$t('checkJobOut.exitId')" align="center" prop="exitId" /> <!-- 出口ID -->
<el-table-column :label="$t('checkJobOut.classId')" align="center" prop="classId" /> <!-- 班组ID -->
<el-table-column :label="$t('checkJobOut.warehouse')" align="center" prop="warehouseId" /> <!-- 仓库 -->
<el-table-column :label="$t('checkJobOut.faultFlag')" align="center" prop="faultFlag" /> <!-- 重分标记 -->
<el-table-column :label="$t('checkJobOut.operation')" align="center" class-name="small-padding fixed-width"> <!-- 操作 -->
<template slot-scope="scope">
<el-button
size="mini"
type="text"
@click="handleManualFinish(scope.row)"
>{{$t('checkJobOut.manualFinish')}}</el-button> <!-- 手动完成 -->
<el-button
size="mini"
type="text"
@click="handleManualInvalid(scope.row)"
>{{$t('checkJobOut.manualInvalid')}}</el-button> <!-- 手动作废 -->
</template>
</el-table-column>
</el-table>
<pagination
@@ -303,32 +315,36 @@
@pagination="getList"
/>
<el-table v-loading="detailLoading" :data="mydoJobDetailList" @selection-change="handleSelectionChange"
max-height="300"
>
<el-table v-loading="loading" :data="subJobList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="子任务ID" align="center" prop="jobDetailId" />
<el-table-column label="任务ID" align="center" prop="jobId" />
<el-table-column label="库存ID" align="center" prop="stockId" />
<el-table-column label="批次号" align="center" prop="lotNo" />
<el-table-column label="入库时间" align="center" prop="inDate" width="180">
<el-table-column :label="$t('checkJobOut.subJobId')" align="center" prop="subJobId" /> <!-- 子任务ID -->
<el-table-column :label="$t('checkJobOut.jobId')" align="center" prop="jobId" /> <!-- 任务ID -->
<el-table-column :label="$t('checkJobOut.stockId')" align="center" prop="stockId" /> <!-- 库存ID -->
<el-table-column :label="$t('checkJobOut.batchNo')" align="center" prop="batchNo" /> <!-- 批次号 -->
<el-table-column :label="$t('checkJobOut.inTime')" align="center" prop="inTime" width="180"> <!-- 入库时间 -->
<template slot-scope="scope">
<span>{{ parseTime(scope.row.inDate, '{y}-{m}-{d}') }}</span>
<span>{{ parseTime(scope.row.inTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="单据ID" align="center" prop="inOrOutId" />
<el-table-column label="子单据ID" align="center" prop="inOrOutDId" />
<el-table-column label="物料GUID" align="center" prop="productGuid" />
<el-table-column label="物料编码" align="center" prop="productId" />
<el-table-column label="库存状态" align="center" prop="stockStatus" />
<el-table-column label="入库数量" align="center" prop="inQuantity" />
<!-- <el-table-column label="库存数量" align="center" prop="stockQuantity" />-->
<!-- <el-table-column label="出库数量" align="center" prop="outQuantity" />-->
<!-- <el-table-column label="整层数量" align="center" prop="layerQuantity" />-->
<!-- <el-table-column label="出库层数量" align="center" prop="outLayerQuantity" />-->
<!-- <el-table-column label="回流数量" align="center" prop="giveNum" />-->
<!-- <el-table-column label="追溯入库单ID" align="center" prop="stockinId" />-->
<!-- <el-table-column label="垛型ID" align="center" prop="stackingId" />-->
<el-table-column :label="$t('checkJobOut.billId')" align="center" prop="billId" /> <!-- 单据ID -->
<el-table-column :label="$t('checkJobOut.subBillId')" align="center" prop="subBillId" /> <!-- 子单据ID -->
<el-table-column :label="$t('checkJobOut.materialGuid')" align="center" prop="materialGuid" /> <!-- 物料GUID -->
<el-table-column :label="$t('checkJobOut.materialCode')" align="center" prop="materialCode" /> <!-- 物料编码 -->
<el-table-column :label="$t('checkJobOut.stockStatus')" align="center" prop="stockStatus" /> <!-- 库存状态 -->
<el-table-column :label="$t('checkJobOut.inQty')" align="center" prop="inQty" /> <!-- 入库数量 -->
<el-table-column :label="$t('checkJobOut.productDate')" align="center" prop="productDate" width="180"> <!-- 生产日期 -->
<template slot-scope="scope">
<span>{{ parseTime(scope.row.productDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('checkJobOut.supplierId')" align="center" prop="supplierId" /> <!-- 供应商ID -->
<!-- <el-table-column label="库存数量" align="center" prop="stockQuantity" />
<!-- <el-table-column label="出库数量" align="center" prop="outQuantity" />
<!-- <el-table-column label="整层数量" align="center" prop="layerQuantity" />
<!-- <el-table-column label="出库层数量" align="center" prop="outLayerQuantity" />
<!-- <el-table-column label="回流数量" align="center" prop="giveNum" />
<!-- <el-table-column label="追溯入库单ID" align="center" prop="stockinId" />
<!-- <el-table-column label="垛型ID" align="center" prop="stackingId" />
<!-- <el-table-column label="出库口ID" align="center" prop="exitId" />-->
<el-table-column label="生产日期" align="center" prop="printDate" />
<!-- <el-table-column label="客户ID" align="center" prop="customerId" />-->
@@ -425,13 +441,13 @@ export default {
// 表单校验
rules: {
jobId: [
{ required: true, message: "任务ID不能为空", trigger: "blur" }
{ required: true, message: this.$t('checkJobOut.inputJobId'), trigger: 'blur' }
],
status: [
{ required: true, message: "任务状态不能为空", trigger: "change" }
{ required: true, message: this.$t('checkJobOut.selectStatus'), trigger: 'change' }
],
taskNo: [
{ required: true, message: "任务号不能为空", trigger: "blur" }
{ required: true, message: this.$t('checkJobOut.inputTaskNo'), trigger: 'blur' }
],
}
}
@@ -522,7 +538,7 @@ export default {
handleCompletedManually(row) {
const jobIds = this.ids;
if (jobIds.length === 0) {
this.$modal.msgError("请选择要操作的数据");
this.$modal.msgError(this.$t('checkJobOut.selectData')); // 请选择要操作的数据
return;
}
if (row.type === 'invalid'){
@@ -563,6 +579,34 @@ export default {
this.detailLoading = false;
});
},
/** 手动完成按钮操作 */
handleManualFinish(row) {
const jobIds = row.jobId || this.ids;
if (jobIds.length === 0) {
this.$modal.msgError(this.$t('checkJobOut.selectData'));
return;
}
this.$modal.confirm(this.$t('checkJobOut.confirmFinish', { jobIds: jobIds })).then(function() {
return manualFinish(jobIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess(this.$t('checkJobOut.finishSuccess'));
}).catch(() => {});
},
/** 手动作废按钮操作 */
handleManualInvalid(row) {
const jobIds = row.jobId || this.ids;
if (jobIds.length === 0) {
this.$modal.msgError(this.$t('checkJobOut.selectData'));
return;
}
this.$modal.confirm(this.$t('checkJobOut.confirmInvalid', { jobIds: jobIds })).then(function() {
return manualInvalid(jobIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess(this.$t('checkJobOut.invalidSuccess'));
}).catch(() => {});
},
}
}
</script>