Browse Source

多语言

master
DOUDOU 3 years ago
parent
commit
1b6532e116
  1. 142
      src/views/modules/yieldReport/com_merge_roll.vue

142
src/views/modules/yieldReport/com_merge_roll.vue

@ -7,12 +7,12 @@
<!-- 当前卷 -->
<el-row>
<el-col :span="10">
<el-form-item class="customer-item" label="当前卷号:">
<el-form-item class="customer-item" :label=labels.currentRollNo>
<el-input v-model="pageData.rollNo" readonly style="width: 100px;" ></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="customer-item" label="当前卷数量:">
<el-form-item class="customer-item" :label=labels.currentRollQty>
<el-input v-model="pageData.rollQty" @blur="checkValidQty" style="width: 80px;"></el-input>
</el-form-item>
</el-col>
@ -24,25 +24,26 @@
<!-- 新卷 -->
<el-row>
<el-col :span="10">
<el-form-item class="customer-item" label="新卷卷号:">
<el-form-item class="customer-item" :label=labels.newRollNo>
<el-input ref="newRollNo" v-model="pageData.newRollNo" style="width: 100px;"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="customer-item" label="新卷数量:">
<el-form-item class="customer-item" :label=labels.newRollQty>
<el-input v-model="pageData.newRollQty" @blur="checkValidQty" style="width: 80px;" ></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item class="customer-item" label="总数量:">
<el-form-item class="customer-item" :label=labels.totalQty>
<el-input v-model="pageData.totalQty" readonly style="width: 60px;"></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="warnMergeSfdcRollsConfirm"> </el-button>
<el-button type="primary" @click="closeDialog">关闭</el-button>
<el-button type="primary" @click="warnMergeSfdcRollsConfirm">{{ 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>
@ -61,10 +62,26 @@
printSfdcLabel,
} 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 = 'C10000006';
export default {
data() {
return {
titleCon: '合并卷',
showDefault: false,
rollType: '',
scheduleData: {
site: this.$store.state.user.site,
@ -120,6 +137,84 @@ export default {
seqNo: '',
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: {
titleCon: '合并卷',
currentRollNo: '当前卷号:',
currentRollQty: '当前卷数量:',
newRollNo: '新卷卷号:',
newRollQty: '新卷数量:',
totalQty: '总数量:',
},
labelsList: [
{
functionId: functionId,
languageValue: '合并卷',
objectId: 'titleCon',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '当前卷号:',
objectId: 'currentRollNo',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '当前卷数量:',
objectId: 'currentRollQty',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '新卷卷号:',
objectId: 'newRollNo',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '新卷数量:',
objectId: 'newRollQty',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '总数量:',
objectId: 'totalQty',
objectType: 'label',
tableId: '*'
},
],
queryLabel: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'label'
},
}
},
methods: {
@ -146,6 +241,7 @@ export default {
this.$nextTick(() => {
this.$refs.newRollNo.focus();
});
this.titleCon = this.labels.titleCon;//
},
/*刷新页面的参数*/
@ -365,10 +461,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