diff --git a/src/views/modules/shopOrder/productionReport/common/productionLineYieldReport.vue b/src/views/modules/shopOrder/productionReport/common/productionLineYieldReport.vue index 32ab69d..730fceb 100644 --- a/src/views/modules/shopOrder/productionReport/common/productionLineYieldReport.vue +++ b/src/views/modules/shopOrder/productionReport/common/productionLineYieldReport.vue @@ -4,36 +4,36 @@ v-drag @close="closeDialog" width="520px" - :title="'产量报告'" + :title="labels.productReport" :close-on-click-modal="false" :visible.sync="visible">
- 产量报告 + {{labels.productReport}}
- 订单信息 + {{labels.orderInfo}} - + - + - + - + - + - + @@ -43,28 +43,28 @@ - {{'操作员'}} + {{labels.operator}} - + - + - + - + - + @@ -72,15 +72,15 @@ - + - + - + @@ -89,13 +89,13 @@
- 排产班次信息 + {{labels.shiftInfo}} - + - + @@ -111,7 +111,7 @@
- + @@ -120,8 +120,8 @@
- 保存 - 取消 + {{buttons.save}} + {{buttons.cancel}} @@ -142,10 +142,64 @@ import {getScheduleShiftData} from '@/api/yieldReport/com_finish_roll.js'; import comSelectShift from "../../../yieldReport/com_select_shift"; import Chooselist from '@/views/modules/common/Chooselist' + import { + + searchFunctionButtonList, + + } from "@/api/sysLanguage.js" + var functionId='C20000003'; export default { data() { return { + labels: { + productReport:'产量报告', + orderInfo:'订单信息', + site:'工厂:', + orderNo:'生产订单号:', + partNo:'物料编码:', + qtyRequired:'订单数量:', + itemNo:'工序号:', + operationDesc:'工序名称:', + operator:'操作员:', + startTime:'开工时间:', + produceTime:'生产时间:', + operatorName:'操作员姓名:', + finishTime:'完工时间:', + downtime:'停机时间:', + qualifiedQty:'合格数量:', + qualifiedNotQty:'不合格数量:', + reportQty:'报告数量:', + shiftInfo:'排产班次信息', + scheduledDate:'排产日期:', + shiftDesc:'班次:', + remark:'备注:', + operatorIn:'请选择操作员!', + produceTimeSmall:'生产时间必须大于0,请检查开工和完工时间是否正确!', + produceTimeBig:'生产时间不能大12个小时,请检查开工和完工时间是否正确!', + qualifiedQtyIn:'合格数量,必须输入,并且必须大于0!', + qualifiedNotQtyIn:'不合格数量,必须输入!', + shiftDescNot:'该时间段内没有匹配的班次信息,请联系相关人员!', + }, + buttons:{ + search:'查询', + download:'导出', + save:'保存', + cancel:'取消', + }, + queryButton: { + functionId: functionId, + table_id: '*', + languageCode: this.$i18n.locale, + objectType: 'button' + }, + queryLabel: { + functionId: functionId, + table_id: '*', + languageCode: this.$i18n.locale, + objectType: 'label' + }, + visible: false, showShiftFlag: false, itemData: { @@ -212,32 +266,33 @@ this.visible = true this.itemData = Object.assign(this.itemData, row) // this.getScheduleShiftFlag() + this.getMultiLanguageList()//刷新按钮 }, // 保存报工信息 saveYieldReport() { if (!this.itemData.operator) { - this.$message.warning('请选择操作员!') + this.$message.warning(this.labels.operatorIn) return } if (this.itemData.produceTime <= 0) { - this.$message.warning('生产时间必须大于0,请检查开工和完工时间是否正确!') + this.$message.warning(this.labels.produceTimeSmall) return } if (this.itemData.produceTime >= 12) { - this.$message.warning('生产时间不能大12个小时,请检查开工和完工时间是否正确!') + this.$message.warning(this.labels.produceTimeBig) return } if (this.itemData.qualifiedQty.length == 0 || this.itemData.qualifiedQty <= 0) { - this.$message.warning('合格数量,必须输入,并且必须大于0!') + this.$message.warning(this.labels.qualifiedQtyIn) return } if (this.itemData.qualifiedNotQty.length == 0) { - this.$message.warning('不合格数量,必须输入!') + this.$message.warning(this.labels.qualifiedNotQtyIn) return } if (this.pageData.shiftDesc == '无班次') { - this.$message.warning('该时间段内没有匹配的班次信息,请联系相关人员!') + this.$message.warning(this.labels.shiftDescNot) return } let reportDto = { @@ -332,9 +387,31 @@ this.pageData.shiftNo = shiftDesc; this.pageData.remark = username + "更改了班次." }, + //多语言 + getMultiLanguageList() { + //首先查询当前按钮的多语言 + searchFunctionButtonList(this.queryButton).then(({data}) => { + if (JSON.stringify(data.data) != '{}') { + this.buttons = data.data + } else { + // saveButtonList(this.buttonList).then(({data}) => { + // }) + } + }); + //其次查询当前标签的多语言 + searchFunctionButtonList(this.queryLabel).then(({data}) => { + if (JSON.stringify(data.data) != '{}') { + this.labels = data.data + } else { + // saveButtonList(this.buttonList).then(({data}) => { + // }) + } + }); + }, }, created() { this.getScheduleShiftFlag() + this.getMultiLanguageList()//刷新按钮 } } diff --git a/src/views/modules/shopOrder/productionReport/productionLineOperatorRegistration.vue b/src/views/modules/shopOrder/productionReport/productionLineOperatorRegistration.vue index 74848a9..4d8f3de 100644 --- a/src/views/modules/shopOrder/productionReport/productionLineOperatorRegistration.vue +++ b/src/views/modules/shopOrder/productionReport/productionLineOperatorRegistration.vue @@ -1,8 +1,8 @@