From 21ead72243112d675806161b5125d185d5c4f443 Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期二, 12 三月 2024 16:27:59 +0800
Subject: [PATCH] 11

---
 src/views/project/donorcharge/donorchargedetail/index.vue |   58 +++++++++++++++-------------------------------------------
 1 files changed, 15 insertions(+), 43 deletions(-)

diff --git a/src/views/project/donorcharge/donorchargedetail/index.vue b/src/views/project/donorcharge/donorchargedetail/index.vue
index 4d4134f..9ee3282 100644
--- a/src/views/project/donorcharge/donorchargedetail/index.vue
+++ b/src/views/project/donorcharge/donorchargedetail/index.vue
@@ -388,7 +388,7 @@
           { required: true, message: "璇疯緭鍏ユ墍灞炰笟鍔$粍", trigger: "blur" }
         ]
       },
-
+      gxinzt: false,
       baselist: [],
       donorList: [],
       organchargelist: [],
@@ -531,6 +531,8 @@
       this.operationType = this.$route.query.operation;
       this.curId = this.$route.query.id;
       this.curCase = this.$route.query.data;
+      this.gxinzt = this.$route.query.gxinzt;
+      console.log(this.curCase);
       console.log("this.$route.query", this.$route.query);
 
       if (this.operationType == "add") {
@@ -583,46 +585,13 @@
         this.form.age = this.curCase.age;
         this.form.donationcategory = this.curCase.donationcategory;
 
-        //鑾峰彇瀹屾垚鐧昏鐨勫櫒瀹樿〃
-        if (this.curCase.id > 0) {
-        } else {
-          this.curCase.id = 0;
-        }
-        let searchParam = {
-          infoid: this.curCase.id
-        };
-        listDonatecomporgan(searchParam).then(res => {
-          if (res.code == 200) {
-            // 鏌ヨ鍣ㄥ畼璐圭敤琛�
-            let tempParam = {
-              organcode: null,
-              organname: null,
-              charge: null
-            };
-            listOrgancharge(tempParam).then(res1 => {
-              if (res1.code == 200) {
-                this.organchargelist = res1.rows;
-              }
-
-              //鎻掑叆鍣ㄥ畼琛�
-              res.rows.forEach(item => {
-                //鑾峰彇璐圭敤閲戦
-                this.organchargelist.map(rescharge => {
-                  if (rescharge.organcode == item.organno) {
-                    this.donorchargeorgans.push({
-                      organno: item.organno,
-                      organname: item.organname,
-                      organcharge: rescharge.charge,
-                      infoid: item.infoid,
-                      hospitalname: item.transplanthospitalname,
-                      hospitalno: item.transplanthospitalno,
-                      organtime: item.transplanttime,
-                      chargestate: "0"
-                    });
-                  }
-                });
-              });
-            });
+        this.organParams.infoid = this.curCase.id;
+        listDonorchargeorgan(this.organParams).then(res => {
+          console.log("listDonorchargeorgan", res);
+          this.donorchargeorgans = res.rows;
+          if (this.donorchargeorgans.length > 0) {
+          } else {
+            this.addRow(0);
           }
         });
       }
@@ -638,7 +607,7 @@
         this.form = response.data;
         console.log("getDonorcharge", response);
         //鍣ㄥ畼璐圭敤淇℃伅
-        this.organParams.donorchargeid = this.curId;
+        this.organParams.infoid = this.form.infoid;
         console.log("this.organParams", this.organParams);
         listDonorchargeorgan(this.organParams).then(res => {
           console.log("listDonorchargeorgan", res);
@@ -647,6 +616,9 @@
           if (this.donorchargeorgans.length > 0) {
           } else {
             this.addRow(0);
+          }
+          if ((this.gxinzt = true)) {
+            this.submitForm();
           }
         });
       });
@@ -663,7 +635,7 @@
         this.title = "鏌ョ湅鎹愮尞妗堜緥鍣ㄥ畼璐圭敤琛�";
 
         //鍣ㄥ畼璐圭敤淇℃伅
-        this.organParams.donorchargeid = this.curId;
+        this.organParams.infoid = this.form.infoid;
         listDonorchargeorgan(this.organParams).then(res => {
           this.donorchargeorgans = res.rows;
           if (this.donorchargeorgans.length > 0) {

--
Gitblit v1.9.3