修复自营商家无法修改
This commit is contained in:
1 parent
30716afea5
commit
9c9c405bd8
1 file changed
+7
-2
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user