wyq 3 anni fa
parent
commit
41b778cef9

+ 10 - 3
src/components/OrgManager/AddSubOrg.js

@@ -179,9 +179,16 @@ function StepContent(props) {
         });
     }
     function handleSave() {
-        form.validateFields([['softwares', 0, 'id'], ['softwares', 0, 'softwareMenuIds'], ['softwares', 0, 'softwareResourceIds']]).then((res) => {
-            save(form.getFieldsValue())
-        });
+        if (orgType == 4) {
+            form.validateFields(['name']).then((res) => {
+                save(form.getFieldsValue())
+            });
+        } else {
+            form.validateFields([['softwares', 0, 'id'], ['softwares', 0, 'softwareMenuIds'], ['softwares', 0, 'softwareResourceIds']]).then((res) => {
+                save(form.getFieldsValue())
+            });
+        }
+
     }
     //树形结构选中事件
     function checkTreeEvent(i, idsArr, sourceIds) {

+ 12 - 1
src/components/OrgManager/index.js

@@ -203,12 +203,23 @@ function OrgManager() {
         });
         if (orgType == 4) {
             param.type = 5
+            param.addHospitalUserVO = {
+                username:'122',
+                password:'111'
+            }
+            param.softwares = [{
+                id: 1,
+                softwareMenuIds: ['1'],
+                softwareResourceIds: ['2'],
+            }]
+        }else{
+            formData.softwares = arr;
         }
         if (type == 2) {
             url = api.updateHospital
             param.id = operId
         }
-        formData.softwares = arr;
+        
         post(url, param).then((res) => {
             if (res.data.code === 200) {
                 getTableData();