Commit f57b806d authored by 黄卓's avatar 黄卓

客户等级设置、客户信用等级设置支持国际化

 https://zentao.test.jdshangmen.com/task-view-1388.html

 信用等级规则设置
parent b2670c39
......@@ -38,7 +38,11 @@
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column :label="$t('主键')" align="center" prop="id" />
<el-table-column :label="$t('规则名称')" align="center" prop="name" />
<el-table-column :label="$t('规则名称')" align="center" prop="name">
<template slot-scope="scope">
{{ isChinese ? scope.row.name : scope.row.nameEn }}
</template>
</el-table-column>
<el-table-column :label="$t('规则分类')" align="center" prop="type">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.CUSTOMER_CREDIT_RULE_TYPE" :value="scope.row.type" />
......@@ -66,10 +70,13 @@
<!-- 对话框(添加 / 修改) -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item :label="$t('规则名称')" prop="name">
<el-input v-model="form.name" :placeholder="$t('请输入规则名称')" />
</el-form-item>
<el-form-item :label="$t('规则英文名称')" prop="nameEn">
<el-input v-model="form.nameEn" :placeholder="$t('请输入规则英文名称')" />
</el-form-item>
<el-form-item :label="$t('规则分类')" prop="type">
<el-select v-model="form.type" :placeholder="$t('请选择规则分类')">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.CUSTOMER_CREDIT_RULE_TYPE)"
......@@ -130,6 +137,7 @@ export default {
// 表单校验
rules: {
name: [{ required: true, message: this.$t('规则名称不能为空'), trigger: "blur" }],
nameEn: [{ required: true, message: this.$t('规则英文名称不能为空'), trigger: "blur" }],
type: [{ required: true, message: this.$t('规则分类不能为空'), trigger: "change" }],
score: [{ required: true, message: this.$t('规则得分不能为空'), trigger: "blur" }],
}
......@@ -244,6 +252,12 @@ export default {
this.exportLoading = false;
}).catch(() => {});
}
},
computed: {
isChinese() {
return this.$i18n.locale === 'zh_CN'
},
}
};
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment