diff --git a/src/views/modules/yieldReport/com_cutting_material.vue b/src/views/modules/yieldReport/com_cutting_material.vue index af66a50..81ea79e 100644 --- a/src/views/modules/yieldReport/com_cutting_material.vue +++ b/src/views/modules/yieldReport/com_cutting_material.vue @@ -7,7 +7,7 @@ - + @@ -15,7 +15,7 @@ - + @@ -25,7 +25,7 @@ - + @@ -35,8 +35,9 @@ - 确定 - 关闭 + {{ buttons.confirmButton }} + {{ buttons.closeButton }} + 对语言设置 @@ -52,10 +53,26 @@ import { printMaterialLabel, } from "@/views/modules/yieldReport/print_roll_label.js" +import { + searchSysLanguagePackList, + searchSysLanguageParam, + searchFunctionButtonList, + saveButtonList, + searchSysLanguage, + searchLanguageListByLanguageCode, + saveSysLanguageOne, + searchPageLanguageData, + removerLanguage, + saveSysLanguageList +} from "@/api/sysLanguage.js"; + +var functionId = 'C10000017'; + export default { data() { return { titleCon: '材料退料', + showDefault: false, sfdcTimeList: [], selectFlag: true, scheduleData: { @@ -109,6 +126,70 @@ export default { showFlag: false }, dataListLoading: false, + buttons: { + confirmButton: '确定', + closeButton: '关闭', + }, + buttonList: [ + { + functionId: functionId, + languageValue: '确定', + objectId: 'confirmButton', + objectType: 'button', + tableId: '*' + }, { + functionId: functionId, + languageValue: '关闭', + objectId: 'closeButton', + objectType: 'button', + tableId: '*' + }, + ], + queryButton: { + functionId: functionId, + table_id: '*', + languageCode: this.$i18n.locale, + objectType: 'button' + }, + labels: { + titleCon: '材料退料', + rmRollNo: '材料卷号:', + transQty: '退料数量:', + bomItemNo: 'BOM序号:', + }, + labelsList: [ + { + functionId: functionId, + languageValue: '材料退料', + objectId: 'titleCon', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '材料卷号:', + objectId: 'rmRollNo', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '退料数量:', + objectId: 'transQty', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: 'BOM序号:', + objectId: 'bomItemNo', + objectType: 'label', + tableId: '*' + }, + ], + queryLabel: { + functionId: functionId, + table_id: '*', + languageCode: this.$i18n.locale, + objectType: 'label' + }, } }, methods: { @@ -137,6 +218,8 @@ export default { }); //清空当前的时间数据 this.timeArray = []; + //重置标题 + this.titleCon = this.labels.titleCon; }, /*关闭modal*/ @@ -189,13 +272,44 @@ export default { this.closeDialog(); } }); + }, + + // 保存 默认配置 列 + 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();//刷新多语言的信息 } } diff --git a/src/views/modules/yieldReport/com_exception_reason.vue b/src/views/modules/yieldReport/com_exception_reason.vue index 095f984..c6ee64a 100644 --- a/src/views/modules/yieldReport/com_exception_reason.vue +++ b/src/views/modules/yieldReport/com_exception_reason.vue @@ -7,15 +7,15 @@ - + - 确 定 - 关闭 + {{ buttons.confirmButton }} + {{ buttons.closeButton }} @@ -27,11 +27,62 @@ export default { data() { return { titleCon: '异常原因', + showDefault: false, pageData: { site: this.$store.state.user.site, username: this.$store.state.user.name, exceptionReason: '' }, + buttons: { + confirmButton: '确定', + closeButton: '关闭', + }, + buttonList: [ + { + functionId: functionId, + languageValue: '确定', + objectId: 'confirmButton', + objectType: 'button', + tableId: '*' + }, { + functionId: functionId, + languageValue: '关闭', + objectId: 'closeButton', + objectType: 'button', + tableId: '*' + }, + ], + queryButton: { + functionId: functionId, + table_id: '*', + languageCode: this.$i18n.locale, + objectType: 'button' + }, + labels: { + titleCon: '异常原因', + exceptionReason: '异常原因:', + }, + labelsList: [ + { + functionId: functionId, + languageValue: '异常原因', + objectId: 'titleCon', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '异常原因:', + objectId: 'exceptionReason', + objectType: 'label', + tableId: '*' + }, + ], + queryLabel: { + functionId: functionId, + table_id: '*', + languageCode: this.$i18n.locale, + objectType: 'label' + }, } }, methods: { @@ -43,7 +94,8 @@ export default { this.$nextTick(() => { this.$refs.exceptionReason.focus(); }); - //什么都不做 + //重置标题 + this.titleCon = this.labels.titleCon; }, /*关闭modal*/ @@ -59,9 +111,40 @@ export default { this.$emit('initExceptionReason', this.pageData.exceptionReason); }, + // 保存 默认配置 列 + 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.getMultiLanguageList();//刷新多语言的信息 } } diff --git a/src/views/modules/yieldReport/com_replace_material.vue b/src/views/modules/yieldReport/com_replace_material.vue index 021be29..c8c02e8 100644 --- a/src/views/modules/yieldReport/com_replace_material.vue +++ b/src/views/modules/yieldReport/com_replace_material.vue @@ -7,12 +7,12 @@
- 换材料 + {{labels.replaceTitle}} - + - + @@ -34,11 +34,11 @@
- 停机 + {{ labels.downTimeTitle }} - + @@ -52,7 +52,7 @@ - + @@ -63,8 +63,9 @@ - 确 定 - 关闭 + {{ buttons.confirmButton }} + {{ buttons.closeButton }} + 对语言设置 @@ -76,10 +77,28 @@ import { connectMaterialRoll, } from '@/api/yieldReport/com_replace_material.js'; + +import { + searchSysLanguagePackList, + searchSysLanguageParam, + searchFunctionButtonList, + saveButtonList, + searchSysLanguage, + searchLanguageListByLanguageCode, + saveSysLanguageOne, + searchPageLanguageData, + removerLanguage, + saveSysLanguageList +} from "@/api/sysLanguage.js"; + +var functionId = 'C10000018'; + + export default { data() { return { titleCon: '换料', + showDefault: false, timeArray: [], scheduleData: { site: this.$store.state.user.site, @@ -144,6 +163,92 @@ export default { rmRollNo: '', }, dataListLoading: false, + buttons: { + confirmButton: '确定', + closeButton: '关闭', + }, + buttonList: [ + { + functionId: functionId, + languageValue: '确定', + objectId: 'confirmButton', + objectType: 'button', + tableId: '*' + }, { + functionId: functionId, + languageValue: '关闭', + objectId: 'closeButton', + objectType: 'button', + tableId: '*' + }, + ], + queryButton: { + functionId: functionId, + table_id: '*', + languageCode: this.$i18n.locale, + objectType: 'button' + }, + labels: { + titleCon: '换料', + replaceTitle: '换材料', + rmRollNo: '材料卷号:', + bomItemNo: 'BOM序号:', + downTimeTitle: '停机', + startTime: '开始时间:', + downTimes: '时长:', + }, + labelsList: [ + { + functionId: functionId, + languageValue: '换料', + objectId: 'titleCon', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '换材料', + objectId: 'replaceTitle', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '材料卷号:', + objectId: 'rmRollNo', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: 'BOM序号:', + objectId: 'bomItemNo', + objectType: 'label', + tableId: '*' + }, + { + functionId: functionId, + languageValue: '停机', + objectId: 'downTimeTitle', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '开始时间:', + objectId: 'startTime', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '时长:', + objectId: 'downTimes', + objectType: 'label', + tableId: '*' + }, + ], + queryLabel: { + functionId: functionId, + table_id: '*', + languageCode: this.$i18n.locale, + objectType: 'label' + }, } }, methods: { @@ -175,6 +280,8 @@ export default { }); //重置校验的标记 this.pageData.checkFlag = false; + //重置标题 + this.titleCon = this.labels.titleCon; }, /*关闭modal*/ @@ -258,10 +365,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();//刷新多语言的信息 } } diff --git a/src/views/modules/yieldReport/com_replace_tool.vue b/src/views/modules/yieldReport/com_replace_tool.vue index 560dd7f..d46d188 100644 --- a/src/views/modules/yieldReport/com_replace_tool.vue +++ b/src/views/modules/yieldReport/com_replace_tool.vue @@ -7,7 +7,7 @@ - + @@ -16,36 +16,36 @@
- 换刀模 + {{labels.replaceToolTitle}} 换刀模 + v-model="pageData.replaceFlag">{{labels.replaceTool}} - + - + - + - + @@ -56,19 +56,19 @@
- 停机 + {{ labels.downTimeTitle }} 停机 + v-model="pageData.downTimeFlag">{{ labels.downTime }} - + @@ -82,7 +82,7 @@ - + @@ -93,8 +93,9 @@ - 确 定 - 关闭 + {{ buttons.confirmButton }} + {{buttons.closeButton}} + 对语言设置 @@ -105,12 +106,28 @@ import { countToolUsedQty, checkConnectToolInstanceId, connectToolInstanceId, -} - from '@/api/yieldReport/com_replace_tool.js'; +} from '@/api/yieldReport/com_replace_tool.js'; + +import { + searchSysLanguagePackList, + searchSysLanguageParam, + searchFunctionButtonList, + saveButtonList, + searchSysLanguage, + searchLanguageListByLanguageCode, + saveSysLanguageOne, + searchPageLanguageData, + removerLanguage, + saveSysLanguageList +} from "@/api/sysLanguage.js"; + +var functionId = 'C10000019'; + export default { data() { return { titleCon: '刀模替换', + showDefault: false, readonlyFlag: true, scheduleData: { site: this.$store.state.user.site, @@ -176,6 +193,126 @@ export default { toolInstanceId: '' }, dataListLoading: false, + buttons: { + confirmButton: '确定', + closeButton: '关闭', + }, + buttonList: [ + { + functionId: functionId, + languageValue: '确定', + objectId: 'confirmButton', + objectType: 'button', + tableId: '*' + }, { + functionId: functionId, + languageValue: '关闭', + objectId: 'closeButton', + objectType: 'button', + tableId: '*' + }, + ], + queryButton: { + functionId: functionId, + table_id: '*', + languageCode: this.$i18n.locale, + objectType: 'button' + }, + labels: { + titleCon: '刀模替换', + toolInstanceId: '工具实例编码:', + replaceToolTitle: '换刀模', + replaceTool: '换刀模', + oriToolInstanceId: '原工具实例编码:', + currentProdQty: '本卷生产数量:', + oriProdQty: '之前卷以生产数量:', + totalProdQty: '累计生产数量:', + downTimeTitle: '停机', + downTime: '停机', + startTime: '开始时间:', + downTimes: '时长:', + }, + labelsList: [ + { + functionId: functionId, + languageValue: '刀模替换', + objectId: 'titleCon', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '工具实例编码:', + objectId: 'toolInstanceId', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '换刀模', + objectId: 'replaceToolTitle', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '换刀模', + objectId: 'replaceTool', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '原工具实例编码:', + objectId: 'oriToolInstanceId', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '本卷生产数量:', + objectId: 'currentProdQty', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '之前卷以生产数量:', + objectId: 'oriProdQty', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '累计生产数量:', + objectId: 'totalProdQty', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '停机', + objectId: 'downTimeTitle', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '停机', + objectId: 'downTime', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '开始时间:', + objectId: 'startTime', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '时长:', + objectId: 'downTimes', + objectType: 'label', + tableId: '*' + }, + ], + queryLabel: { + functionId: functionId, + table_id: '*', + languageCode: this.$i18n.locale, + objectType: 'label' + }, } }, methods: { @@ -215,6 +352,9 @@ export default { }); //刷新当前工具实例的数量数据 this.refreshToolUsedQty(); + + //重置标题 + this.titleCon = this.labels.titleCon; }, /*添加刀模记录*/ @@ -338,10 +478,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();//刷新多语言的信息 } }