diff --git a/src/views/modules/yieldReport/com_produce_report_normal.vue b/src/views/modules/yieldReport/com_produce_report_normal.vue index addd06d..bb86a33 100644 --- a/src/views/modules/yieldReport/com_produce_report_normal.vue +++ b/src/views/modules/yieldReport/com_produce_report_normal.vue @@ -8,54 +8,54 @@ label-width="80px"> - + - + - + - + - + - + - + - + - + - + - + 仅显示当前卷信息 + v-model="scheduleData.currentRollFlag">{{labels.onlyCurrentRoll}}
- 卷操作 + {{labels.rollButtons}} {{ this.currentRollOps.rollNo }} @@ -63,40 +63,38 @@ - 创建新卷 + style="margin-left: 5px; margin-bottom: 5px;">{{ buttons.newRollButton }} - 切换卷 + style="margin-left: 10px; margin-bottom: 5px;">{{ buttons.switchRoll }} - 创建分卷 + {{ buttons.separateRoll }} - 结束卷 + {{ buttons.finishRoll }} - 合并卷 + {{ buttons.mergeRoll }} - 结单 + {{ buttons.finishSchedule }} @@ -104,10 +102,10 @@
- 列表信息 + {{labels.listDesc}} - + - + 刀模替换 + >{{labels.toolListReplace}} 结束使用 + >{{labels.toolListFinish}} - + 换料 + @click="replaceMaterialModal(scope.row)">{{labels.materialListReplace}} 下料 + >{{labels.materialListCutting}} 生产结束 + >{{labels.materialListFinish}} - + - + - + 重打开 + >{{labels.rollListReopen}} 删除卷 + >{{labels.rollListDelete}} 打印卷标签 + >{{labels.rollListPrint }} (printList); @@ -369,64 +367,66 @@
- 生产调机 + {{labels.produceButtons}} - 刷新 + {{ buttons.refreshButton }} - 切换用户 + {{ buttons.switchOperator }} - 开始调机 + {{ buttons.startTuning }} - 开始生产 + {{ buttons.startProduce }}
- 不良 + {{labels.defectButtons}} - 报告不良 + {{ buttons.reportDefect }} + + 对语言设置
- 扫描 + {{labels.scanButtons}} - 刀模板 + {{ buttons.toolButton }} - 材料 + {{ buttons.materialButton }} @@ -435,12 +435,12 @@
- 停机 + {{labels.downTimeButtons}} - 报告其他停机 + {{ buttons.downTime }} @@ -448,7 +448,7 @@
- 其他操作 + {{ buttons.otherOperation }} @@ -461,21 +461,21 @@
- 产量报告 + {{ buttons.preReport }} - 删除卷 + {{ buttons.deleteRoll }} - 未生产下机拆卷 + {{ buttons.notProduce }}
其它操作 + slot="reference">{{labels.otherButtons}}
@@ -619,6 +619,20 @@ import { printSfdcLabel, } from "@/views/modules/yieldReport/print_roll_label.js" +import { + searchSysLanguagePackList, + searchSysLanguageParam, + searchFunctionButtonList, + saveButtonList, + searchSysLanguage, + searchLanguageListByLanguageCode, + saveSysLanguageOne, + searchPageLanguageData, + removerLanguage, + saveSysLanguageList +} from "@/api/sysLanguage.js"; + + /*引入组件*/ import comSwitchOperator from "./com_switch_operator";/*切换操作员*/ import comSwitchRoll from "./com_switch_roll";/*切换卷操作*/ @@ -637,10 +651,12 @@ import comCuttingMaterial from "./com_cutting_material"/*材料下料*/ import comProduceDown from "./com_produce_down";/*停机组件*/ import comFinishSchedule from "./com_finish_schedule";/*结束派工单组件*/ import notOverFinishRoll from "./not_over_finish_roll";/*生产过程的停机组件*/ +var functionId = 'C10000002'; export default { data() { return { titleCon: '', + showDefault: true, popoverFlag: false, showNotOverFlag: false, showOperatorFlag: false, @@ -2890,6 +2906,398 @@ export default { otherBunFlag: false, }, dataListLoading: false, + buttons: { + newRollButton: '创建新卷', + switchRoll: '切换卷', + separateRoll: '创建分卷', + finishRoll: '结束卷', + mergeRoll: '合并卷', + finishSchedule: '结单', + refreshButton: '刷新', + switchOperator: '切换用户', + startTuning: '开始调机', + startProduce: '开始生产', + reportDefect: '报告不良', + toolButton: '刀模板', + materialButton: '材料', + downTime: '报告其他停机', + otherOperation: '其他操作', + preReport: '产量报告', + deleteRoll: '删除卷', + notProduce: '未生产下机拆卷', + }, + buttonList: [ + { + functionId: functionId, + languageValue: '创建新卷', + objectId: 'newRollButton', + objectType: 'button', + tableId: '*' + }, { + functionId: functionId, + languageValue: '切换卷', + objectId: 'switchRoll', + objectType: 'button', + tableId: '*' + }, { + functionId: functionId, + languageValue: '创建分卷', + objectId: 'separateRoll', + objectType: 'button', + tableId: '*' + }, { + functionId: functionId, + languageValue: '结束卷', + objectId: 'finishRoll', + objectType: 'button', + tableId: '*' + }, { + functionId: functionId, + languageValue: '合并卷', + objectId: 'mergeRoll', + objectType: 'button', + tableId: '*' + }, { + functionId: functionId, + languageValue: '结单', + objectId: 'finishSchedule', + objectType: 'button', + tableId: '*' + }, { + functionId: functionId, + languageValue: '刷新', + objectId: 'refreshButton', + objectType: 'button', + tableId: '*' + }, { + functionId: functionId, + languageValue: '切换用户', + objectId: 'switchOperator', + objectType: 'button', + tableId: '*' + }, { + functionId: functionId, + languageValue: '开始调机', + objectId: 'startTuning', + objectType: 'button', + tableId: '*' + }, { + functionId: functionId, + languageValue: '开始生产', + objectId: 'startProduce', + objectType: 'button', + tableId: '*' + }, { + functionId: functionId, + languageValue: '报告不良', + objectId: 'reportDefect', + objectType: 'button', + tableId: '*' + },{ + functionId: functionId, + languageValue: '刀模板', + objectId: 'toolButton', + objectType: 'button', + tableId: '*' + }, { + functionId: functionId, + languageValue: '材料', + objectId: 'materialButton', + objectType: 'button', + tableId: '*' + },{ + functionId: functionId, + languageValue: '报告其他停机', + objectId: 'downTime', + objectType: 'button', + tableId: '*' + }, { + functionId: functionId, + languageValue: '其他操作', + objectId: 'otherOperation', + objectType: 'button', + tableId: '*' + },{ + functionId: functionId, + languageValue: '产量报告', + objectId: 'preReport', + objectType: 'button', + tableId: '*' + }, { + functionId: functionId, + languageValue: '删除卷', + objectId: 'deleteRoll', + objectType: 'button', + tableId: '*' + },{ + functionId: functionId, + languageValue: '未生产下机拆卷', + objectId: 'notProduce', + objectType: 'button', + tableId: '*' + } + ], + labels: { + reportPageName: '机台工作台', + orderNo: '订单号', + partNo: '物料编码', + partDesc: '物料名称/规则', + seqNo: '派工单号', + needDate: '要求完工日期', + planStartDate: '刷新', + lotSize: '原始派工单需求数量', + scheduledDate: ' 排产日期', + shiftNo: '班次', + preItemNo: '前道工序', + nextItemNo: ' 后道工序', + onlyCurrentRoll: '仅显示当前卷信息', + rollButtons: '卷操作', + listDesc: '列表信息', + timeList: '时间', + toolList: '刀模板记录', + materialList: '材料', + rollopsList: '生产卷操作信息', + defectList: '不良记录', + rollList: '机器下机卷', + produceButtons: '生产调机', + defectButtons: '不良', + scanButtons: '扫描', + downTimeButtons: '停机', + otherButtons: '其他操作', + toolListReplace: '刀模替换', + toolListFinish: '结束使用', + materialListReplace: '换料', + materialListCutting: '下料', + materialListFinish: '结束生产', + rollListReopen: '重打开', + rollListDelete: '删除卷', + rollListPrint: '打印卷标签', + }, + labelsList: [ + { + functionId: functionId, + languageValue: '机台工作台', + objectId: 'reportPageName', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '订单号', + objectId: 'orderNo', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '物料编码', + objectId: 'partNo', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '物料名称/规则', + objectId: 'partDesc', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '派工单号', + objectId: 'seqNo', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '要求完工日期', + objectId: 'needDate', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '要求开工日期', + objectId: 'planStartDate', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '原始派工单需求数量', + objectId: 'lotSize', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '排产日期', + objectId: 'scheduledDate', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '班次', + objectId: 'shiftNo', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '前道工序', + objectId: 'preItemNo', + objectType: 'label', + tableId: '*' + },{ + functionId: functionId, + languageValue: '后道工序', + objectId: 'nextItemNo', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '仅显示当前卷信息', + objectId: 'onlyCurrentRoll', + objectType: 'label', + tableId: '*' + },{ + functionId: functionId, + languageValue: '卷操作', + objectId: 'rollButtons', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '列表信息', + objectId: 'listDesc', + objectType: 'label', + tableId: '*' + },{ + functionId: functionId, + languageValue: '时间', + objectId: 'timeList', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '刀模板记录', + objectId: 'toolList', + objectType: 'label', + tableId: '*' + },{ + functionId: functionId, + languageValue: '材料', + objectId: 'materialList', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '生产卷操作信息', + objectId: 'rollopsList', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '不良记录', + objectId: 'defectList', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '机器下机卷', + objectId: 'rollList', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '生产调机', + objectId: 'produceButtons', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '不良', + objectId: 'defectButtons', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '扫描', + objectId: 'scanButtons', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '停机', + objectId: 'downTimeButtons', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '其他操作', + objectId: 'otherButtons', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '刀模替换', + objectId: 'toolListReplace', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '结束使用', + objectId: 'toolListFinish', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '不良', + objectId: 'defectButtons', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '换料', + objectId: 'materialListReplace', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '下料', + objectId: 'materialListCutting', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '生产结束', + objectId: 'materialListFinish', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '重打开', + objectId: 'rollListReopen', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '删除卷', + objectId: 'rollListDelete', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '打印卷标签', + objectId: 'rollListPrint', + objectType: 'label', + tableId: '*' + }, + ], + queryButton: { + functionId: functionId, + table_id: '*', + languageCode: this.$i18n.locale, + objectType: 'button' + }, + queryLabel: { + functionId: functionId, + table_id: '*', + languageCode: this.$i18n.locale, + objectType: 'label' + }, } }, components: { @@ -3169,7 +3577,7 @@ export default { this.scheduleData.resourceDesc = data.row.resourceDesc; this.scheduleData.preItemNo = data.row.preItemNo; //设置弹窗的标题 - this.titleCon = '机台工作台' + ' - ' + data.row.itemDesc + ' ' + this.titleCon = this.labels.reportPageName + ' - ' + data.row.itemDesc + ' ' + data.row.resourceDesc + ' (' + this.operatorData.operatorName + ')'; }) //刷新页面的卷信息 @@ -3181,7 +3589,7 @@ export default { await this.refreshCurrentTabTable(); //刷新当前的菜单 - await this.refreshPageButtons(); + //await this.refreshPageButtons(); }, @@ -3278,7 +3686,8 @@ export default { notInitOperatorData() { //关闭切换用户的组件 this.showOperatorFlag = false; - $(".controller-bun").addClass("disabled-bun"); + this.buttonTags.finishRollFlag = + //$(".controller-bun").addClass("disabled-bun"); //注销用户的信息 this.operatorData.operatorId = ''; this.operatorData.operatorName = ''; @@ -3298,7 +3707,7 @@ export default { //打开操作员切换功能 this.showOperatorFlag = true; this.$nextTick(() => { - this.$refs.comSwitchOperator.init(); + this.$refs.comSwitchOperator.init(0); }); }, @@ -3671,11 +4080,42 @@ export default { }); }, + // 保存 默认配置 列 + 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()//刷新按钮 } }