diff --git a/src/views/modules/yieldReport/com_finish_schedule.vue b/src/views/modules/yieldReport/com_finish_schedule.vue index 17501ed..2c3e805 100644 --- a/src/views/modules/yieldReport/com_finish_schedule.vue +++ b/src/views/modules/yieldReport/com_finish_schedule.vue @@ -6,23 +6,23 @@ label-width="80px">
- 数量 + {{labels.scheduleQty}} - + - +
- 排程班次 + {{labels.scheduleShift}} - + - + - + @@ -45,18 +45,18 @@
- 生产时间(只有结束的记录才会被统计) + {{labels.prodTitle}} - + - + - + @@ -64,13 +64,13 @@ - + - + - + @@ -78,14 +78,14 @@ - + - + - + @@ -93,14 +93,14 @@
- 功能 + {{labels.functionTitle}} - 结单关闭 + {{ buttons.finishScheduleButton }} @@ -110,7 +110,7 @@ - 关闭 + {{ buttons.closeButton }} @@ -119,28 +119,29 @@ - 刷新数据 + {{ buttons.refreshButton }} + 对语言设置
- 时间记录 + {{labels.timeList}} 有记录未结束 + v-model="pageData.timeFinishedFlag">{{labels.timeListNoFinish}} 仅显示未结束记录 + v-model="pageData.showNoFinishedTimeFlag">{{labels.timeListShowNoFinish}} @@ -171,19 +172,19 @@
- 刀模使用 + {{labels.toolList}} 有记录未结束 + v-model="pageData.toolFinishedFlag">{{labels.toolListNoFinish}} 仅显示未结束使用刀模记录 + v-model="pageData.showNoFinishedToolFlag">{{labels.toolListShowNoFinish}} @@ -214,19 +215,19 @@
- 材料使用 + {{labels.materialList}} 有记录未结束 + v-model="pageData.materialFinishedFlag">{{labels.materialListNoFinish}} 仅显示未结束使用材料记录 + v-model="pageData.showNoFinishedMaterialFlag">{{labels.materialListShowNoFinish}} @@ -283,10 +284,26 @@ repackFinishScheduleWithNoFqc } from '@/api/yieldReport/com_finish_schedule.js'; + import { + searchSysLanguagePackList, + searchSysLanguageParam, + searchFunctionButtonList, + saveButtonList, + searchSysLanguage, + searchLanguageListByLanguageCode, + saveSysLanguageOne, + searchPageLanguageData, + removerLanguage, + saveSysLanguageList + } from "@/api/sysLanguage.js"; + + var functionId = 'C10000007'; + export default { data() { return { titleCon: '', + showDefault: false, showExceptionFlag: false, scheduleNo: 0, pageData: { @@ -882,6 +899,252 @@ } ], dataListLoading: false, + buttons: { + finishScheduleButton: '结单关闭', + closeButton: '关闭', + refreshButton: '刷新数据', + }, + buttonList: [ + { + functionId: functionId, + languageValue: '结单关闭', + objectId: 'finishScheduleButton', + objectType: 'button', + tableId: '*' + }, { + functionId: functionId, + languageValue: '关闭', + objectId: 'closeButton', + objectType: 'button', + tableId: '*' + }, { + functionId: functionId, + languageValue: '刷新数据', + objectId: 'refreshButton', + objectType: 'button', + tableId: '*' + }, + ], + queryButton: { + functionId: functionId, + table_id: '*', + languageCode: this.$i18n.locale, + objectType: 'button' + }, + labels: { + titleCon: '结束派工单 ', + seqNoName: '派工单号:', + scheduleQty: '数量', + totalApprovedQty: '总良品数量:', + totalDefectedQty: '总不良数量:', + scheduleShift: '排程班次', + currentTime: '当前时间:', + scheduledDate: '排程日期:', + shiftNo: '班次:', + prodTitle: '生产时间(只有结束的记录才会被统计)', + totalTuningTime: '总调机时间', + totalTuningDownTime: '总调机过程停机时间', + totalPureTuningTime: '净调机时间', + totalProdTime: '总生产时间', + totalProdDownTime: '总生产过程停机时间', + totalPureProdTime: '净生产时间', + totalManufTime: '总制造时间', + totalManufDownTime: '总制造过程停机时间', + totalPureManufTime: '净制造时间', + functionTitle: '功能', + timeList: '时间记录', + timeListNoFinish: '有记录未结束', + timeListShowNoFinish: '仅显示未结束记录', + toolList: '刀模使用', + totalListNoFinish: '有记录未结束', + totalListShowNoFinish: '仅显示未结束使用刀模记录', + materialList: '材料使用', + materialListNoFinish: '有记录未结束', + materialListShowNoFinish: '仅显示未结束使用材料记录', + }, + labelsList: [ + { + functionId: functionId, + languageValue: '结束派工单 ', + objectId: 'titleCon', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '派工单号:', + objectId: 'seqNoName', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '数量', + objectId: 'scheduleQty', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '总良品数量:', + objectId: 'totalApprovedQty', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '总不良数量:', + objectId: 'totalDefectedQty', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '排程班次', + objectId: 'scheduleShift', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '当前时间:', + objectId: 'currentTime', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '排程日期:', + objectId: 'scheduledDate', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '班次:', + objectId: 'shiftNo', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '生产时间(只有结束的记录才会被统计)', + objectId: 'prodTitle', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '总调机时间', + objectId: 'totalTuningTime', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '总调机过程停机时间', + objectId: 'totalTuningDownTime', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '净调机时间', + objectId: 'totalPureTuningTime', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '总生产时间', + objectId: 'totalProdTime', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '总生产过程停机时间', + objectId: 'totalProdDownTime', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '净生产时间', + objectId: 'totalPureProdTime', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '总制造时间', + objectId: 'totalManufTime', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '总制造过程停机时间', + objectId: 'totalManufDownTime', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '净制造时间', + objectId: 'totalPureManufTime', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '时间记录', + objectId: 'timeList', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '功能', + objectId: 'functionTitle', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '有记录未结束', + objectId: 'timeListNoFinish', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '仅显示未结束时间记录:', + objectId: 'timeListShowNoFinish', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '刀模使用', + objectId: 'toolList', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '有记录未结束:', + objectId: 'toolListNoFinish', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '仅显示未结束使用刀模记录', + objectId: 'toolListShowNoFinish', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '材料使用:', + objectId: 'materialList', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '有记录未结束', + objectId: 'materialListNoFinish: ', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '仅显示未结束使用材料记录:', + objectId: 'materialListShowNoFinish', + objectType: 'label', + tableId: '*' + }, + ], + queryLabel: { + functionId: functionId, + table_id: '*', + languageCode: this.$i18n.locale, + objectType: 'label' + }, } }, components: { @@ -902,8 +1165,7 @@ //初始化操作员对象 this.operatorData = JSON.parse(JSON.stringify(operatorData)); //初始化标题 - this.titleCon = '结束派工单 \ - 派工单号:' + scheduleData.seqNo; + this.titleCon = this.labels.titleCon+this.labels.seqNoName+ scheduleData.seqNo; //处理异常的原因 this.pageData.exceptionFlag = 'N'; this.pageData.exceptionReason = ''; @@ -1145,11 +1407,44 @@ this.pageData.exceptionReason = exceptionReason; //然后提交结束派工单的数据 this.finishScheduleOperation(); - } + }, + + // 保存 默认配置 列 + async saveMultiLanguage() { + // 保存页面 button label title 属性 + let buttons = this.buttonList; + let labels = this.labelsList; + await saveButtonList(buttons) + await saveButtonList(labels) + this.getMultiLanguageList() + }, + + 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.factoryList() // this.getLanguageList() + this.getMultiLanguageList()//刷新按钮 } }