Browse Source

多语言

master
DOUDOU 3 years ago
parent
commit
d392b05955
  1. 126
      src/views/modules/yieldReport/com_produce_down.vue
  2. 117
      src/views/modules/yieldReport/com_produce_material.vue
  3. 20
      src/views/modules/yieldReport/com_produce_tool.vue

126
src/views/modules/yieldReport/com_produce_down.vue

@ -70,6 +70,7 @@
关闭</el-button> 关闭</el-button>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-button v-if="showDefault" @click="saveMultiLanguage()" type="primary">对语言设置</el-button>
</el-row> </el-row>
</el-form> </el-form>
@ -87,12 +88,28 @@ import Chooselist from '@/views/modules/common/Chooselist';/*列表组件*/
import { import {
checkDownTimeCode, checkDownTimeCode,
reportDownTime, reportDownTime,
}
from '@/api/yieldReport/com_produce_down.js';
}from '@/api/yieldReport/com_produce_down.js';
import {
searchSysLanguagePackList,
searchSysLanguageParam,
searchFunctionButtonList,
saveButtonList,
searchSysLanguage,
searchLanguageListByLanguageCode,
saveSysLanguageOne,
searchPageLanguageData,
removerLanguage,
saveSysLanguageList
} from "@/api/sysLanguage.js";
var functionId = 'C10000014';
export default { export default {
data() { data() {
return { return {
titleCon: '报告停机', titleCon: '报告停机',
showDefault: false,
sfdcTimeList: [], sfdcTimeList: [],
scheduleData: { scheduleData: {
site: this.$store.state.user.site, site: this.$store.state.user.site,
@ -145,6 +162,77 @@ export default {
createRollFlag: true createRollFlag: true
}, },
dataListLoading: false, dataListLoading: false,
buttons: {
insertButton: '插入',
closeButton: '关闭',
},
buttonList: [
{
functionId: functionId,
languageValue: '插入',
objectId: 'insertButton',
objectType: 'button',
tableId: '*'
}, {
functionId: functionId,
languageValue: '关闭',
objectId: 'closeButton',
objectType: 'button',
tableId: '*'
},
],
queryButton: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'button'
},
labels: {
titleCon: '报告停机',
startTime: '开始时间:',
downTimes: '时长:',
downTimeCode: '停机代码:',
downTimeDesc: '停机描述:',
},
labelsList: [
{
functionId: functionId,
languageValue: '报告停机',
objectId: 'titleCon',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '开始时间:',
objectId: 'startTime',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '时长:',
objectId: 'downTimes',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '停机代码:',
objectId: 'downTimeCode',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '停机描述:',
objectId: 'downTimeDesc',
objectType: 'label',
tableId: '*'
},
],
queryLabel: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'label'
},
} }
}, },
/*组件*/ /*组件*/
@ -176,6 +264,8 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.totalTime.focus(); this.$refs.totalTime.focus();
}); });
//
this.titleCon = this.labels.titleCon;
}, },
/*关闭modal*/ /*关闭modal*/
@ -233,6 +323,37 @@ 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}) => {
// })
}
});
},
}, },
/*监听器*/ /*监听器*/
watch:{ watch:{
@ -246,6 +367,7 @@ export default {
created() { created() {
// this.factoryList() // this.factoryList()
// this.getLanguageList() // this.getLanguageList()
this.getMultiLanguageList();//
} }
} }

117
src/views/modules/yieldReport/com_produce_material.vue

@ -7,7 +7,7 @@
<!-- 材料卷号和BOM序号 --> <!-- 材料卷号和BOM序号 -->
<el-row> <el-row>
<el-col :span="16"> <el-col :span="16">
<el-form-item :label="'材料卷号:'">
<el-form-item :label=labels.rmRollNo>
<el-input ref="scanRmRollNo" @keyup.native="recordTime" <el-input ref="scanRmRollNo" @keyup.native="recordTime"
@keyup.enter.native="checkRmRollNo" @keyup.enter.native="checkRmRollNo"
v-model="pageData.scanRmRollNo" v-model="pageData.scanRmRollNo"
@ -18,7 +18,7 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="16"> <el-col :span="16">
<el-form-item :label="'BOM 序号:'">
<el-form-item :label=labels.bomItemNo>
<el-select v-model="pageData.bomItemNo" :disabled="selectFlag" style="width: 120px"> <el-select v-model="pageData.bomItemNo" :disabled="selectFlag" style="width: 120px">
<el-option <el-option
v-for="(item, index) in bomList" v-for="(item, index) in bomList"
@ -33,8 +33,9 @@
</el-form> </el-form>
</el-container> </el-container>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button type="primary" @click="feedingMaterialRollFun">确定</el-button>
<el-button type="primary" @click="closeDialog">关闭</el-button>
<el-button type="primary" @click="feedingMaterialRollFun">{{ 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>
@ -45,10 +46,27 @@ import {
getBomItemNosByPartNo, getBomItemNosByPartNo,
feedingMaterialRoll, feedingMaterialRoll,
} from "@/api/yieldReport/com_produce_material.js"; } from "@/api/yieldReport/com_produce_material.js";
import {
searchSysLanguagePackList,
searchSysLanguageParam,
searchFunctionButtonList,
saveButtonList,
searchSysLanguage,
searchLanguageListByLanguageCode,
saveSysLanguageOne,
searchPageLanguageData,
removerLanguage,
saveSysLanguageList
} from "@/api/sysLanguage.js";
var functionId = 'C10000013';
export default { export default {
data() { data() {
return { return {
titleCon: '材料', titleCon: '材料',
showDefault: false,
sfdcTimeList: [], sfdcTimeList: [],
selectFlag: true, selectFlag: true,
scheduleData: { scheduleData: {
@ -101,6 +119,63 @@ export default {
showFlag: false showFlag: false
}, },
dataListLoading: 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: '材料卷号:',
bomItemNo: 'BOM序号:',
},
labelsList: [
{
functionId: functionId,
languageValue: '材料',
objectId: 'titleCon',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '材料卷号:',
objectId: 'rmRollNo',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: 'BOM序号:',
objectId: 'bomItemNo',
objectType: 'label',
tableId: '*'
},
],
queryLabel: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'label'
},
} }
}, },
methods: { methods: {
@ -127,6 +202,9 @@ export default {
}); });
// //
this.timeArray = []; this.timeArray = [];
//
this.titleCon = this.labels.titleCon;
}, },
/*关闭modal*/ /*关闭modal*/
@ -218,13 +296,44 @@ export default {
this.timeArray = []; this.timeArray = [];
} }
}); });
},
//
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();//
} }
} }
</script> </script>

20
src/views/modules/yieldReport/com_produce_tool.vue

@ -7,7 +7,7 @@
<!-- 扫描工具实例编码 --> <!-- 扫描工具实例编码 -->
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="'工具实例编号:'">
<el-form-item :label=labels.toolInstanceId>
<el-input ref="toolInstanceId" v-model="pageData.toolInstanceId" <el-input ref="toolInstanceId" v-model="pageData.toolInstanceId"
@keyup.enter.native="checkToolInstanceIdFun" style="width: 120px"></el-input> @keyup.enter.native="checkToolInstanceIdFun" style="width: 120px"></el-input>
</el-form-item> </el-form-item>
@ -16,36 +16,36 @@
<!-- 换刀模 --> <!-- 换刀模 -->
<el-container> <el-container>
<fieldset class="customer-fieldset" style="width: 280px;"> <fieldset class="customer-fieldset" style="width: 280px;">
<legend>换刀模</legend>
<legend>{{labels.replaceToolTitle}}</legend>
<el-row> <el-row>
<el-col :span="16"> <el-col :span="16">
<el-form-item class="customer-item"> <el-form-item class="customer-item">
<el-checkbox disabled="disabled" true-label="Y" false-label="N" <el-checkbox disabled="disabled" true-label="Y" false-label="N"
v-model="pageData.replaceFlag">换刀模</el-checkbox>
v-model="pageData.replaceFlag">{{labels.replaceTool}}</el-checkbox>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<!-- 原工具信息 --> <!-- 原工具信息 -->
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item class="customer-item" label="原工具实例编码:">
<el-form-item class="customer-item" :label=labels.oriToolInstanceId>
<el-input v-model="pageData.oriToolInstanceId" :readonly="readonlyFlag" style="width: 100px;" ></el-input> <el-input v-model="pageData.oriToolInstanceId" :readonly="readonlyFlag" style="width: 100px;" ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item class="customer-item" label="本卷生产数量:">
<el-form-item class="customer-item" :label=labels.currentRollProdQty>
<el-input v-model="pageData.consumeQty" :readonly="readonlyFlag" style="width: 100px;" ></el-input> <el-input v-model="pageData.consumeQty" :readonly="readonlyFlag" style="width: 100px;" ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item class="customer-item" label="之前卷以生产数量:">
<el-form-item class="customer-item" :label=labels.oriRollProdQty>
<el-input v-model="pageData.oriConsumeQty" :readonly="readonlyFlag" style="width: 100px;" ></el-input> <el-input v-model="pageData.oriConsumeQty" :readonly="readonlyFlag" style="width: 100px;" ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item class="customer-item" label="累计生产数量:">
<el-form-item class="customer-item" :label=labels.totalRollProdQty>
<el-input v-model="pageData.totalConsumeQty" :readonly="readonlyFlag" style="width: 100px;" ></el-input> <el-input v-model="pageData.totalConsumeQty" :readonly="readonlyFlag" style="width: 100px;" ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -56,8 +56,8 @@
</el-form> </el-form>
</el-container> </el-container>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button type="primary" @click="addToolInstanceIdFun"> </el-button>
<el-button type="primary" @click="closeDialog">关闭</el-button>
<el-button type="primary" @click="addToolInstanceIdFun">{{ 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> <el-button v-if="showDefault" @click="saveMultiLanguage()" type="primary">对语言设置</el-button>
</span> </span>
</el-dialog> </el-dialog>
@ -184,7 +184,7 @@ export default {
tableId: '*' tableId: '*'
}, { }, {
functionId: functionId, functionId: functionId,
languageValue: '换刀模:',
languageValue: '换刀模',
objectId: 'replaceToolTitle', objectId: 'replaceToolTitle',
objectType: 'label', objectType: 'label',
tableId: '*' tableId: '*'

Loading…
Cancel
Save