Commit 34491537 authored by Smile's avatar Smile Committed by wux

会员等级手动配置显示修改

parent b231ccd2
...@@ -461,12 +461,12 @@ ...@@ -461,12 +461,12 @@
</el-tabs> </el-tabs>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :title="levelDetailsTitle" :visible.sync="levelDetailsShow" width="50%" :rules="rulesEnterprise" :model="levelDetails" label-position="left" ref="formEnter" label-width="100px"> <el-dialog :title="levelDetailsTitle" :visible.sync="levelDetailsShow" width="50%">
<el-form> <el-form :rules="rulesDetails" :model="levelDetails" label-position="left" ref="formDetails" label-width="100px">
<el-form-item :label="$t('编号:')"> <el-form-item :label="$t('编号:')">
<el-input v-model="levelDetails.ruleNumber" style="width: 50%" disabled></el-input> <el-input v-model="levelDetails.memberCode" style="width: 50%" disabled></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('等级:')"> <el-form-item :label="$t('等级:')" prop="level">
<dict-selector v-model="levelDetails.level" :disabled="levelDetailsCanEdit" clearable :type="DICT_TYPE.MEMBERSHIP_LEVELS" /> <dict-selector v-model="levelDetails.level" :disabled="levelDetailsCanEdit" clearable :type="DICT_TYPE.MEMBERSHIP_LEVELS" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('等级有效期:')"> <el-form-item :label="$t('等级有效期:')">
...@@ -481,7 +481,7 @@ ...@@ -481,7 +481,7 @@
</el-switch> </el-switch>
<el-button style="margin-left: 10px;" type="info">{{ $t("不降级") }}</el-button> <el-button style="margin-left: 10px;" type="info">{{ $t("不降级") }}</el-button>
</el-form-item> </el-form-item>
<el-form-item :label="$t('更新原因')"> <el-form-item :label="$t('更新原因')" prop="remarks">
<el-input :disabled="levelDetailsCanEdit" v-model="levelDetails.remarks" style="width: 50%" type="textarea" autosize :autosize="{ minRows: 2, maxRows: 4}"></el-input> <el-input :disabled="levelDetailsCanEdit" v-model="levelDetails.remarks" style="width: 50%" type="textarea" autosize :autosize="{ minRows: 2, maxRows: 4}"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('最后更新人')"> <el-form-item :label="$t('最后更新人')">
...@@ -529,7 +529,7 @@ export default { ...@@ -529,7 +529,7 @@ export default {
memberOperateLevelList: [], memberOperateLevelList: [],
levelDetails: { levelDetails: {
configId: "", configId: "",
ruleNumber: "", memberCode: "",
memberId: "", memberId: "",
level: "", level: "",
validityPeriod: "", validityPeriod: "",
...@@ -653,6 +653,22 @@ export default { ...@@ -653,6 +653,22 @@ export default {
} }
] ]
}, },
rulesDetails: {
level: [
{
required: true,
message: this.$t("等级不能为空"),
trigger: "blur"
}
],
remarks: [
{
required: true,
message: this.$t("更新原因不能为空"),
trigger: "blur"
}
],
},
getDictDatas, getDictDatas,
DICT_TYPE, DICT_TYPE,
details: { details: {
...@@ -990,14 +1006,24 @@ export default { ...@@ -990,14 +1006,24 @@ export default {
this.levelDetailsShow=false; this.levelDetailsShow=false;
}, },
submitDetails(){ submitDetails(){
this.levelDetailsShow=false;
let params = { ...this.levelDetails } let params = { ...this.levelDetails }
updateMemberLevelDetails(params).then((res) => { if (params.memberId==''){
this.loading = false; params.memberId = this.$route.params.id
this.handleQueryOperateLevelLog(); }
this.handleQueryDetailsLog(); this.$refs["formDetails"].validate((valid) => {
this.$message.success(this.$t("更新成功")); if (valid){
updateMemberLevelDetails(params).then((res) => {
if (res.code == 0){
this.loading = false;
this.handleQueryOperateLevelLog();
this.handleQueryDetailsLog();
this.$message.success(this.$t("更新成功"));
this.levelDetailsShow=false;
}
})
}
}) })
}, },
handleClick(val) { handleClick(val) {
if (val.name == 1) { if (val.name == 1) {
......
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