lxf 1 year ago
parent
commit
4c4cc247c0
1 changed files with 19 additions and 11 deletions
  1. 19 11
      src/views/subsidiary/order/management/add.vue

+ 19 - 11
src/views/subsidiary/order/management/add.vue

@@ -686,18 +686,26 @@ const submitForm = (status) => {
         formData.data.fileList = [];
       }
       formData.data.status = status;
-      let type = "add";
-      if (formData.data.id) {
-        type = "edit";
-      }
-      proxy.post("/orderInfo/" + type, formData.data).then(() => {
-        ElMessage({
-          message: type == "add" ? "添加成功" : "编辑成功",
-          type: "success",
+      if (status == "20") {
+        proxy.post("/orderInfo/confirmation", formData.data).then(() => {
+          ElMessage({ message: "提交成功", type: "success" });
+          refreshStore().setRefresh("order");
+          clickCancel();
         });
-        refreshStore().setRefresh("order");
-        clickCancel();
-      });
+      } else {
+        let type = "add";
+        if (formData.data.id) {
+          type = "edit";
+        }
+        proxy.post("/orderInfo/" + type, formData.data).then(() => {
+          ElMessage({
+            message: type == "add" ? "添加成功" : "编辑成功",
+            type: "success",
+          });
+          refreshStore().setRefresh("order");
+          clickCancel();
+        });
+      }
     } else {
       return ElMessage("请添加产品");
     }