审核 验证

This commit is contained in:
cxc
2022-11-22 17:31:33 +08:00
parent 212c847a4a
commit 69d6c487ac
8 changed files with 110 additions and 67 deletions

View File

@ -275,7 +275,11 @@
<el-radio label="2">SVIP</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="到期时间" prop="expireTime">
<el-form-item
v-if="vipForm.vipType != '0'"
label="到期时间"
prop="expireTime"
>
<el-date-picker
v-model="vipForm.expireTime"
type="datetime"
@ -286,7 +290,12 @@
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitVip"> </el-button>
<el-button
type="primary"
@click="submitVip"
:disabled="vipForm.vipType == 0"
> </el-button
>
<el-button @click="closeVip"> </el-button>
</div>
</template>
@ -472,12 +481,14 @@ const handleOpenVip = async (id) => {
showOpenVip.value = true;
} else {
vipForm.value.userId = userId;
vipForm.value.vipType = "0";
showOpenVip.value = true;
}
} else {
ElMessageBox.alert(`尚未分配账号,请先分配账号`, "尚未分配账号");
}
};
const submitVip = async () => {
await vipFormRef.value.validate();
if (vipForm.value.id) {
@ -489,13 +500,14 @@ const submitVip = async () => {
}
showOpenVip.value = false;
};
const resetVipForm = () => {
vipForm.value.vipType = undefined;
vipForm.value.expireTime = undefined;
vipForm.value = { userType: "1" };
if (vipFormRef.value) {
vipFormRef.value.resetFields();
}
};
const closeVip = () => {
resetVipForm();
showOpenVip.value = false;