Merge branch 'main' of ssh://git.jizhiweb.cn:2222/clinic-v2/web

This commit is contained in:
ChenQiuYu 2025-04-27 14:46:26 +08:00
commit 8217b3a44f
2 changed files with 28 additions and 13 deletions

View File

@ -1,6 +1,6 @@
<script setup lang="ts">
import Panel from "@/components/common/Panel.vue";
import {nextTick, ref} from "vue";
import {nextTick, onMounted, ref} from "vue";
import {post} from "@/utils/request.ts";
import ExpireWarnDetail from "@/components/home/index/Dialog/ExpireWarnDetail.vue";
@ -11,6 +11,9 @@ const openExpireWarnDetail = () => {
})
}
onMounted(()=>{
getExpiryDateWarning()
})
const expireDateWarningListSrc = ref<any>([]);
const expireDateWarningList = ref<any>([]);

View File

@ -158,10 +158,17 @@ const submitForm = async () => {
if (!formEl) return
await formEl.validate((valid:any, fields:any) => {
if (valid) {
console.log(ruleForm.value.area)
// post("vip/vip/create", {vipInfo:ruleForm.value}).then((res: any) => {
// close()
// })
console.log(ruleForm.value)
if (ruleForm.value.id){
post("vip/vip/update", {vipInfo:ruleForm.value}).then((res: any) => {
close()
})
}else {
post("vip/vip/create", {vipInfo:ruleForm.value}).then((res: any) => {
close()
})
}
}
})
}
@ -190,7 +197,10 @@ const init = (_id: any) => {
id.value = _id
levelName.value = ''
show.value = true
if (!id.value) return
if (!id.value){
ruleForm.value = {}
return
} else {
post("vip/vip/get", {id: _id}).then((res: any) => {
ruleForm.value = res
ruleForm.value.area = JSON.parse(ruleForm.value.area)
@ -199,6 +209,8 @@ const init = (_id: any) => {
levelName.value = res.name
})
})
}
}
const getLevelConfig = ()=>{