feat: 完成工艺与质量页面国际化

This commit is contained in:
zhangshun
2026-05-28 17:24:38 +08:00
parent f7a4641a6f
commit e7251c6ed8
7 changed files with 653 additions and 271 deletions

View File

@@ -309,6 +309,184 @@ export default {
selectOrder: 'Please select an order!',
confirmCompleteOrder: 'Confirm early completion for order {orderNo}?'
},
recipeManagement: {
productModelLabel: 'Product Model:',
productModel: 'Product Model',
search: 'Search',
loadingData: 'Loading data',
productModelCode: 'Pro. Model Code',
largeModel: 'Large Model',
add: 'Add',
edit: 'Edit',
partType: 'Part Type',
partTypeSign: 'Part Type Sign',
partTypeName: 'Part Type Name',
pleaseEnter: 'Please enter',
pleaseSelect: 'Please select',
addSuccess: 'Added successfully',
addFailedDuplicate: 'Add failed, duplicate data!',
prompt: 'Prompt',
confirmDelete: 'This action will permanently delete this row. Continue?',
deleteSuccess: 'Deleted successfully',
deleteFailed: 'Delete failed!',
deleteCanceled: 'Deletion canceled',
editSuccess: 'Updated successfully',
editFailedDuplicate: 'Update failed! Duplicate data'
},
assemblyQualitydataQuery: {
stationNumberLabel: 'Station No.:',
selectStationNumber: 'Please select station number',
orderNumberLabel: 'Order No.:',
orderNumber: 'Order No.',
productModelLabel: 'Product Model:',
selectProductModel: 'Please select product model',
productionTimeLabel: 'Production Time:',
startDate: 'Start Date',
endDate: 'End Date',
dateRangeSeparator: '~',
search: 'Search',
loadingData: 'Loading data',
sequence: 'No.',
stationNumber: 'Station No.',
productNumber: 'Product No.',
productModel: 'Product Model',
measuringPosition: 'Measuring Position',
measuringProject: 'Item',
measuringValue: 'Value',
measuringUnit: 'Unit',
upperLimit: 'Upper Limit',
lowerLimit: 'Lower Limit',
productionDate: 'Production Date',
qualifiedFlag: 'Qualified Flag',
qualified: 'Qualified',
unqualified: 'Unqualified',
all: 'All',
noData: 'No data'
},
inquiryTransitInformation: {
stationNumberLabel: 'Station No.:',
stationNumber: 'Station No.',
orderNumberLabel: 'Order No.:',
orderNumber: 'Order No.',
productModelLabel: 'Product Model:',
selectProductModel: 'Please select product model',
productionTimeLabel: 'Production Time:',
startDate: 'Start Date',
endDate: 'End Date',
dateRangeSeparator: '~',
search: 'Search',
loadingData: 'Loading data',
sequence: 'No.',
productNumber: 'Product No.',
productModel: 'Product Model',
arrivalTime: 'Arrival Time',
departureTime: 'Departure Time',
onlineTimeSeconds: 'Online Time (s)',
isQualified: 'Qualified',
noData: 'No data'
},
materialDataQuery: {
stationNumberLabel: 'Station No.:',
selectStationNumber: 'Please select station number',
orderNumberLabel: 'Order No.:',
orderNumber: 'Order No.',
productModelLabel: 'Product Model:',
selectProductModel: 'Please select product model',
materialBarcodeLabel: 'Material Barcode:',
enterMaterialBarcode: 'Please enter material barcode',
productionTimeLabel: 'Production Time:',
startDate: 'Start Date',
endDate: 'End Date',
dateRangeSeparator: '~',
search: 'Search',
loadingData: 'Loading data',
sequence: 'No.',
stationNumber: 'Station No.',
productNumber: 'Product No.',
productModel: 'Product Model',
materialNumber: 'Material No.',
partQuantity: 'Part Quantity',
partName: 'Part Name',
materialBarcode: 'Material Barcode',
operationTime: 'Operation Time',
noData: 'No data'
},
materialVerificationMaintenance: {
stationNumberLabel: 'Station No.:',
selectStationNumber: 'Please select station number',
productModelLabel: 'Product Model:',
selectProductModel: 'Please select product model',
searchMaterial: 'Search Material',
createMaterial: 'Create Material',
exportMaterial: 'Export Material',
loadingData: 'Loading data',
sequence: 'No.',
stationNumber: 'Station',
materialNumber: 'Material No.',
partName: 'Part Name',
materialQuantity: 'Quantity',
isVerification: 'Verification',
yes: 'Yes',
no: 'No',
matchRule: 'Match Rule',
matchLength: 'Match Length',
operation: 'Operation',
edit: 'Edit',
delete: 'Delete',
productModel: 'Product Model',
enterMaterialNumber: 'Please enter material number',
materialName: 'Material Name',
quantity: 'Quantity',
enterQuantity: 'Please enter quantity',
selectVerification: 'Please select verification status',
verificationRuleSetting: 'Verification Rule Setting',
rule: 'Rule',
enterMatchRule: 'Please enter match rule',
length: 'Length',
enterMatchLength: 'Please enter match length',
editMaterial: 'Edit Material',
version: 'Version',
selectVersion: 'Please select version',
materialImport: 'Material Import',
confirmImport: 'Confirm Import',
dataCopy: 'Data Copy',
enterMaterialNameRequired: 'Please enter material name',
selectStationNumberRequired: 'Please select station number',
enterMaterialNumberRequired: 'Please enter material number',
selectEngineTypeRequired: 'Please select model',
enterQuantityRequired: 'Please enter quantity',
selectVerificationRequired: 'Please select verification status',
selectMaterialVersionRequired: 'Please select material version',
enterVerificationLengthRequired: 'Please enter verification length',
enterVerificationOrderRequired: 'Please enter verification order',
enterVerificationRuleRequired: 'Please enter verification rule',
enterPartNameRequired: 'Please enter part name',
materialAddSuccess: 'Material added successfully!',
materialAddFailed: 'Failed to add material!',
noDataToCopy: 'No data available to copy!',
addSuccess: 'Added successfully',
prompt: 'Prompt',
confirmDelete: 'This action will permanently delete this row. Continue?',
deleteSuccess: 'Deleted successfully',
deleteFailed: 'Delete failed',
deleteCanceled: 'Deletion canceled',
editSuccess: 'Updated successfully',
editFailed: 'Update failed!',
contentEmpty: 'Content is empty',
materialDictionaryUpdated: 'Material dictionary updated successfully',
materialNumberRequired: 'Material number cannot be empty',
partDrawingRequired: 'Part drawing number cannot be empty',
confirmImportFile: 'Please check whether the import file is correct',
importCompleted: 'Import completed',
importFailedCount: 'Import failed count: {count}. Please check whether the file is correct',
importDataErrorFile: 'Import data error. Please check whether the import file is correct',
importFailedSuffix: '{value} import failed',
importSuccessSuffix: '{value} import succeeded',
importDataError: 'Import data error',
noData: 'No data',
importSuccess: 'Import succeeded!',
importFailed: 'Import failed!'
},
menu: {
'主页': 'Home',
'菜单管理': 'Menus',

View File

@@ -309,6 +309,184 @@ export default {
selectOrder: '请选择订单!',
confirmCompleteOrder: '确定要提前完工订单:{orderNo}吗?'
},
recipeManagement: {
productModelLabel: '产品型号:',
productModel: '产品型号',
search: '查询',
loadingData: '数据加载中',
productModelCode: '产品型号代码',
largeModel: '大机型',
add: '增加',
edit: '编辑',
partType: '零件类型',
partTypeSign: '零件类型标志',
partTypeName: '零件类型名称',
pleaseEnter: '请输入',
pleaseSelect: '请选择',
addSuccess: '增加成功',
addFailedDuplicate: '增加失败,重复!',
prompt: '提示',
confirmDelete: '此操作将永久删除该行, 是否继续?',
deleteSuccess: '删除成功',
deleteFailed: '删除失败!',
deleteCanceled: '已取消删除',
editSuccess: '修改成功',
editFailedDuplicate: '修改失败!重复'
},
assemblyQualitydataQuery: {
stationNumberLabel: '工位号:',
selectStationNumber: '请选择工位号',
orderNumberLabel: '订单号:',
orderNumber: '订单号',
productModelLabel: '产品型号:',
selectProductModel: '请选择产品型号',
productionTimeLabel: '生产时间:',
startDate: '开始日期',
endDate: '结束日期',
dateRangeSeparator: '',
search: '查询',
loadingData: '数据加载中',
sequence: '序号',
stationNumber: '工位号',
productNumber: '产品编号',
productModel: '产品型号',
measuringPosition: '测量位置',
measuringProject: '测量项目',
measuringValue: '测量值',
measuringUnit: '测量单位',
upperLimit: '值上限',
lowerLimit: '值下限',
productionDate: '生产日期',
qualifiedFlag: '合格标志',
qualified: '合格',
unqualified: '不合格',
all: '全部',
noData: '暂无数据'
},
inquiryTransitInformation: {
stationNumberLabel: '工位号:',
stationNumber: '工位号',
orderNumberLabel: '订单号:',
orderNumber: '订单号',
productModelLabel: '产品型号:',
selectProductModel: '请选择产品型号',
productionTimeLabel: '生产时间:',
startDate: '开始日期',
endDate: '结束日期',
dateRangeSeparator: '',
search: '查询',
loadingData: '数据加载中',
sequence: '序号',
productNumber: '产品编号',
productModel: '产品型号',
arrivalTime: '到达时间',
departureTime: '离开时间',
onlineTimeSeconds: '在线时间(s)',
isQualified: '是否合格',
noData: '暂无数据'
},
materialDataQuery: {
stationNumberLabel: '工位号:',
selectStationNumber: '请选择工位号',
orderNumberLabel: '订单号:',
orderNumber: '订单号',
productModelLabel: '产品型号:',
selectProductModel: '请选择产品型号',
materialBarcodeLabel: '物料条码:',
enterMaterialBarcode: '请输入物料条码',
productionTimeLabel: '生产时间:',
startDate: '开始日期',
endDate: '结束日期',
dateRangeSeparator: '',
search: '查询',
loadingData: '数据加载中',
sequence: '序号',
stationNumber: '工位号',
productNumber: '产品编号',
productModel: '产品型号',
materialNumber: '物料号',
partQuantity: '零件数量',
partName: '零件名称',
materialBarcode: '物料条码',
operationTime: '操作时间',
noData: '暂无数据'
},
materialVerificationMaintenance: {
stationNumberLabel: '工位号:',
selectStationNumber: '请选择工位号',
productModelLabel: '产品型号:',
selectProductModel: '请选择产品型号',
searchMaterial: '查询物料',
createMaterial: '创建物料',
exportMaterial: '物料导出',
loadingData: '数据加载中',
sequence: '序号',
stationNumber: '工位号',
materialNumber: '物料号',
partName: '零件名称',
materialQuantity: '物料数量',
isVerification: '是否验证',
yes: '是',
no: '否',
matchRule: '匹配规则',
matchLength: '匹配长度',
operation: '操作',
edit: '修改',
delete: '删除',
productModel: '产品型号',
enterMaterialNumber: '请输入物料号',
materialName: '物料名称',
quantity: '数量',
enterQuantity: '请输入数量',
selectVerification: '请选择是否验证',
verificationRuleSetting: '验证规则设定',
rule: '规则',
enterMatchRule: '请输入匹配规则',
length: '长度',
enterMatchLength: '请输入匹配长度',
editMaterial: '编辑物料',
version: '版本号',
selectVersion: '请选择版本号',
materialImport: '物料导入',
confirmImport: '确认导入',
dataCopy: '数据复制',
enterMaterialNameRequired: '请输入物料名称',
selectStationNumberRequired: '请选择工位号',
enterMaterialNumberRequired: '请输入物料号',
selectEngineTypeRequired: '请选择机型',
enterQuantityRequired: '请输入数量',
selectVerificationRequired: '请选择是否验证',
selectMaterialVersionRequired: '请选择物料版本',
enterVerificationLengthRequired: '请输入验证长度',
enterVerificationOrderRequired: '请输入验证顺序',
enterVerificationRuleRequired: '请输入验证规则',
enterPartNameRequired: '请输入零件名称',
materialAddSuccess: '物料增加成功!',
materialAddFailed: '物料增加失败!',
noDataToCopy: '暂无可复制的数据!',
addSuccess: '增加成功',
prompt: '提示',
confirmDelete: '此操作将永久删除该行, 是否继续?',
deleteSuccess: '删除成功',
deleteFailed: '删除失败',
deleteCanceled: '已取消删除',
editSuccess: '修改成功',
editFailed: '修改失败!',
contentEmpty: '内容为空',
materialDictionaryUpdated: '物料字典信息更新成功',
materialNumberRequired: '物料号不能为空',
partDrawingRequired: '零件图号不能为空',
confirmImportFile: '请确认导入文件是否正确',
importCompleted: '导入完成',
importFailedCount: '导入失败物料个数为{count},请检查文件是否正确',
importDataErrorFile: '导入数据错误,请检查导入文件是否正确',
importFailedSuffix: '{value}导入失败',
importSuccessSuffix: '{value}导入成功',
importDataError: '导入数据错误',
noData: '暂无数据',
importSuccess: '导入成功!',
importFailed: '导入失败!'
},
menu: {
'主页': '主页',
'菜单管理': '菜单管理',

View File

@@ -2,8 +2,8 @@
<div class="app-container">
<el-card class="topCard">
<div class="topDiv">
<span style="margin-left: 10px">工位号</span>
<el-select v-model="stationNumberValue" clearable placeholder="请选择工位号" size="small" style="width: 250px" @change="searchOrder">
<span style="margin-left: 10px">{{ $t('materialVerificationMaintenance.stationNumberLabel') }}</span>
<el-select v-model="stationNumberValue" clearable :placeholder="$t('materialVerificationMaintenance.selectStationNumber')" size="small" style="width: 250px" @change="searchOrder">
<el-option
v-for="item in stationNumber"
:key="item.value"
@@ -11,8 +11,8 @@
:value="item.value"
size="mini"/>
</el-select>
<span style="margin-left: 10px">产品型号</span>
<el-select v-model="engineTypeValue" placeholder="请选择产品型号" size="small" style="width: 150px" @change="searchOrder">
<span style="margin-left: 10px">{{ $t('materialVerificationMaintenance.productModelLabel') }}</span>
<el-select v-model="engineTypeValue" :placeholder="$t('materialVerificationMaintenance.selectProductModel')" size="small" style="width: 150px" @change="searchOrder">
<el-option
v-for="item in engineType"
:key="item.value"
@@ -40,11 +40,11 @@
<!-- :value="item.value"-->
<!-- size="mini"/>-->
<!-- </el-select>-->
<el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 10px" @click="searchOrder()">查询物料</el-button>
<el-button type="primary" size="small" icon="el-icon-circle-plus" @click="creatOrder('form')">创建物料</el-button>
<el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 10px" @click="searchOrder()">{{ $t('materialVerificationMaintenance.searchMaterial') }}</el-button>
<el-button type="primary" size="small" icon="el-icon-circle-plus" @click="creatOrder('form')">{{ $t('materialVerificationMaintenance.createMaterial') }}</el-button>
<!-- <el-button type="success" size="small" plain icon="el-icon-document-copy" @click="copyOrder('form4')">复制物料</el-button>-->
<!-- <el-button type="info" plain size="small" icon="el-icon-upload2" @click="importOrder('form')">物料导入</el-button>-->
<el-button type="warning" plain size="small" icon="el-icon-download" @click="exportExcel()">物料导出</el-button>
<el-button type="warning" plain size="small" icon="el-icon-download" @click="exportExcel()">{{ $t('materialVerificationMaintenance.exportMaterial') }}</el-button>
</div>
<el-table
v-loading="loading"
@@ -52,7 +52,7 @@
:data="tableData"
:header-cell-style="{background:'#eef1f6',color:'#606266'}"
:cell-class-name="tableRowClassName"
element-loading-text="数据加载中"
:element-loading-text="$t('materialVerificationMaintenance.loadingData')"
element-loading-spinner="el-icon-loading"
element-loading-background="rgba(0, 0, 0, 0.2)"
class="main"
@@ -62,13 +62,13 @@
border
size="mini"
@selection-change="handleSelectionChange">
<el-table-column type="index" width="60" label="序号" align="center"/>
<el-table-column type="index" width="60" :label="$t('materialVerificationMaintenance.sequence')" align="center"/>
<!-- <el-table-column align="center" label="物料号">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.物料号 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column align="center" label="工位号" width="100px">
<el-table-column align="center" :label="$t('materialVerificationMaintenance.stationNumber')" width="100px">
<template slot-scope="scope">
{{ scope.row.工位号 }}
</template>
@@ -78,7 +78,7 @@
<!-- {{ scope.row.版本号 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column align="center" label="物料号" width="150px">
<el-table-column align="center" :label="$t('materialVerificationMaintenance.materialNumber')" width="150px">
<template slot-scope="scope">
{{ scope.row.物料号 }}
</template>
@@ -88,19 +88,19 @@
<!-- {{ scope.row.零件图号 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column align="center" label="零件名称" min-width="120px">
<el-table-column align="center" :label="$t('materialVerificationMaintenance.partName')" min-width="120px">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="物料数量" width="100px">
<el-table-column align="center" :label="$t('materialVerificationMaintenance.materialQuantity')" width="100px">
<template slot-scope="scope">
{{ scope.row.零件数量 }}
</template>
</el-table-column>
<el-table-column align="center" label="是否验证" width="100px">
<el-table-column align="center" :label="$t('materialVerificationMaintenance.isVerification')" width="100px">
<template slot-scope="scope">
<el-tag v-if="Number(scope.row.是否验证) === 1" size="mini" type="success"></el-tag>
<el-tag v-if="Number(scope.row.是否验证) === 1" size="mini" type="success">{{ $t('materialVerificationMaintenance.yes') }}</el-tag>
<span v-else>&nbsp;</span>
</template>
</el-table-column>
@@ -110,12 +110,12 @@
<!-- <span v-else>&nbsp;</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column align="center" label="匹配规则" width="150px">
<el-table-column align="center" :label="$t('materialVerificationMaintenance.matchRule')" width="150px">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column align="center" label="匹配长度" width="100px">
<el-table-column align="center" :label="$t('materialVerificationMaintenance.matchLength')" width="120px">
<template slot-scope="scope">
<span v-if="Number(scope.row.是否验证) === 1">{{ scope.row.条码长度 }}</span>
<span v-else>&nbsp;</span>
@@ -133,29 +133,29 @@
<!-- <span v-if="Number(scope.row.是否主物料) === 0"></span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column align="center" label="操作" width="150">
<el-table-column align="center" :label="$t('materialVerificationMaintenance.operation')" width="150">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleEdit(scope.row)">修改</el-button>
@click="handleEdit(scope.row)">{{ $t('materialVerificationMaintenance.edit') }}</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
style="color:#ff0000;"
@click="deleteOrder(scope.row)">删除</el-button>
@click="deleteOrder(scope.row)">{{ $t('materialVerificationMaintenance.delete') }}</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible" title="创建物料" center style="min-height: 200px;" width="800px">
<el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="80px">
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible" :title="$t('materialVerificationMaintenance.createMaterial')" center style="min-height: 200px;" width="800px">
<el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="120px">
<el-row>
<el-col :span="12">
<el-form-item label="工位号" prop="stationNumberValue" style="display: inline-block">
<el-select v-model="form.stationNumberValue" size="small" placeholder="请选择工位号">
<el-form-item :label="$t('materialVerificationMaintenance.stationNumber')" prop="stationNumberValue" style="display: inline-block">
<el-select v-model="form.stationNumberValue" size="small" :placeholder="$t('materialVerificationMaintenance.selectStationNumber')">
<el-option
v-for="item in stationNumber"
:key="item.value"
@@ -165,8 +165,8 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="产品型号" prop="engineTypeValue" style="display: inline-block">
<el-select v-model="form.engineTypeValue" size="small" placeholder="请选择产品型号">
<el-form-item :label="$t('materialVerificationMaintenance.productModel')" prop="engineTypeValue" style="display: inline-block">
<el-select v-model="form.engineTypeValue" size="small" :placeholder="$t('materialVerificationMaintenance.selectProductModel')">
<el-option
v-for="item in engineType1"
:key="item.value"
@@ -178,38 +178,38 @@
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="物料号" prop="orderNumber" style="display: inline-block">
<el-form-item :label="$t('materialVerificationMaintenance.materialNumber')" prop="orderNumber" style="display: inline-block">
<el-input
v-model="form.orderNumber"
clearable
size="small"
placeholder="请输入物料号"/>
:placeholder="$t('materialVerificationMaintenance.enterMaterialNumber')"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="物料名称" prop="partName" style="display: inline-block">
<el-form-item :label="$t('materialVerificationMaintenance.materialName')" prop="partName" style="display: inline-block">
<el-input
v-model="form.partName"
clearable
size="small"
placeholder="物料名称"/>
:placeholder="$t('materialVerificationMaintenance.materialName')"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="数量" prop="number" style="display: inline-block">
<el-form-item :label="$t('materialVerificationMaintenance.quantity')" prop="number" style="display: inline-block">
<el-input-number
v-model="form.number"
:min="1"
:step="1"
size="small"
placeholder="请输入数量"/>
:placeholder="$t('materialVerificationMaintenance.enterQuantity')"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否验证" prop="verificationValue" style="display: inline-block">
<el-select v-model="form.verificationValue" size="small" placeholder="请选择产品型号" @change="changeIsVerification">
<el-form-item :label="$t('materialVerificationMaintenance.isVerification')" prop="verificationValue" style="display: inline-block">
<el-select v-model="form.verificationValue" size="small" :placeholder="$t('materialVerificationMaintenance.selectVerification')" @change="changeIsVerification">
<el-option
v-for="item in verification"
:key="item.value"
@@ -245,26 +245,26 @@
<!-- </el-col>-->
<!-- </el-row>-->
<el-row v-if="form.verificationValue === 1" style="margin: 10px 0">
<el-divider>验证规则设定</el-divider>
<el-divider>{{ $t('materialVerificationMaintenance.verificationRuleSetting') }}</el-divider>
</el-row>
<el-row v-if="form.verificationValue === 1">
<el-col :span="10">
<el-form-item label="规则" prop="verificationCode" style="display: inline-block">
<el-form-item :label="$t('materialVerificationMaintenance.rule')" prop="verificationCode" style="display: inline-block">
<el-input
v-model="form.verificationCode"
clearable
size="small"
placeholder="请输入匹配规则"/>
:placeholder="$t('materialVerificationMaintenance.enterMatchRule')"/>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="长度" prop="verificationLength" style="display: inline-block">
<el-form-item :label="$t('materialVerificationMaintenance.length')" prop="verificationLength" style="display: inline-block">
<el-input-number
v-model="form.verificationLength"
:min="1"
:step="1"
size="small"
placeholder="请输入匹配长度"/>
:placeholder="$t('materialVerificationMaintenance.enterMatchLength')"/>
</el-form-item>
</el-col>
<!-- <el-col :span="7">
@@ -280,12 +280,12 @@
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="callOff('form')">取消</el-button>
<el-button type="primary" size="small" @click="submitAdd('form')">确定</el-button>
<el-button size="small" @click="callOff('form')">{{ $t('common.cancel') }}</el-button>
<el-button type="primary" size="small" @click="submitAdd('form')">{{ $t('common.confirm') }}</el-button>
</div>
</el-dialog>
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible1" title="编辑物料" center style="min-height: 200px;" width="800px">
<el-form ref="form" :model="form1" :rules="rules1" label-position="right" label-width="80px">
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible1" :title="$t('materialVerificationMaintenance.editMaterial')" center style="min-height: 200px;" width="800px">
<el-form ref="form" :model="form1" :rules="rules1" label-position="right" label-width="120px">
<!-- <el-row>-->
<!-- <el-col :span="12">-->
<!-- <el-form-item label="工位号" prop="stationNumberValue" style="display: inline-block">-->
@@ -308,49 +308,49 @@
<!-- </el-row>-->
<el-row>
<el-col :span="12">
<el-form-item label="物料号" prop="orderNumber" style="display: inline-block">
<el-form-item :label="$t('materialVerificationMaintenance.materialNumber')" prop="orderNumber" style="display: inline-block">
<el-input
v-model="form1.orderNumber"
readonly
size="small"
placeholder="请输入物料号"/>
:placeholder="$t('materialVerificationMaintenance.enterMaterialNumber')"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="版本号" prop="version" style="display: inline-block">
<el-form-item :label="$t('materialVerificationMaintenance.version')" prop="version" style="display: inline-block">
<el-input
v-model="form1.version"
readonly
size="small"
placeholder="请选择版本号"/>
:placeholder="$t('materialVerificationMaintenance.selectVersion')"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="物料名称" prop="partName" style="display: inline-block">
<el-form-item :label="$t('materialVerificationMaintenance.materialName')" prop="partName" style="display: inline-block">
<el-input
v-model="form1.partName"
clearable
size="small"
placeholder="物料名称"/>
:placeholder="$t('materialVerificationMaintenance.materialName')"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="数量" prop="number" style="display: inline-block">
<el-form-item :label="$t('materialVerificationMaintenance.quantity')" prop="number" style="display: inline-block">
<el-input-number
v-model="form1.number"
:min="1"
:step="1"
size="small"
placeholder="请输入数量"/>
:placeholder="$t('materialVerificationMaintenance.enterQuantity')"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="是否验证" prop="verificationValue" style="display: inline-block">
<el-select v-model="form1.verificationValue" size="small" placeholder="请选择产品型号">
<el-form-item :label="$t('materialVerificationMaintenance.isVerification')" prop="verificationValue" style="display: inline-block">
<el-select v-model="form1.verificationValue" size="small" :placeholder="$t('materialVerificationMaintenance.selectVerification')">
<el-option
v-for="item in verification"
:key="item.value"
@@ -372,26 +372,26 @@
</el-col>
</el-row>
<el-row v-if="form1.verificationValue === 1" style="margin: 10px 0">
<el-divider>验证规则设定</el-divider>
<el-divider>{{ $t('materialVerificationMaintenance.verificationRuleSetting') }}</el-divider>
</el-row>
<el-row v-if="form1.verificationValue === 1">
<el-col :span="10">
<el-form-item label="规则" prop="verificationCode" style="display: inline-block">
<el-form-item :label="$t('materialVerificationMaintenance.rule')" prop="verificationCode" style="display: inline-block">
<el-input
v-model="form1.verificationCode"
clearable
size="small"
placeholder="请输入匹配规则"/>
:placeholder="$t('materialVerificationMaintenance.enterMatchRule')"/>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="长度" prop="verificationLength" style="display: inline-block">
<el-form-item :label="$t('materialVerificationMaintenance.length')" prop="verificationLength" style="display: inline-block">
<el-input-number
v-model="form1.verificationLength"
:min="1"
:step="1"
size="small"
placeholder="请输入匹配长度"/>
:placeholder="$t('materialVerificationMaintenance.enterMatchLength')"/>
</el-form-item>
</el-col>
<!-- <el-col :span="7">
@@ -407,11 +407,11 @@
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="callOff1('form')">取消</el-button>
<el-button type="primary" size="small" @click="submitAdd1('form')">确定</el-button>
<el-button size="small" @click="callOff1('form')">{{ $t('common.cancel') }}</el-button>
<el-button type="primary" size="small" @click="submitAdd1('form')">{{ $t('common.confirm') }}</el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogFormVisible3" title="物料导入" center style="min-height: 200px" width="1000px">
<el-dialog :visible.sync="dialogFormVisible3" :title="$t('materialVerificationMaintenance.materialImport')" center style="min-height: 200px" width="1000px">
<div class="app-container">
<upload-excel-component :on-success="handleSuccess" :before-upload="beforeUpload" />
<div style="margin-top: 5px">
@@ -420,50 +420,50 @@
ref="multipleTable"
:data="tableDataListAll"
:header-cell-style="{ background: '#F5F5F5', fontSize: '16px' }"
element-loading-text="数据加载中"
:element-loading-text="$t('materialVerificationMaintenance.loadingData')"
element-loading-spinner="el-icon-loading"
element-loading-background="rgba(0, 0, 0, 0.2)"
height="300px"
style="width: 100%"
border
>
<el-table-column type="index" width="60" label="序号" align="center"/>
<el-table-column align="center" label="工位号" width="80px">
<el-table-column type="index" width="60" :label="$t('materialVerificationMaintenance.sequence')" align="center"/>
<el-table-column align="center" :label="$t('materialVerificationMaintenance.stationNumber')" width="80px">
<template slot-scope="scope">
{{ scope.row.工位号 }}
</template>
</el-table-column>
<el-table-column align="center" label="产品型号" width="80px">
<el-table-column align="center" :label="$t('materialVerificationMaintenance.productModel')" width="80px">
<template slot-scope="scope">
{{ scope.row.产品型号 }}
</template>
</el-table-column>
<el-table-column align="center" label="物料号" width="120px">
<el-table-column align="center" :label="$t('materialVerificationMaintenance.materialNumber')" width="120px">
<template slot-scope="scope">
{{ scope.row.物料号 }}
</template>
</el-table-column>
<el-table-column align="center" label="零件名称" min-width="120px">
<el-table-column align="center" :label="$t('materialVerificationMaintenance.partName')" min-width="120px">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="物料数量" width="80px">
<el-table-column align="center" :label="$t('materialVerificationMaintenance.materialQuantity')" width="80px">
<template slot-scope="scope">
{{ scope.row.零件数量 }}
</template>
</el-table-column>
<el-table-column align="center" label="是否验证" width="80px">
<el-table-column align="center" :label="$t('materialVerificationMaintenance.isVerification')" width="80px">
<template slot-scope="scope">
{{ scope.row.是否验证 }}
</template>
</el-table-column>
<el-table-column align="center" label="匹配规则" width="120px">
<el-table-column align="center" :label="$t('materialVerificationMaintenance.matchRule')" width="120px">
<template slot-scope="scope">
{{ scope.row.匹配规则 }}
</template>
</el-table-column>
<el-table-column align="center" label="匹配长度" width="80px">
<el-table-column align="center" :label="$t('materialVerificationMaintenance.matchLength')" width="80px">
<template slot-scope="scope">
{{ scope.row.条码长度 }}
</template>
@@ -476,16 +476,16 @@
</el-table>
</div>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="materialAddAllCancel()">取消</el-button>
<el-button type="primary" icon="el-icon-upload" size="small" @click="materialAddAllSubmit()">确认导入</el-button>
<el-button size="small" @click="materialAddAllCancel()">{{ $t('common.cancel') }}</el-button>
<el-button type="primary" icon="el-icon-upload" size="small" @click="materialAddAllSubmit()">{{ $t('materialVerificationMaintenance.confirmImport') }}</el-button>
</div>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogFormVisible4" title="数据复制" center style="min-height: 200px" width="400px">
<el-dialog :visible.sync="dialogFormVisible4" :title="$t('materialVerificationMaintenance.dataCopy')" center style="min-height: 200px" width="400px">
<el-form ref="form1" :model="form4" :rules="rules4" label-position="right" label-width="110px">
<el-form-item label="产品型号" prop="engineTypeValue" style="display: inline-block">
<el-select v-model="form4.engineTypeValue" placeholder="请选择产品型号" size="small">
<el-form-item :label="$t('materialVerificationMaintenance.productModel')" prop="engineTypeValue" style="display: inline-block">
<el-select v-model="form4.engineTypeValue" :placeholder="$t('materialVerificationMaintenance.selectProductModel')" size="small">
<el-option
v-for="item in engineType"
:key="item.value"
@@ -496,8 +496,8 @@
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="callOff4()">取消</el-button>
<el-button type="primary" size="small" @click="submitAdd4()">确定</el-button>
<el-button size="small" @click="callOff4()">{{ $t('common.cancel') }}</el-button>
<el-button type="primary" size="small" @click="submitAdd4()">{{ $t('common.confirm') }}</el-button>
</div>
</el-dialog>
</div>
@@ -538,24 +538,8 @@ export default {
OKWarehouse: [],
NGWarehouseValue: '',
NGWarehouse: [],
verification: [
{
label: '否',
value: 0
}, {
label: '是',
value: 1
}
],
mainMaterial: [
{
label: '否',
value: 0
}, {
label: '是',
value: 1
}
],
verification: [],
mainMaterial: [],
form: { // 创建订单
partName: '',
stationNumberValue: '',
@@ -572,21 +556,7 @@ export default {
mainMaterialValue: 0,
batchValue: 0
},
rules: { // 创建订单验证
partName: [{ required: true, message: '请输入物料名称', trigger: 'blur' }],
stationNumberValue: [{ required: true, message: '请选择工位号', trigger: 'change' }],
orderNumber: [{ required: true, message: '请输入物料号', trigger: 'blur' }],
engineTypeValue: [{ required: true, message: '请选择机型', trigger: 'blur' }],
// partDrawing: [{ required: true, message: '请输入零件图号', trigger: 'blur' }],
number: [{ required: true, message: '请输入数量', trigger: 'blur' }],
// manufactor: [{ required: true, message: '请输入生产厂家', trigger: 'blur' }],
verificationValue: [{ required: true, message: '请选择是否验证', trigger: 'change' }],
version: [{ required: true, message: '请选择物料版本', trigger: 'change' }],
verificationLength: [{ required: true, message: '请输入验证长度', trigger: 'blur' }],
verificationOrder: [{ required: true, message: '请输入验证顺序', trigger: 'blur' }],
verificationCode: [{ required: true, message: '请输入验证规则', trigger: 'blur' }]
// mainMaterialValue: [{ required: true, message: '请选择是否主物料', trigger: 'change' }]
},
rules: {},
form1: { // 修改订单
partName: '',
stationNumberValue: '',
@@ -604,19 +574,7 @@ export default {
batchValue: 0,
ID: ''
},
rules1: { // 修改订单验证
partName: [{ required: true, message: '请输入零件名称', trigger: 'blur' }],
// orderNumber: [{ required: true, message: '请输入物料号', trigger: 'blur' }],
// partDrawing: [{ required: true, message: '请输入零件图号', trigger: 'blur' }],
number: [{ required: true, message: '请输入数量', trigger: 'blur' }],
// manufactor: [{ required: true, message: '请输入生产厂家', trigger: 'blur' }],
verificationValue: [{ required: true, message: '请选择是否验证', trigger: 'change' }],
verificationLength: [{ required: true, message: '请输入验证长度', trigger: 'blur' }],
verificationOrder: [{ required: true, message: '请输入验证顺序', trigger: 'blur' }],
verificationCode: [{ required: true, message: '请输入验证规则', trigger: 'blur' }]
// stationNumberValue: [{ required: true, message: '请选择工位号', trigger: 'change' }]
// mainMaterialValue: [{ required: true, message: '请选择是否主物料', trigger: 'change' }]
},
rules1: {},
form2: { // 订单下发
planQuantity: '',
orderNumber: '',
@@ -627,9 +585,7 @@ export default {
form4: {
engineTypeValue: ''
},
rules4: { // 订单下发验证
engineTypeValue: [{ required: true, message: '请选择机型', trigger: 'blur' }]
},
rules4: {},
// planTime: [new Date(new Date().getTime() - 3600 * 1000 * 24 * 3000), new Date(new Date().getTime())],
planTime: [],
tableDataListAll: [],
@@ -648,8 +604,12 @@ export default {
}
},
watch: {
'$i18n.locale'() {
this.initI18nState()
}
},
created() {
this.initI18nState()
this.getStationNumber()
this.getEndStation()
this.getVersion()
@@ -658,6 +618,49 @@ export default {
}, 1000)
},
methods: {
initI18nState() {
this.verification = [
{
label: this.$t('materialVerificationMaintenance.no'),
value: 0
}, {
label: this.$t('materialVerificationMaintenance.yes'),
value: 1
}
]
this.mainMaterial = [
{
label: this.$t('materialVerificationMaintenance.no'),
value: 0
}, {
label: this.$t('materialVerificationMaintenance.yes'),
value: 1
}
]
this.rules = {
partName: [{ required: true, message: this.$t('materialVerificationMaintenance.enterMaterialNameRequired'), trigger: 'blur' }],
stationNumberValue: [{ required: true, message: this.$t('materialVerificationMaintenance.selectStationNumberRequired'), trigger: 'change' }],
orderNumber: [{ required: true, message: this.$t('materialVerificationMaintenance.enterMaterialNumberRequired'), trigger: 'blur' }],
engineTypeValue: [{ required: true, message: this.$t('materialVerificationMaintenance.selectEngineTypeRequired'), trigger: 'blur' }],
number: [{ required: true, message: this.$t('materialVerificationMaintenance.enterQuantityRequired'), trigger: 'blur' }],
verificationValue: [{ required: true, message: this.$t('materialVerificationMaintenance.selectVerificationRequired'), trigger: 'change' }],
version: [{ required: true, message: this.$t('materialVerificationMaintenance.selectMaterialVersionRequired'), trigger: 'change' }],
verificationLength: [{ required: true, message: this.$t('materialVerificationMaintenance.enterVerificationLengthRequired'), trigger: 'blur' }],
verificationOrder: [{ required: true, message: this.$t('materialVerificationMaintenance.enterVerificationOrderRequired'), trigger: 'blur' }],
verificationCode: [{ required: true, message: this.$t('materialVerificationMaintenance.enterVerificationRuleRequired'), trigger: 'blur' }]
}
this.rules1 = {
partName: [{ required: true, message: this.$t('materialVerificationMaintenance.enterPartNameRequired'), trigger: 'blur' }],
number: [{ required: true, message: this.$t('materialVerificationMaintenance.enterQuantityRequired'), trigger: 'blur' }],
verificationValue: [{ required: true, message: this.$t('materialVerificationMaintenance.selectVerificationRequired'), trigger: 'change' }],
verificationLength: [{ required: true, message: this.$t('materialVerificationMaintenance.enterVerificationLengthRequired'), trigger: 'blur' }],
verificationOrder: [{ required: true, message: this.$t('materialVerificationMaintenance.enterVerificationOrderRequired'), trigger: 'blur' }],
verificationCode: [{ required: true, message: this.$t('materialVerificationMaintenance.enterVerificationRuleRequired'), trigger: 'blur' }]
}
this.rules4 = {
engineTypeValue: [{ required: true, message: this.$t('materialVerificationMaintenance.selectEngineTypeRequired'), trigger: 'blur' }]
}
},
removeAll() {
this.worksheet = []
this.itemFile = []
@@ -803,12 +806,12 @@ export default {
this.ExecDatabase(Data).then(response => {
if (response.data[0]['result'] === '1') {
this.$message({
message: '物料增加成功!',
message: this.$t('materialVerificationMaintenance.materialAddSuccess'),
type: 'success'
})
this.searchOrder()
} else {
this.$message.error('物料增加失败!')
this.$message.error(this.$t('materialVerificationMaintenance.materialAddFailed'))
}
})
} else {
@@ -829,7 +832,7 @@ export default {
this.dialogFormVisible4 = true
} else {
this.$message({
message: '暂无可复制的数据!',
message: this.$t('materialVerificationMaintenance.noDataToCopy'),
type: 'error'
})
}
@@ -852,7 +855,7 @@ export default {
await this.submitAdd5(stationNumberValue, orderNumber, partName, partDrawing, manufactor, verificationValue, mainMaterialValue, number, batchValue)
}
this.$message({
message: '增加成功',
message: this.$t('materialVerificationMaintenance.addSuccess'),
type: 'success'
})
this.dialogFormVisible4 = false
@@ -888,9 +891,9 @@ export default {
},
// 删除订单
deleteOrder(row) {
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
this.$confirm(this.$t('materialVerificationMaintenance.confirmDelete'), this.$t('materialVerificationMaintenance.prompt'), {
confirmButtonText: this.$t('common.confirm'),
cancelButtonText: this.$t('common.cancel'),
type: 'warning'
}).then(() => {
var param = []
@@ -898,16 +901,16 @@ export default {
var Data = this.CreateData('12', '电子看板_装配零件_SPC_删除', param)
this.ExecDatabase(Data).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.$message.success(this.$t('materialVerificationMaintenance.deleteSuccess'))
this.searchOrder()
} else {
this.$message.error('删除失败')
this.$message.error(this.$t('materialVerificationMaintenance.deleteFailed'))
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
message: this.$t('materialVerificationMaintenance.deleteCanceled')
})
})
},
@@ -957,12 +960,12 @@ export default {
this.ExecDatabase(Data).then(response => {
if (response.data[0].result === '1') {
this.$message({
message: '修改成功',
message: this.$t('materialVerificationMaintenance.editSuccess'),
type: 'success'
})
this.searchOrder()
} else {
this.$message.error('修改失败!')
this.$message.error(this.$t('materialVerificationMaintenance.editFailed'))
}
})
this.dialogFormVisible1 = false
@@ -985,7 +988,7 @@ export default {
},
handleAdd() {
if (this.tableData.length === 0) {
this.$message.error('内容为空')
this.$message.error(this.$t('materialVerificationMaintenance.contentEmpty'))
} else {
var param = []
var Data = this.CreateData('11', '确认导入物料字典_新增', param)
@@ -996,7 +999,7 @@ export default {
this.notes = response.data[i].导入结果 + '、 ' + this.notes
}
this.$message({
message: '物料字典信息更新成功',
message: this.$t('materialVerificationMaintenance.materialDictionaryUpdated'),
type: 'warning'
})
this.isShow = true
@@ -1004,7 +1007,7 @@ export default {
} else {
this.tableData = []
this.$message({
message: '物料字典信息更新成功',
message: this.$t('materialVerificationMaintenance.materialDictionaryUpdated'),
type: 'success'
})
}
@@ -1077,10 +1080,10 @@ export default {
!manufactor && !engineTypeValue && !verificationValue && !mainMaterialValue && !isPreservation && !orderNumber) {
break
} else if (!orderNumber) { // 名称不能为空
this.$notify.error(`物料号不能为空`)
this.$notify.error(this.$t('materialVerificationMaintenance.materialNumberRequired'))
break
} else if (Number(partDrawing) <= 0) { // 数量不能为0
this.$notify.error(`零件图号不能为空`)
this.$notify.error(this.$t('materialVerificationMaintenance.partDrawingRequired'))
break
} else {
if (orderNumber) {
@@ -1100,21 +1103,21 @@ export default {
} else {
this.loading = false
this.disabled = false
this.$notify.error(`请确认导入文件是否正确`)
this.$notify.error(this.$t('materialVerificationMaintenance.confirmImportFile'))
return
}
}
}
this.itemFile.splice(j, 1)
this.worksheet.splice(j, 1)
this.err === 0 ? this.$message.success(`导入完成`) : this.$message.error(`导入失败物料个数为${this.err},请检查文件是否正确`)
this.err === 0 ? this.$message.success(this.$t('materialVerificationMaintenance.importCompleted')) : this.$message.error(this.$t('materialVerificationMaintenance.importFailedCount', { count: this.err }))
}
this.loading = false
this.searchOrder()
} catch (e) {
this.err++
this.loading = false
this.$notify.error(`导入数据错误,请检查导入文件是否正确`)
this.$notify.error(this.$t('materialVerificationMaintenance.importDataErrorFile'))
console.log(`导入数据错误${e}`)
}
},
@@ -1149,13 +1152,13 @@ export default {
const response = await this.ExecDatabase(Data)
const res = response.data
if (res[0].result === '0') {
this.$notify.error(`${orderNumber}导入失败`)
this.$notify.error(this.$t('materialVerificationMaintenance.importFailedSuffix', { value: orderNumber }))
} else {
this.$notify.error(`${orderNumber}导入成功`)
this.$notify.error(this.$t('materialVerificationMaintenance.importSuccessSuffix', { value: orderNumber }))
}
} catch (e) {
this.err++
this.$message.error(`导入数据错误`)
this.$message.error(this.$t('materialVerificationMaintenance.importDataError'))
console.log(`导入数据错误${e}`)
}
},
@@ -1167,7 +1170,7 @@ export default {
var Data = this.CreateData('2001', '电子看板_装配零件_总物料表_导出新', param)
this.exportExcel_NPOI(Data)
} else {
this.$message.warning('暂无数据')
this.$message.warning(this.$t('materialVerificationMaintenance.noData'))
}
},
beforeUpload(file) {
@@ -1193,21 +1196,21 @@ export default {
},
materialAddAllSubmit() {
if (this.tableDataListAll.length === 0) {
this.$message.error('内容为空')
this.$message.error(this.$t('materialVerificationMaintenance.contentEmpty'))
} else {
var param = []
var Data = this.CreateData('12', '电子看板_装配零件_物料BOM_导入临时表_确认导入', param)
this.ExecDatabase(Data).then(response => {
if (response.data.length > 0) {
if (response.data[0]['result'] === '1') {
this.$message.success('导入成功!')
this.$message.success(this.$t('materialVerificationMaintenance.importSuccess'))
this.dialogFormVisible3 = false
this.searchOrder()
} else {
this.$message.error('导入失败!')
this.$message.error(this.$t('materialVerificationMaintenance.importFailed'))
}
} else {
this.$message.error('导入失败!')
this.$message.error(this.$t('materialVerificationMaintenance.importFailed'))
}
})
}

View File

@@ -7,10 +7,10 @@
<!--<el-input v-model="workCode" placeholder="制造编号" clearable size="small" style="width: 200px; margin-left: 13px"/>-->
<!--<span style="margin-left: 10px">项目名称</span>-->
<!--<el-input v-model="projectName" placeholder="项目名称" clearable size="small" style="width: 200px; margin-left: 13px"/>-->
<span style="margin-left: 10px">工位号</span>
<span style="margin-left: 10px">{{ $t('assemblyQualitydataQuery.stationNumberLabel') }}</span>
<el-select
v-model="stationNumberValue"
placeholder="请选择工位号"
:placeholder="$t('assemblyQualitydataQuery.selectStationNumber')"
filterable
clearable
size="small"
@@ -22,10 +22,10 @@
:value="item.value"
size="mini"/>
</el-select>
<span style="margin-left: 10px">订单号</span>
<el-input v-model="orderNumberValue" placeholder="订单号" clearable size="small" style="width: 150px; "/>
<span style="margin-left: 10px">产品型号</span>
<el-select v-model="engineTypeValue" placeholder="请选择产品型号" filterable clearable size="small" style="width: 150px">
<span style="margin-left: 10px">{{ $t('assemblyQualitydataQuery.orderNumberLabel') }}</span>
<el-input v-model="orderNumberValue" :placeholder="$t('assemblyQualitydataQuery.orderNumber')" clearable size="small" style="width: 150px; "/>
<span style="margin-left: 10px">{{ $t('assemblyQualitydataQuery.productModelLabel') }}</span>
<el-select v-model="engineTypeValue" :placeholder="$t('assemblyQualitydataQuery.selectProductModel')" filterable clearable size="small" style="width: 150px">
<el-option
v-for="item in engineType"
:key="item.value"
@@ -33,16 +33,16 @@
:value="item.value"
size="mini"/>
</el-select>
<span style="margin-left: 10px">生产时间</span>
<span style="margin-left: 10px">{{ $t('assemblyQualitydataQuery.productionTimeLabel') }}</span>
<el-date-picker
v-model="dateTime"
:clearable="false"
align="center"
end-placeholder="结束日期"
:end-placeholder="$t('assemblyQualitydataQuery.endDate')"
format="yyyy-MM-dd"
range-separator=""
:range-separator="$t('assemblyQualitydataQuery.dateRangeSeparator')"
size="small"
start-placeholder="开始日期"
:start-placeholder="$t('assemblyQualitydataQuery.startDate')"
style="width: 240px;"
type="daterange"
value-format="yyyy-MM-dd"/>
@@ -78,7 +78,7 @@
<!-- :value="item.value"-->
<!-- size="mini"/>-->
<!-- </el-select>-->
<el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 5px" @click="pageCurrent=1;selectDate()">查询</el-button>
<el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 5px" @click="pageCurrent=1;selectDate()">{{ $t('assemblyQualitydataQuery.search') }}</el-button>
<el-button type="info" size="small" icon="el-icon-download" style="margin-left: 5px" @click="exportExcel()">Excel</el-button>
</div>
<div style="margin-top: 10px">
@@ -129,7 +129,7 @@
:data="tableData"
:header-cell-style="{background:'#eef1f6',color:'#606266'}"
:cell-class-name="tableRowClassName"
element-loading-text="数据加载中"
:element-loading-text="$t('assemblyQualitydataQuery.loadingData')"
element-loading-spinner="el-icon-loading"
element-loading-background="rgba(0, 0, 0, 0.2)"
class="main"
@@ -139,24 +139,24 @@
border
size="mini">
<!-- <el-table-column :selectable="selectable" type="selection" width="45" align="center"/>-->
<el-table-column type="index" width="60" label="序号" align="center"/>
<el-table-column align="center" label="订单号">
<el-table-column type="index" width="60" :label="$t('assemblyQualitydataQuery.sequence')" align="center"/>
<el-table-column align="center" :label="$t('assemblyQualitydataQuery.orderNumber')">
<template slot-scope="scope">
{{ scope.row.订单号 }}
</template>
</el-table-column>
<el-table-column align="center" width="100px" label="工位号">
<el-table-column align="center" width="100px" :label="$t('assemblyQualitydataQuery.stationNumber')">
<template slot-scope="scope">
{{ scope.row.工位号 }}
</template>
</el-table-column>
<el-table-column align="center" label="产品编号">
<el-table-column align="center" :label="$t('assemblyQualitydataQuery.productNumber')">
<template slot-scope="scope">
{{ scope.row.发动机号 }}
</template>
</el-table-column>
<el-table-column align="center" label="产品型号">
<el-table-column align="center" :label="$t('assemblyQualitydataQuery.productModel')">
<template slot-scope="scope">
{{ scope.row.发动机型号 }}
</template>
@@ -187,22 +187,22 @@
<!-- {{ scope.row.工位名称 }}-->
<!-- </template>-->
<!--</el-table-column>-->
<el-table-column align="center" width="150px" label="测量位置">
<el-table-column align="center" width="150px" :label="$t('assemblyQualitydataQuery.measuringPosition')">
<template slot-scope="scope">
{{ scope.row.测量位置 }}
</template>
</el-table-column>
<el-table-column align="center" width="100px" label="测量项目">
<el-table-column align="center" width="100px" :label="$t('assemblyQualitydataQuery.measuringProject')">
<template slot-scope="scope">
{{ scope.row.测量项目 }}
</template>
</el-table-column>
<el-table-column align="center" label="测量值" width="120px">
<el-table-column align="center" :label="$t('assemblyQualitydataQuery.measuringValue')" width="120px">
<template slot-scope="scope">
{{ scope.row.测量值 }}
</template>
</el-table-column>
<el-table-column align="center" label="测量单位" width="80px">
<el-table-column align="center" :label="$t('assemblyQualitydataQuery.measuringUnit')" width="80px">
<template slot-scope="scope">
{{ scope.row.测量单位 }}
</template>
@@ -212,22 +212,22 @@
<!-- {{ scope.row.理论值 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column align="center" label="值上限" width="80px">
<el-table-column align="center" :label="$t('assemblyQualitydataQuery.upperLimit')" width="100px">
<template slot-scope="scope">
{{ scope.row.上限值 }}
</template>
</el-table-column>
<el-table-column align="center" label="值下限" width="80px">
<el-table-column align="center" :label="$t('assemblyQualitydataQuery.lowerLimit')" width="100px">
<template slot-scope="scope">
{{ scope.row.下限值 }}
</template>
</el-table-column>
<el-table-column align="center" width="150px" label="生产日期">
<el-table-column align="center" width="150px" :label="$t('assemblyQualitydataQuery.productionDate')">
<template slot-scope="scope">
{{ scope.row.生产日期 }}
</template>
</el-table-column>
<el-table-column align="center" label="合格标志" width="80px">
<el-table-column align="center" :label="$t('assemblyQualitydataQuery.qualifiedFlag')" width="110px">
<template slot-scope="scope">
{{ scope.row.合格标志 }}
</template>
@@ -277,13 +277,13 @@ export default {
unitCode: '', // 单元号
isQualified: [
{
label: '合格',
label: this.$t('assemblyQualitydataQuery.qualified'),
value: 1
}, {
label: '不合格',
label: this.$t('assemblyQualitydataQuery.unqualified'),
value: 0
}, {
label: '全部',
label: this.$t('assemblyQualitydataQuery.all'),
value: 2
}
], // 是否合格
@@ -304,6 +304,22 @@ export default {
this.getStationNumber()
this.getEngineType()
},
watch: {
'$i18n.locale'() {
this.isQualified = [
{
label: this.$t('assemblyQualitydataQuery.qualified'),
value: 1
}, {
label: this.$t('assemblyQualitydataQuery.unqualified'),
value: 0
}, {
label: this.$t('assemblyQualitydataQuery.all'),
value: 2
}
]
}
},
mounted() {
this.getOrderNumber()
this.getTraceabilityCode()
@@ -560,7 +576,7 @@ export default {
var Data = this.CreateData('2001', '质量数据查询_综合查询新', param)
this.exportExcel_NPOI(Data)
} else {
this.$message.warning('暂无数据')
this.$message.warning(this.$t('assemblyQualitydataQuery.noData'))
}
},
// 分页

View File

@@ -13,12 +13,12 @@
<!-- <el-input v-model="unitCode" placeholder="DS/ES编号" clearable size="small" style="width: 150px; margin-left: 5px"/>-->
<!--</div>-->
<div style="margin-top: 10px">
<span style="margin-left: 10px">工位号</span>
<span style="margin-left: 10px">{{ $t('inquiryTransitInformation.stationNumberLabel') }}</span>
<el-select
v-model="stationNumberValue"
clearable
filterable
placeholder="工位号"
:placeholder="$t('inquiryTransitInformation.stationNumber')"
size="small"
style="width: 250px">
<el-option
@@ -53,10 +53,10 @@
<!-- :value="item.value"-->
<!-- size="mini"/>-->
<!-- </el-select>-->
<span style="margin-left: 10px">订单号</span>
<el-input v-model="orderNumberValue" placeholder="订单号" clearable size="small" style="width: 150px; margin-left: 5px"/>
<span style="margin-left: 10px">产品型号</span>
<el-select v-model="engineTypeValue" placeholder="请选择产品型号" filterable clearable size="small" style="width: 150px">
<span style="margin-left: 10px">{{ $t('inquiryTransitInformation.orderNumberLabel') }}</span>
<el-input v-model="orderNumberValue" :placeholder="$t('inquiryTransitInformation.orderNumber')" clearable size="small" style="width: 150px; margin-left: 5px"/>
<span style="margin-left: 10px">{{ $t('inquiryTransitInformation.productModelLabel') }}</span>
<el-select v-model="engineTypeValue" :placeholder="$t('inquiryTransitInformation.selectProductModel')" filterable clearable size="small" style="width: 150px">
<el-option
v-for="item in engineType"
:key="item.value"
@@ -80,16 +80,16 @@
<!-- :value="item.value"-->
<!-- size="mini"/>-->
<!-- </el-select>-->
<span style="margin-left: 10px">生产时间</span>
<span style="margin-left: 10px">{{ $t('inquiryTransitInformation.productionTimeLabel') }}</span>
<el-date-picker
v-model="dateTime"
:clearable="false"
align="center"
end-placeholder="结束日期"
:end-placeholder="$t('inquiryTransitInformation.endDate')"
format="yyyy-MM-dd"
range-separator=""
:range-separator="$t('inquiryTransitInformation.dateRangeSeparator')"
size="small"
start-placeholder="开始日期"
:start-placeholder="$t('inquiryTransitInformation.startDate')"
style="width: 240px;"
type="daterange"
value-format="yyyy-MM-dd"/>
@@ -99,7 +99,7 @@
size="small"
style="margin-left: 5px"
type="primary"
@click="selectDate()">查询
@click="selectDate()">{{ $t('inquiryTransitInformation.search') }}
</el-button>
<el-button icon="el-icon-download" size="small" type="info" @click="exportExcel()">Excel</el-button>
</div>
@@ -113,29 +113,29 @@
class="main"
element-loading-background="rgba(0, 0, 0, 0.2)"
element-loading-spinner="el-icon-loading"
element-loading-text="数据加载中"
:element-loading-text="$t('inquiryTransitInformation.loadingData')"
height="600px"
size="mini"
style="width: 100%;max-height: 650px;margin-top: 10px"
tooltip-effect="dark">
<!-- <el-table-column :selectable="selectable" type="selection" width="45" align="center"/>-->
<el-table-column align="center" label="序号" type="index" width="60"/>
<el-table-column align="center" label="工位号" width="120">
<el-table-column align="center" :label="$t('inquiryTransitInformation.sequence')" type="index" width="60"/>
<el-table-column align="center" :label="$t('inquiryTransitInformation.stationNumber')" width="120">
<template slot-scope="scope">
{{ scope.row.工位号 }}
</template>
</el-table-column>
<el-table-column align="center" label="订单号">
<el-table-column align="center" :label="$t('inquiryTransitInformation.orderNumber')">
<template slot-scope="scope">
{{ scope.row.订单号 }}
</template>
</el-table-column>
<el-table-column align="center" label="产品编号">
<el-table-column align="center" :label="$t('inquiryTransitInformation.productNumber')">
<template slot-scope="scope">
{{ scope.row.发动机号 }}
</template>
</el-table-column>
<el-table-column align="center" label="产品型号">
<el-table-column align="center" :label="$t('inquiryTransitInformation.productModel')">
<template slot-scope="scope">
{{ scope.row.机型 }}
</template>
@@ -162,22 +162,22 @@
<!-- {{ scope.row.单元号 }}-->
<!-- </template>-->
<!--</el-table-column>-->
<el-table-column align="center" label="到达时间">
<el-table-column align="center" :label="$t('inquiryTransitInformation.arrivalTime')">
<template slot-scope="scope">
{{ scope.row.到达时间 }}
</template>
</el-table-column>
<el-table-column align="center" label="离开时间">
<el-table-column align="center" :label="$t('inquiryTransitInformation.departureTime')">
<template slot-scope="scope">
{{ scope.row.离开时间 }}
</template>
</el-table-column>
<el-table-column align="center" label="在线时间(s)">
<el-table-column align="center" :label="$t('inquiryTransitInformation.onlineTimeSeconds')">
<template slot-scope="scope">
{{ scope.row.在线时间 }}
</template>
</el-table-column>
<el-table-column align="center" label="是否合格" width="80px">
<el-table-column align="center" :label="$t('inquiryTransitInformation.isQualified')" width="80px">
<template slot-scope="scope">
{{ scope.row.是否合格 }}
</template>
@@ -434,7 +434,7 @@ export default {
var Data = this.CreateData('2001', '质量数据查询_测量数据发动机在线状态_报表_NEW新', param)
this.exportExcel_NPOI(Data)
} else {
this.$message.warning('暂无数据')
this.$message.warning(this.$t('inquiryTransitInformation.noData'))
}
},
// 分页

View File

@@ -3,12 +3,12 @@
<el-card class="topCard">
<div class="topDiv">
<div>
<span style="margin-left: 10px;margin-right: 1px;letter-spacing: 3px">工位号</span>
<span style="margin-left: 10px;margin-right: 1px;letter-spacing: 3px">{{ $t('materialDataQuery.stationNumberLabel') }}</span>
<el-select
v-model="stationNumberValue"
clearable
filterable
placeholder="请选择工位号"
:placeholder="$t('materialDataQuery.selectStationNumber')"
size="small"
style="width: 250px">
<el-option
@@ -18,14 +18,14 @@
:value="item.value"
size="mini"/>
</el-select>
<span style="margin-left: 10px;letter-spacing: 3px">订单号</span>
<el-input v-model="orderNumberValue" placeholder="订单号" clearable size="small" style="width: 250px;"/>
<span style="margin-left: 10px;">产品型号</span>
<span style="margin-left: 10px;letter-spacing: 3px">{{ $t('materialDataQuery.orderNumberLabel') }}</span>
<el-input v-model="orderNumberValue" :placeholder="$t('materialDataQuery.orderNumber')" clearable size="small" style="width: 250px;"/>
<span style="margin-left: 10px;">{{ $t('materialDataQuery.productModelLabel') }}</span>
<el-select
v-model="engineTypeValue"
clearable
filterable
placeholder="请选择产品型号"
:placeholder="$t('materialDataQuery.selectProductModel')"
size="small"
style="width: 250px">
<el-option
@@ -62,11 +62,11 @@
</div>
<div style="margin-top: 10px">
<span style="margin-left: 10px">物料条码</span>
<span style="margin-left: 10px">{{ $t('materialDataQuery.materialBarcodeLabel') }}</span>
<el-input
v-model="traceabilityCode"
clearable
placeholder="请输入物料条码"
:placeholder="$t('materialDataQuery.enterMaterialBarcode')"
size="small"
style="width: 250px;"/>
<!-- <span style="margin-left: 10px">零件名称</span>-->
@@ -78,16 +78,16 @@
<!-- :value="item.value"-->
<!-- size="mini"/>-->
<!-- </el-select>-->
<span style="margin-left: 10px">生产时间</span>
<span style="margin-left: 10px">{{ $t('materialDataQuery.productionTimeLabel') }}</span>
<el-date-picker
v-model="dateTime"
:clearable="false"
align="center"
end-placeholder="结束日期"
:end-placeholder="$t('materialDataQuery.endDate')"
format="yyyy-MM-dd"
range-separator=""
:range-separator="$t('materialDataQuery.dateRangeSeparator')"
size="small"
start-placeholder="开始日期"
:start-placeholder="$t('materialDataQuery.startDate')"
style="width: 250px;"
type="daterange"
value-format="yyyy-MM-dd"/>
@@ -97,7 +97,7 @@
size="small"
style="margin-left: 5px"
type="primary"
@click="pageCurrent = 1;selectDate()">查询
@click="pageCurrent = 1;selectDate()">{{ $t('materialDataQuery.search') }}
</el-button>
<el-button icon="el-icon-download" size="small" type="info" @click="exportExcel()">Excel</el-button>
<!-- <span style="margin-left: 10px">批次条码</span>-->
@@ -121,29 +121,29 @@
class="main"
element-loading-background="rgba(0, 0, 0, 0.2)"
element-loading-spinner="el-icon-loading"
element-loading-text="数据加载中"
:element-loading-text="$t('materialDataQuery.loadingData')"
height="560px"
size="mini"
style="width: 100%"
tooltip-effect="dark">
<!-- <el-table-column :selectable="selectable" type="selection" width="45" align="center"/>-->
<el-table-column align="center" label="序号" type="index" width="60"/>
<el-table-column align="center" label="订单号" width="120px">
<el-table-column align="center" :label="$t('materialDataQuery.sequence')" type="index" width="60"/>
<el-table-column align="center" :label="$t('materialDataQuery.orderNumber')" width="120px">
<template slot-scope="scope">
{{ scope.row.订单号 }}
</template>
</el-table-column>
<el-table-column align="center" label="工位号" width="100px">
<el-table-column align="center" :label="$t('materialDataQuery.stationNumber')" width="100px">
<template slot-scope="scope">
{{ scope.row.工位号 }}
</template>
</el-table-column>
<el-table-column align="center" label="产品编号">
<el-table-column align="center" :label="$t('materialDataQuery.productNumber')">
<template slot-scope="scope">
{{ scope.row.发动机号 }}
</template>
</el-table-column>
<el-table-column align="center" label="产品型号" width="120px">
<el-table-column align="center" :label="$t('materialDataQuery.productModel')" width="120px">
<template slot-scope="scope">
{{ scope.row.发动机型号 }}
</template>
@@ -159,17 +159,17 @@
<!-- {{ scope.row.零件图号 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column align="center" label="物料号" width="150px">
<el-table-column align="center" :label="$t('materialDataQuery.materialNumber')" width="150px">
<template slot-scope="scope">
{{ scope.row.物料号 }}
</template>
</el-table-column>
<el-table-column align="center" label="零件数量" width="100px">
<el-table-column align="center" :label="$t('materialDataQuery.partQuantity')" width="100px">
<template slot-scope="scope">
{{ scope.row.零件数量 }}
</template>
</el-table-column>
<el-table-column align="center" label="零件名称" min-width="150px">
<el-table-column align="center" :label="$t('materialDataQuery.partName')" min-width="150px">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
@@ -180,7 +180,7 @@
<!-- {{ scope.row.生产厂家 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column align="center" min-width="150px" label="物料条码">
<el-table-column align="center" min-width="150px" :label="$t('materialDataQuery.materialBarcode')">
<template slot-scope="scope">
{{ scope.row.物料条码 }}
</template>
@@ -190,7 +190,7 @@
<!-- {{ scope.row.物料条码批次 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column align="center" label="操作时间" width="150px">
<el-table-column align="center" :label="$t('materialDataQuery.operationTime')" width="150px">
<template slot-scope="scope">
{{ scope.row.操作时间 }}
</template>
@@ -502,7 +502,7 @@ export default {
var Data = this.CreateData('2001', '物料数据查询_报表新', param)
this.exportExcel_NPOI(Data)
} else {
this.$message.warning('暂无数据')
this.$message.warning(this.$t('materialDataQuery.noData'))
}
},
// 分页

View File

@@ -2,9 +2,9 @@
<div class="app-container">
<el-card class="topCard">
<div class="topDiv">
<span style="margin-left: 10px">产品型号</span>
<el-input v-model="equipmentType" style="width:150px;" clearable placeholder="产品型号" size="small"/>
<el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 10px" @click="searchOrder()">查询</el-button>
<span style="margin-left: 10px">{{ $t('recipeManagement.productModelLabel') }}</span>
<el-input v-model="equipmentType" style="width:150px;" clearable :placeholder="$t('recipeManagement.productModel')" size="small"/>
<el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 10px" @click="searchOrder()">{{ $t('recipeManagement.search') }}</el-button>
<!-- <el-button type="distribution" size="small" icon="el-icon-circle-plus" @click="creatOrder('form')">增加</el-button>-->
</div>
<el-table
@@ -12,7 +12,7 @@
ref="multipleTable"
:data="tableData"
:header-cell-style="{background:'#eef1f6',color:'#606266'}"
element-loading-text="数据加载中"
:element-loading-text="$t('recipeManagement.loadingData')"
element-loading-spinner="el-icon-loading"
element-loading-background="rgba(0, 0, 0, 0.2)"
class="main"
@@ -21,12 +21,12 @@
style="width: 60%;"
border
size="mini">
<el-table-column align="center" label="产品型号代码" width="100px">
<el-table-column align="center" :label="$t('recipeManagement.productModelCode')" width="130px">
<template slot-scope="scope">
{{ scope.row.发动机机型标志 }}
</template>
</el-table-column>
<el-table-column align="center" label="产品型号">
<el-table-column align="center" :label="$t('recipeManagement.productModel')">
<template slot-scope="scope">
{{ scope.row.发动机型号 }}
</template>
@@ -36,7 +36,7 @@
<!-- {{ scope.row.配方号 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column align="center" label="大机型">
<el-table-column align="center" :label="$t('recipeManagement.largeModel')">
<template slot-scope="scope">
{{ scope.row.标识字符 }}
</template>
@@ -90,15 +90,15 @@
<!-- @current-change="handleCurrentChange"/>-->
<!-- </div>-->
</el-card>
<el-dialog :visible.sync="dialogFormVisible" :title="title" center style="min-height: 200px;" width="400px">
<el-dialog :visible.sync="dialogFormVisible" :title="$t(dialogTitleKey)" center style="min-height: 200px;" width="400px">
<el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="120px">
<el-form-item label="零件类型" prop="equipmentType" style="display: inline-block">
<el-form-item :label="$t('recipeManagement.partType')" prop="equipmentType" style="display: inline-block">
<el-input
v-model="form.equipmentType"
size="small"
placeholder="零件类型"/>
:placeholder="$t('recipeManagement.partType')"/>
</el-form-item>
<el-form-item label="零件类型标志" prop="equipmentSign" style="display: inline-block">
<el-form-item :label="$t('recipeManagement.partTypeSign')" prop="equipmentSign" style="display: inline-block">
<el-input-number
v-model="form.equipmentSign"
:min="1"
@@ -106,14 +106,14 @@
:step="1"
style="width: 200px"
size="small"
placeholder="零件类型标志"/>
:placeholder="$t('recipeManagement.partTypeSign')"/>
</el-form-item>
<el-form-item label="零件类型名称" prop="itemNo" style="display: inline-block">
<el-form-item :label="$t('recipeManagement.partTypeName')" prop="itemNo" style="display: inline-block">
<el-input
v-model="form.itemNo"
clearable
size="small"
placeholder="零件类型名称"/>
:placeholder="$t('recipeManagement.partTypeName')"/>
</el-form-item>
<!-- <el-form-item label="螺栓数量" prop="deviceNum" style="display: inline-block">-->
<!-- <el-input-number-->
@@ -157,9 +157,9 @@
<!-- </el-form-item>-->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="callOff('form')">取消</el-button>
<el-button v-if="title === '增加'" type="primary" size="small" @click="submitAdd('form')">确定</el-button>
<el-button v-if="title === '编辑'" type="primary" size="small" @click="submitAdd1('form')">确定</el-button>
<el-button size="small" @click="callOff('form')">{{ $t('common.cancel') }}</el-button>
<el-button v-if="dialogMode === 'add'" type="primary" size="small" @click="submitAdd('form')">{{ $t('common.confirm') }}</el-button>
<el-button v-if="dialogMode === 'edit'" type="primary" size="small" @click="submitAdd1('form')">{{ $t('common.confirm') }}</el-button>
</div>
</el-dialog>
</div>
@@ -171,7 +171,8 @@ export default {
data() {
return {
equipmentType: '',
title: '',
dialogMode: '',
dialogTitleKey: 'recipeManagement.add',
boxSign: [],
tonnageSign: [],
disableArr: [{
@@ -192,15 +193,7 @@ export default {
formula: '',
ID: ''
},
rules: { // 创建订单验证
deviceNum: [{ required: true, message: '请输入', trigger: 'blur' }],
equipmentSign: [{ required: true, message: '请输入', trigger: 'blur' }],
enDisable: [{ required: true, message: '请选择', trigger: 'change' }],
// tonnageSign: [{ required: true, message: '请选择', trigger: 'change' }],
// boxSign: [{ required: true, message: '请选择', trigger: 'change' }],
equipmentType: [{ required: true, message: '请输入', trigger: 'blur' }],
formula: [{ required: true, message: '请输入', trigger: 'blur' }]
},
rules: {},
tableData: [],
dialogFormVisible: false, // 创建订单
// total: 0, // 总条数
@@ -211,13 +204,26 @@ export default {
}
},
watch: {
'$i18n.locale'() {
this.initValidationRules()
}
},
created() {
// this.getBox()
// this.getTonnageSign()
this.initValidationRules()
this.searchOrder()
},
methods: {
initValidationRules() {
this.rules = {
deviceNum: [{ required: true, message: this.$t('recipeManagement.pleaseEnter'), trigger: 'blur' }],
equipmentSign: [{ required: true, message: this.$t('recipeManagement.pleaseEnter'), trigger: 'blur' }],
enDisable: [{ required: true, message: this.$t('recipeManagement.pleaseSelect'), trigger: 'change' }],
equipmentType: [{ required: true, message: this.$t('recipeManagement.pleaseEnter'), trigger: 'blur' }],
formula: [{ required: true, message: this.$t('recipeManagement.pleaseEnter'), trigger: 'blur' }]
}
},
getBox() {
this.boxSign = []
request({
@@ -281,7 +287,8 @@ export default {
if (this.$refs[formName] !== undefined) {
this.$refs[formName].resetFields()
}
this.title = '增加'
this.dialogMode = 'add'
this.dialogTitleKey = 'recipeManagement.add'
this.form.equipmentType = ''
this.form.formula = ''
this.form.deviceNum = 1
@@ -308,13 +315,13 @@ export default {
this.ExecDatabase(Data).then(response => {
if (response.data[0].result === '1') {
this.$message({
message: '增加成功',
message: this.$t('recipeManagement.addSuccess'),
type: 'success'
})
this.dialogFormVisible = false
this.searchOrder()
} else {
this.$message.error('增加失败,重复!')
this.$message.error(this.$t('recipeManagement.addFailedDuplicate'))
}
})
this.dialogFormVisible = false
@@ -330,9 +337,9 @@ export default {
},
// 删除订单
deleteOrder(row) {
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
this.$confirm(this.$t('recipeManagement.confirmDelete'), this.$t('recipeManagement.prompt'), {
confirmButtonText: this.$t('common.confirm'),
cancelButtonText: this.$t('common.cancel'),
type: 'warning'
}).then(() => {
var param = []
@@ -341,18 +348,18 @@ export default {
this.ExecDatabase(Data).then(response => {
if (response.data[0].result === '1') {
this.$message({
message: '删除成功',
message: this.$t('recipeManagement.deleteSuccess'),
type: 'success'
})
this.searchOrder()
} else {
this.$message.error('删除失败!')
this.$message.error(this.$t('recipeManagement.deleteFailed'))
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
message: this.$t('recipeManagement.deleteCanceled')
})
})
},
@@ -361,7 +368,8 @@ export default {
if (this.$refs['form'] !== undefined) {
this.$refs['form'].resetFields()
}
this.title = '编辑'
this.dialogMode = 'edit'
this.dialogTitleKey = 'recipeManagement.edit'
this.form.equipmentType = row.发动机型号
this.form.equipmentSign = row.发动机机型标志
this.form.itemNo = row.工厂编号2
@@ -390,12 +398,12 @@ export default {
this.ExecDatabase(Data).then(response => {
if (response.data[0].result === '1') {
this.$message({
message: '修改成功',
message: this.$t('recipeManagement.editSuccess'),
type: 'success'
})
this.searchOrder()
} else {
this.$message.error('修改失败!重复')
this.$message.error(this.$t('recipeManagement.editFailedDuplicate'))
}
})
this.dialogFormVisible = false
@@ -460,4 +468,3 @@ export default {
background-color: white!important;
}
</style>