Merge branch 'main' of ssh://git.jizhiweb.cn:2222/clinic-v2/web
This commit is contained in:
commit
8217b3a44f
|
|
@ -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>([]);
|
||||
|
||||
|
|
|
|||
|
|
@ -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,15 +197,20 @@ const init = (_id: any) => {
|
|||
id.value = _id
|
||||
levelName.value = ''
|
||||
show.value = true
|
||||
if (!id.value) return
|
||||
post("vip/vip/get", {id: _id}).then((res: any) => {
|
||||
ruleForm.value = res
|
||||
ruleForm.value.area = JSON.parse(ruleForm.value.area)
|
||||
if (!res.levelId) return
|
||||
post("vip/vipLevel/get", {levelId: res.levelId}).then((res:any) => {
|
||||
levelName.value = res.name
|
||||
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)
|
||||
if (!res.levelId) return
|
||||
post("vip/vipLevel/get", {levelId: res.levelId}).then((res:any) => {
|
||||
levelName.value = res.name
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
const getLevelConfig = ()=>{
|
||||
|
|
|
|||
Loading…
Reference in New Issue