|
@@ -1,11 +1,11 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
<div class="search">
|
|
|
- <el-select v-model="table.getdataListParm.parammaps.bigfeedclassname" filterable placeholder="饲料大类" class="filter-item" style="width: 120px;" clearable>
|
|
|
+ <el-select v-model="table.getdataListParm.parammaps.bigfeedclassname" filterable :placeholder="$t('feedChart.sldl')" class="filter-item" style="width: 120px;" clearable>
|
|
|
<el-option v-for="item in feedCategoryList" :key="item.value" :label="item.label" :value="item.label" />
|
|
|
</el-select>
|
|
|
- <el-input v-model="table.getdataListParm.parammaps.fcname" placeholder="饲料分类名称" style="width: 180px;" class="filter-item" clearable />
|
|
|
- <el-input v-model="table.getdataListParm.parammaps.fccode" placeholder="饲料分类编号" style="width: 180px;" class="filter-item" clearable />
|
|
|
+ <el-input v-model="table.getdataListParm.parammaps.fcname" :placeholder="$t('feedChart.slflmc')" style="width: 180px;" class="filter-item" clearable />
|
|
|
+ <el-input v-model="table.getdataListParm.parammaps.fccode" :placeholder="$t('feedChart.slflbh')" style="width: 180px;" class="filter-item" clearable />
|
|
|
<el-select v-model="table.getdataListParm.parammaps.enable" filterable :placeholder="$t('formulationEvaluation.sfqy')" class="filter-item" style="width: 120px;" clearable>
|
|
|
<el-option v-for="item in enableList" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
</el-select>
|
|
@@ -38,21 +38,21 @@
|
|
|
<span v-else>1</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="饲料大类" min-width="130px" align="center">
|
|
|
+ <el-table-column :label="$t('feedChart.sldl')" min-width="130px" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<span v-if="scope.row.NoEdit">{{ scope.row.bigfeedclassname }}</span>
|
|
|
- <el-select v-if="scope.row.Edit" v-model="scope.row.bigfeedclassid" filterable placeholder="饲料大类" class="filter-item" style="width:95%;padding:10px 0;" @change="changeBigfeedclass">
|
|
|
+ <el-select v-if="scope.row.Edit" v-model="scope.row.bigfeedclassid" filterable :placeholder="$t('feedChart.sldl')" class="filter-item" style="width:95%;padding:10px 0;" @change="changeBigfeedclass">
|
|
|
<el-option v-for="item in feedCategoryList" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
</el-select>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="饲料分类" min-width="130px" align="center">
|
|
|
+ <el-table-column :label="$t('feedChart.slflmc')" min-width="130px" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<span v-if="scope.row.NoEdit">{{ scope.row.fcname }}</span>
|
|
|
<el-input v-if="scope.row.Edit" v-model="scope.row.fcname" type="textarea" :autosize="{ minRows: 1.3, maxRows: 4}" style="width:95%;padding:10px 0;" maxlength="32" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="饲料分类编号" min-width="110px" align="center">
|
|
|
+ <el-table-column :label="$t('feedChart.slflbh')" min-width="110px" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<span v-if="scope.row.NoEdit">{{ scope.row.fccode }}</span>
|
|
|
<el-input v-if="scope.row.Edit" v-model="scope.row.fccode" type="textarea" :autosize="{ minRows: 1.3, maxRows: 4}" style="width:95%;padding:10px 0;" maxlength="32" />
|
|
@@ -218,29 +218,29 @@ export default {
|
|
|
|
|
|
// 饲料大类/饲料分类/饲料分类编号是否为空
|
|
|
if (this.table.temp.bigfeedclassid == '' && this.table.temp.fcname == '' && this.table.temp.fccode == '') {
|
|
|
- this.$message({ type: 'error', message: '饲料大类/饲料分类/饲料分类编号不能为空', duration: 2000 })
|
|
|
+ this.$message({ type: 'error', message: this.$t('feedChart.sldlflbh'), duration: 2000 })
|
|
|
return false
|
|
|
} else if (this.table.temp.fcname == '' && this.table.temp.fccode == '') {
|
|
|
- this.$message({ type: 'error', message: '饲料分类/饲料分类编号不能为空', duration: 2000 })
|
|
|
+ this.$message({ type: 'error', message: this.$t('feedChart.slflbh'), duration: 2000 })
|
|
|
return false
|
|
|
} else if (this.table.temp.bigfeedclassid == '') {
|
|
|
- this.$message({ type: 'error', message: '饲料大类不能为空', duration: 2000 })
|
|
|
+ this.$message({ type: 'error', message: this.$t('feedChart.sldlno'), duration: 2000 })
|
|
|
return false
|
|
|
} else if (this.table.temp.fcname == '') {
|
|
|
- this.$message({ type: 'error', message: '饲料分类不能为空', duration: 2000 })
|
|
|
+ this.$message({ type: 'error', message: this.$t('feedChart.slflno'), duration: 2000 })
|
|
|
return false
|
|
|
} else if (this.table.temp.fccode == '') {
|
|
|
- this.$message({ type: 'error', message: '饲料分类编号不能为空', duration: 2000 })
|
|
|
+ this.$message({ type: 'error', message: this.$t('feedChart.slbhno'), duration: 2000 })
|
|
|
return false
|
|
|
}
|
|
|
|
|
|
const pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?]")
|
|
|
if (pattern.test(this.table.temp.fccode)) {
|
|
|
- this.$message({ type: 'error', message: '饲料分类编号不可输入特殊字符', duration: 2000 })
|
|
|
+ this.$message({ type: 'error', message: this.$t('feedChart.slfltszi'), duration: 2000 })
|
|
|
return false
|
|
|
}
|
|
|
if (pattern.test(this.table.temp.fcname)) {
|
|
|
- this.$message({ type: 'error', message: '饲料分类不可输入特殊字符', duration: 2000 })
|
|
|
+ this.$message({ type: 'error', message: this.$t('feedChart.slfltszi'), duration: 2000 })
|
|
|
return false
|
|
|
}
|
|
|
this.isokDisable = true
|
|
@@ -302,29 +302,29 @@ export default {
|
|
|
|
|
|
// 饲料大类/饲料分类/饲料分类编号是否为空
|
|
|
if (this.table.temp.bigfeedclassid == '' && this.table.temp.fcname == '' && this.table.temp.fccode == '') {
|
|
|
- this.$message({ type: 'error', message: '饲料大类/饲料分类/饲料分类编号不能为空', duration: 2000 })
|
|
|
+ this.$message({ type: 'error', message: this.$t('feedChart.sldlflbh'), duration: 2000 })
|
|
|
return false
|
|
|
} else if (this.table.temp.fcname == '' && this.table.temp.fccode == '') {
|
|
|
- this.$message({ type: 'error', message: '饲料分类/饲料分类编号不能为空', duration: 2000 })
|
|
|
+ this.$message({ type: 'error', message: this.$t('feedChart.slflbh'), duration: 2000 })
|
|
|
return false
|
|
|
} else if (this.table.temp.bigfeedclassid == '') {
|
|
|
- this.$message({ type: 'error', message: '饲料大类不能为空', duration: 2000 })
|
|
|
+ this.$message({ type: 'error', message: this.$t('feedChart.sldlno'), duration: 2000 })
|
|
|
return false
|
|
|
} else if (this.table.temp.fcname == '') {
|
|
|
- this.$message({ type: 'error', message: '饲料分类不能为空', duration: 2000 })
|
|
|
+ this.$message({ type: 'error', message: this.$t('feedChart.slflno'), duration: 2000 })
|
|
|
return false
|
|
|
} else if (this.table.temp.fccode == '') {
|
|
|
- this.$message({ type: 'error', message: '饲料分类编号不能为空', duration: 2000 })
|
|
|
+ this.$message({ type: 'error', message: this.$t('feedChart.slbhno'), duration: 2000 })
|
|
|
return false
|
|
|
}
|
|
|
|
|
|
const pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?]")
|
|
|
if (pattern.test(this.table.temp.fccode)) {
|
|
|
- this.$message({ type: 'error', message: '饲料分类编号不可输入特殊字符', duration: 2000 })
|
|
|
+ this.$message({ type: 'error', message: this.$t('feedChart.slfltszi'), duration: 2000 })
|
|
|
return false
|
|
|
}
|
|
|
if (pattern.test(this.table.temp.fcname)) {
|
|
|
- this.$message({ type: 'error', message: '饲料分类不可输入特殊字符', duration: 2000 })
|
|
|
+ this.$message({ type: 'error', message: this.$t('feedChart.slfltszi'), duration: 2000 })
|
|
|
return false
|
|
|
}
|
|
|
this.isokDisable = true
|
|
@@ -391,7 +391,7 @@ export default {
|
|
|
form_delete() {
|
|
|
console.log('点击了删除')
|
|
|
if (this.selectList.length == 0) {
|
|
|
- this.$message({ type: 'error', message: '请选择饲料分类信息', duration: 2000 })
|
|
|
+ this.$message({ type: 'error',message: this.$t('feedChart.slflxx'), duration: 2000 })
|
|
|
} else {
|
|
|
MessageBox.confirm('当前选中' + this.selectList.length + '条信息,是否删除?', {
|
|
|
confirmButtonText: this.$t('common.confirm'), confirmButtonText: this.$t('common.cancel'), type: 'warning'
|