fix: 系统功能优化完善。

This commit is contained in:
2025-08-17 22:49:10 +08:00
parent 37eccfa941
commit 8525a09be3
6 changed files with 77 additions and 15 deletions

View File

@@ -114,7 +114,7 @@ const healthRecordList = ref([])
const personList = ref([])
const typeList = ref([])
const showType = ref(false)
const flag = ref('add')
const data = reactive({
form: {
id: null,
@@ -163,12 +163,17 @@ const { form, queryPersonParams, queryHealthRecordParams, rules} = toRefs(data)
onLoad((option) => {
form.value.id = option.id
if(form.value.id!=null){
form.value.id = option.id
flag.value = option.flag
if(flag.value==null){
if(form.value.id!=null){
title.value="就医记录-修改"
}else{
title.value="就医记录-新增"
}
}else{
title.value="就医记录-复制"
}
getData()
})
onReady(() => {
@@ -304,13 +309,24 @@ function datePickConfirm(e) {
function submit() {
proxy.$refs['uForm'].validate().then(() => {
if (form.value.id != null) {
updateDoctorRecord(form.value).then(res => {
if(flag.value==null){
updateDoctorRecord(res => {
proxy.$refs['uToast'].show({
message: '修改成功', complete() {
uni.navigateTo({ url: `/pages/health/doctorRecord/list` })
}
})
})
}else {
form.value.id == null
addDoctorRecord(form.value).then(res => {
proxy.$refs['uToast'].show({
message: '新增成功', complete() {
uni.navigateTo({ url: `/pages/health/doctorRecord/list` })
}
})
})
}
}else {
addDoctorRecord(form.value).then(res => {
proxy.$refs['uToast'].show({