Browse Source

多语言

master
DOUDOU 3 years ago
parent
commit
9ba6533278
  1. 124
      src/views/modules/yieldReport/com_cutting_material.vue
  2. 93
      src/views/modules/yieldReport/com_exception_reason.vue
  3. 155
      src/views/modules/yieldReport/com_replace_material.vue
  4. 202
      src/views/modules/yieldReport/com_replace_tool.vue

124
src/views/modules/yieldReport/com_cutting_material.vue

@ -7,7 +7,7 @@
<!-- 材料卷号和BOM序号 -->
<el-row>
<el-col :span="16">
<el-form-item :label="'材料卷号:'">
<el-form-item :label=labels.rmRollNo>
<el-input v-model="pageData.rmRollNo" disabled="disabled" style="width: 120px">
</el-input>
</el-form-item>
@ -15,7 +15,7 @@
</el-row>
<el-row>
<el-col :span="16">
<el-form-item :label="'退料数量:'">
<el-form-item :label=labels.transQty>
<el-input ref="transQty" @blur="checkValidQty"
v-model="pageData.transQty"
style="width: 120px">
@ -25,7 +25,7 @@
</el-row>
<el-row>
<el-col :span="16">
<el-form-item :label="'BOM 序号:'">
<el-form-item :label=labels.bomItemNo>
<el-input v-model="pageData.bomItemNo" disabled="disabled"
style="width: 120px">
</el-input>
@ -35,8 +35,9 @@
</el-form>
</el-container>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="processCuttingMaterialBun">确定</el-button>
<el-button type="primary" @click="closeDialog">关闭</el-button>
<el-button type="primary" @click="processCuttingMaterialBun">{{ 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>
</el-dialog>
</div>
@ -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();//
}
}
</script>

93
src/views/modules/yieldReport/com_exception_reason.vue

@ -7,15 +7,15 @@
<!-- 菜单信息 -->
<el-row>
<el-col :span="24" >
<el-form-item :label="'异常原因:'" >
<el-form-item :label=labels.exceptionReason>
<el-input type="textarea" class="customer-textarea" ref="exceptionReason" v-model="pageData.exceptionReason" :rows="3" :cols="66"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer" style="margin-top: -20px;">
<el-button type="primary" @click="addExceptionReason"> </el-button>
<el-button type="primary" @click="closeDialog">关闭</el-button>
<el-button type="primary" @click="addExceptionReason">{{ buttons.confirmButton }}</el-button>
<el-button type="primary" @click="closeDialog">{{ buttons.closeButton }}</el-button>
</span>
</el-dialog>
</div>
@ -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();//
}
}

155
src/views/modules/yieldReport/com_replace_material.vue

@ -7,12 +7,12 @@
<!-- 换材料 -->
<el-container>
<fieldset class="customer-fieldset" style="width: 165px;">
<legend>换材料</legend>
<legend>{{labels.replaceTitle}}</legend>
<!-- 材料卷号 序号 -->
<!-- 材料卷号和BOM序号 -->
<el-row>
<el-col :span="16">
<el-form-item :label="'材料卷号:'">
<el-form-item :label=labels.rmRollNo>
<el-input ref="rmRollNo" @keyup.native="recordTime"
@keyup.enter.native="checkRmRollNoBun"
v-model="pageData.rmRollNo"
@ -23,7 +23,7 @@
</el-row>
<el-row>
<el-col :span="16">
<el-form-item :label="'BOM 序号:'">
<el-form-item :label=labels.bomItemNo>
<el-input v-model="pageData.bomItemNo" readonly style="width: 120px"></el-input>
</el-form-item>
</el-col>
@ -34,11 +34,11 @@
<!-- 停机信息 -->
<el-container style="margin-left: 170px; margin-top: -120px;">
<fieldset class="customer-fieldset" style="width: 210px;">
<legend>停机</legend>
<legend>{{ labels.downTimeTitle }}</legend>
<!-- 原工具信息 -->
<el-row>
<el-col :span="12">
<el-form-item class="customer-item" label="开始时间:">
<el-form-item class="customer-item" :label=labels.startTime>
<el-date-picker v-model="pageData.reportDate" format="yyyy-MM-dd"
value-format="yyyy-MM-dd" style="width: 100px;"></el-date-picker>
</el-form-item>
@ -52,7 +52,7 @@
</el-row>
<el-row>
<el-col :span="12">
<el-form-item class="customer-item" label="时长:">
<el-form-item class="customer-item" :label=labels.downTimes>
<el-input v-model="pageData.downTimeQty" @blur="changeTimeQty"type="number" style="width: 100px;" ></el-input>
</el-form-item>
</el-col>
@ -63,8 +63,9 @@
</el-form>
</el-container>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="connectMaterialRollBun"> </el-button>
<el-button type="primary" @click="closeDialog">关闭</el-button>
<el-button type="primary" @click="connectMaterialRollBun">{{ 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>
</el-dialog>
</div>
@ -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();//
}
}

202
src/views/modules/yieldReport/com_replace_tool.vue

@ -7,7 +7,7 @@
<!-- 扫描工具实例编码 -->
<el-row>
<el-col :span="12">
<el-form-item :label="'工具实例编号:'">
<el-form-item :label=labels.toolInstanceId>
<el-input ref="toolInstanceId" v-model="pageData.toolInstanceId"
@keyup.enter.native="checkConnectToolInstanceIdBun" style="width: 120px"></el-input>
</el-form-item>
@ -16,36 +16,36 @@
<!-- 换刀模 -->
<el-container>
<fieldset class="customer-fieldset" style="width: 230px;">
<legend>换刀模</legend>
<legend>{{labels.replaceToolTitle}}</legend>
<el-row>
<el-col :span="16">
<el-form-item class="customer-item">
<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-col>
</el-row>
<!-- 原工具信息 -->
<el-row>
<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-form-item>
</el-col>
<el-col :span="12">
<el-form-item class="customer-item" label="本卷生产数量:">
<el-form-item class="customer-item" :label=labels.currentProdQty>
<el-input v-model="pageData.consumeQty" type="number" @blur="changeToolQty" style="width: 100px;" ></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item class="customer-item" label="之前卷以生产数量:">
<el-form-item class="customer-item" :label=labels.oriProdQty>
<el-input v-model="pageData.oriConsumeQty" type="number" :readonly="readonlyFlag" style="width: 100px;" ></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item class="customer-item" label="累计生产数量:">
<el-form-item class="customer-item" :label=labels.totalProdQty>
<el-input v-model="pageData.totalConsumeQty" type="number" :readonly="readonlyFlag" style="width: 100px;" ></el-input>
</el-form-item>
</el-col>
@ -56,19 +56,19 @@
<!-- 停机信息 -->
<el-container style="margin-left: 235px; margin-top: -144px;">
<fieldset class="customer-fieldset" style="width: 210px;">
<legend>停机</legend>
<legend>{{ labels.downTimeTitle }}</legend>
<el-row>
<el-col :span="16">
<el-form-item class="customer-item">
<el-checkbox disabled="disabled" true-label="Y" false-label="N"
v-model="pageData.downTimeFlag">停机</el-checkbox>
v-model="pageData.downTimeFlag">{{ labels.downTime }}</el-checkbox>
</el-form-item>
</el-col>
</el-row>
<!-- 原工具信息 -->
<el-row>
<el-col :span="12">
<el-form-item class="customer-item" label="开始时间:">
<el-form-item class="customer-item" :label=labels.startTime>
<el-date-picker v-model="pageData.reportDate" format="yyyy-MM-dd"
value-format="yyyy-MM-dd" style="width: 100px;"></el-date-picker>
</el-form-item>
@ -82,7 +82,7 @@
</el-row>
<el-row>
<el-col :span="12">
<el-form-item class="customer-item" label="时长:">
<el-form-item class="customer-item" :label=labels.downTimes>
<el-input v-model="pageData.downTimeQty" @blur="changeTimeQty"type="number" style="width: 100px;" ></el-input>
</el-form-item>
</el-col>
@ -93,8 +93,9 @@
</el-form>
</el-container>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="connectToolInstanceIdBun"> </el-button>
<el-button type="primary" @click="closeDialog">关闭</el-button>
<el-button type="primary" @click="connectToolInstanceIdBun">{{ 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>
</el-dialog>
</div>
@ -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();//
}
}

Loading…
Cancel
Save