lxf 1 year ago
parent
commit
a7eaa63277
1 changed files with 10 additions and 2 deletions
  1. 10 2
      src/views/subsidiary/order/management/add.vue

+ 10 - 2
src/views/subsidiary/order/management/add.vue

@@ -1287,7 +1287,11 @@ const clickSaveShippingPackage = () => {
           if (formData.data.id) {
             type = "edit";
           }
-          proxy.post("/orderInfo/" + type, formData.data).then(() => {
+          let bodyData = proxy.deepClone(formData.data);
+          if (bodyData.departmentId == "0") {
+            delete bodyData.orderPackageBomList;
+          }
+          proxy.post("/orderInfo/" + type, bodyData).then(() => {
             ElMessage({
               message: type == "add" ? "添加成功" : "编辑成功",
               type: "success",
@@ -1310,7 +1314,11 @@ const clickSaveShippingPackage = () => {
             if (formData.data.id) {
               type = "edit";
             }
-            proxy.post("/orderInfo/" + type, formData.data).then(() => {
+            let bodyData = proxy.deepClone(formData.data);
+            if (bodyData.departmentId == "0") {
+              delete bodyData.orderPackageBomList;
+            }
+            proxy.post("/orderInfo/" + type, bodyData).then(() => {
               ElMessage({
                 message: type == "add" ? "添加成功" : "编辑成功",
                 type: "success",