审核 验证
This commit is contained in:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user