This commit is contained in:
dzc committed 2025-04-07 10:32:06 +08:00
commit d809ddb23e
3 files changed
+11 -8

No files matched your search

+7 -2
View File
@@ -158,7 +158,7 @@ const form = reactive({
businessTime: "",
addressDes: "",
sort: 0,
supType: "10",
supType: "",
cooperationStatus: "1",
parentId: "",
discountsPrice: "",
@@ -222,7 +222,7 @@ watch(
() => form.types,
(newVal) => {
if (newVal != "2") {
form.supType = "10"
form.supType = ""
form.cooperationStatus = "1"
form.parentId = ""
form.discountsPrice = ""
@@ -241,6 +241,11 @@ const onSubmit = async () => {
cooperationStatus: form.types == "2" && form.supType == "10" ? null : form.cooperationStatus,
parentId: form.types == "2" && form.supType == "10" ? -1 : form.parentId,
}
if (_pa.parentId == "") {
_pa.parentId = -1
}
try {
loading.value = true
form.id ? await putObj(_pa) : await addObj(_pa)