修复自营商家无法修改
This commit is contained in:
1 parent
30716afea5
commit
9c9c405bd8
1 file changed
+7
-2
@@ -158,7 +158,7 @@ const form = reactive({
|
|||||||
businessTime: "",
|
businessTime: "",
|
||||||
addressDes: "",
|
addressDes: "",
|
||||||
sort: 0,
|
sort: 0,
|
||||||
supType: "10",
|
supType: "",
|
||||||
cooperationStatus: "1",
|
cooperationStatus: "1",
|
||||||
parentId: "",
|
parentId: "",
|
||||||
discountsPrice: "",
|
discountsPrice: "",
|
||||||
@@ -222,7 +222,7 @@ watch(
|
|||||||
() => form.types,
|
() => form.types,
|
||||||
(newVal) => {
|
(newVal) => {
|
||||||
if (newVal != "2") {
|
if (newVal != "2") {
|
||||||
form.supType = "10"
|
form.supType = ""
|
||||||
form.cooperationStatus = "1"
|
form.cooperationStatus = "1"
|
||||||
form.parentId = ""
|
form.parentId = ""
|
||||||
form.discountsPrice = ""
|
form.discountsPrice = ""
|
||||||
@@ -241,6 +241,11 @@ const onSubmit = async () => {
|
|||||||
cooperationStatus: form.types == "2" && form.supType == "10" ? null : form.cooperationStatus,
|
cooperationStatus: form.types == "2" && form.supType == "10" ? null : form.cooperationStatus,
|
||||||
parentId: form.types == "2" && form.supType == "10" ? -1 : form.parentId,
|
parentId: form.types == "2" && form.supType == "10" ? -1 : form.parentId,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_pa.parentId == "") {
|
||||||
|
_pa.parentId = -1
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
form.id ? await putObj(_pa) : await addObj(_pa)
|
form.id ? await putObj(_pa) : await addObj(_pa)
|
||||||
|
|||||||
Reference in new issue
Block a user