Browse Source

创建分卷多语言

master
DOUDOU 3 years ago
parent
commit
856d9f2876
  1. 6
      src/views/modules/yieldReport/com_produce_report_normal.vue
  2. 119
      src/views/modules/yieldReport/com_separate_roll.vue

6
src/views/modules/yieldReport/com_produce_report_normal.vue

@ -3038,7 +3038,7 @@ export default {
} }
], ],
labels: { labels: {
reportPageName: '机台工作台',
componentTitle: '机台工作台',
orderNo: '订单号', orderNo: '订单号',
partNo: '物料编码', partNo: '物料编码',
partDesc: '物料名称/规则', partDesc: '物料名称/规则',
@ -3077,7 +3077,7 @@ export default {
{ {
functionId: functionId, functionId: functionId,
languageValue: '机台工作台', languageValue: '机台工作台',
objectId: 'reportPageName',
objectId: 'componentTitle',
objectType: 'label', objectType: 'label',
tableId: '*' tableId: '*'
}, { }, {
@ -3577,7 +3577,7 @@ export default {
this.scheduleData.resourceDesc = data.row.resourceDesc; this.scheduleData.resourceDesc = data.row.resourceDesc;
this.scheduleData.preItemNo = data.row.preItemNo; this.scheduleData.preItemNo = data.row.preItemNo;
// //
this.titleCon = this.labels.reportPageName + ' - ' + data.row.itemDesc + ' '
this.titleCon = this.labels.componentTitle + ' - ' + data.row.itemDesc + ' '
+ data.row.resourceDesc + ' (' + this.operatorData.operatorName + ')'; + data.row.resourceDesc + ' (' + this.operatorData.operatorName + ')';
}) })
// //

119
src/views/modules/yieldReport/com_separate_roll.vue

@ -44,8 +44,9 @@
</el-row> </el-row>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button type="primary" @click="checkCreateSeparateRolllBun"> </el-button>
<el-button type="primary" @click="closeDialog">关闭</el-button>
<el-button type="primary" @click="checkCreateSeparateRolllBun">{{ buttons.confirmButton }}</el-button>
<el-button type="primary" @click="closeDialog">{{ buttons.closeButton }}</el-button>
<el-button v-if="showDefault" @click="saveMultiLanguage()" type="primary">对语言设置</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
@ -62,11 +63,27 @@
printSfdcLabel, printSfdcLabel,
} from "@/views/modules/yieldReport/print_roll_label.js"; } 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 = 'C10000004';
export default { export default {
name: "com_separate_roll", name: "com_separate_roll",
data() { data() {
return { return {
titleCon: '创建分卷', titleCon: '创建分卷',
showDefault: false,
scheduleData: { scheduleData: {
site: this.$store.state.user.site, site: this.$store.state.user.site,
username: this.$store.state.user.name, username: this.$store.state.user.name,
@ -114,6 +131,70 @@ export default {
seqNo: '', seqNo: '',
showFlag: false showFlag: 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: {
componentTitle: '创建分卷',
currentTime: '当前时间:',
rollQty: '良品数量:',
rollNums: '卷数:',
},
labelsList: [
{
functionId: functionId,
languageValue: '创建分卷',
objectId: 'componentTitle',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '当前时间:',
objectId: 'currentTime',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '良品数量:',
objectId: 'rollQty',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '卷数:',
objectId: 'rollNums',
objectType: 'label',
tableId: '*'
},
],
queryLabel: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'label'
},
} }
}, },
methods: { methods: {
@ -139,6 +220,7 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.rollQty.focus(); this.$refs.rollQty.focus();
}); });
this.titleCon = this.labels.componentTitle;//
}, },
/*关闭modal*/ /*关闭modal*/
@ -234,10 +316,43 @@ 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() { created() {
// this.factoryList() // this.factoryList()
// this.getLanguageList() // this.getLanguageList()
this.getMultiLanguageList()//
} }
} }

Loading…
Cancel
Save