From 0e5553e2390bb336e589e5b7f0fa890d59aed735 Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期二, 27 十月 2026 01:09:44 +0800
Subject: [PATCH] 统计、绩效模块

---
 src/views/project/donationdetails/index.vue |  341 +++++++++++++++++++++++++++++++++++---------------------
 1 files changed, 210 insertions(+), 131 deletions(-)

diff --git a/src/views/project/donationdetails/index.vue b/src/views/project/donationdetails/index.vue
index 42ecc25..00d7057 100644
--- a/src/views/project/donationdetails/index.vue
+++ b/src/views/project/donationdetails/index.vue
@@ -3,7 +3,7 @@
     <div class="left-course" :class="{ 'left-collapsed': isLeftCollapsed }">
       <div class="postfilx">
         <div class="title">
-          宸ヤ綔杩涚▼
+          妗堜緥杩涚▼
           <el-button
             class="collapse-btn"
             @click="toggleLeftCollapse"
@@ -221,7 +221,7 @@
                     clearable
                     size="small"
                     v-model="form.reporttime"
-                    type="datetime"
+                    type="datetime" format="yyyy-MM-dd HH:mm"
                     value-format="yyyy-MM-dd HH:mm:ss"
                     placeholder="閫夋嫨鎶ュ憡鏃ユ湡"
                   >
@@ -267,7 +267,7 @@
                     clearable
                     size="small"
                     v-model="form.birthday"
-                    type="date"
+                    type="date" format="yyyy-MM-dd"
                     value-format="yyyy-MM-dd HH:mm:ss"
                     placeholder="閫夋嫨鍑虹敓鏃ユ湡"
                   >
@@ -779,7 +779,7 @@
                   size="small"
                   style="width: 190px"
                   v-model="form.contacttime"
-                  type="datetime"
+                  type="datetime" format="yyyy-MM-dd HH:mm"
                   value-format="yyyy-MM-dd HH:mm:ss"
                   placeholder="閫夋嫨鎶ュ憡鏃堕棿"
                 >
@@ -862,7 +862,7 @@
                   clearable
                   size="small"
                   v-model="medicineform.hospitalassesstime"
-                  type="date"
+                  type="date" format="yyyy-MM-dd"
                   value-format="yyyy-MM-dd HH:mm:ss"
                   placeholder="閫夋嫨闄㈢骇璇勪及鏃堕棿"
                 >
@@ -915,7 +915,7 @@
                   clearable
                   size="small"
                   v-model="medicineform.provincialassesstime"
-                  type="date"
+                  type="date" format="yyyy-MM-dd"
                   value-format="yyyy-MM-dd HH:mm:ss"
                   placeholder="閫夋嫨鐪佺骇璇勪及鏃堕棿"
                 >
@@ -969,7 +969,7 @@
                   clearable
                   size="small"
                   v-model="medicineform.coreteamassesstime"
-                  type="date"
+                  type="date" format="yyyy-MM-dd"
                   value-format="yyyy-MM-dd HH:mm:ss"
                   placeholder="璇勪及鏃堕棿"
                 >
@@ -1388,7 +1388,7 @@
                   clearable
                   size="small"
                   v-model="ethicform.conclusiontime"
-                  type="date"
+                  type="date" format="yyyy-MM-dd"
                   value-format="yyyy-MM-dd HH:mm:ss"
                   placeholder="閫夋嫨缁撹鏃堕棿"
                 >
@@ -1478,7 +1478,7 @@
                         size="small"
                         style="width: 100%"
                         v-model="scope.row.applicanttime"
-                        type="datetime"
+                        type="datetime" format="yyyy-MM-dd HH:mm"
                         value-format="yyyy-MM-dd HH:mm:ss"
                         placeholder="閫夋嫨鍒嗛厤鎺ユ敹鏃堕棿"
                       >
@@ -1658,7 +1658,7 @@
                 <el-date-picker
                   clearable
                   v-model="witnessform.deathtime"
-                  type="datetime"
+                  type="datetime" format="yyyy-MM-dd HH:mm"
                   value-format="yyyy-MM-dd HH:mm:ss"
                   placeholder="閫夋嫨姝讳骸鏃堕棿"
                 >
@@ -1697,7 +1697,7 @@
                 <el-date-picker
                   clearable
                   v-model="witnessform.operationbegtime"
-                  type="datetime"
+                  type="datetime" format="yyyy-MM-dd HH:mm"
                   value-format="yyyy-MM-dd HH:mm:ss"
                   placeholder="閫夋嫨鎵嬫湳寮�濮嬫椂闂�"
                 >
@@ -1714,7 +1714,7 @@
                 <el-date-picker
                   clearable
                   v-model="witnessform.operationendtime"
-                  type="datetime"
+                  type="datetime" format="yyyy-MM-dd HH:mm"
                   value-format="yyyy-MM-dd HH:mm:ss"
                   placeholder="閫夋嫨鎵嬫湳缁撴潫鏃堕棿"
                 >
@@ -1733,7 +1733,7 @@
                 <el-date-picker
                   clearable
                   v-model="witnessform.coordinatorInOperating"
-                  type="datetime"
+                  type="datetime" format="yyyy-MM-dd HH:mm"
                   value-format="yyyy-MM-dd HH:mm:ss"
                   placeholder="閫夋嫨鎵嬫湳寮�濮嬫椂闂�"
                 >
@@ -1750,7 +1750,7 @@
                 <el-date-picker
                   clearable
                   v-model="witnessform.coordinatorOutOperating"
-                  type="datetime"
+                  type="datetime" format="yyyy-MM-dd HH:mm"
                   value-format="yyyy-MM-dd HH:mm:ss"
                   placeholder="閫夋嫨鎵嬫湳缁撴潫鏃堕棿"
                 >
@@ -1767,7 +1767,7 @@
                 <el-date-picker
                   clearable
                   v-model="witnessform.coordinatorSignTime"
-                  type="datetime"
+                  type="datetime" format="yyyy-MM-dd HH:mm"
                   value-format="yyyy-MM-dd HH:mm:ss"
                   placeholder="閫夋嫨鎵嬫湳缁撴潫鏃堕棿"
                 >
@@ -1794,7 +1794,7 @@
                   <el-date-picker
                     clearable
                     v-model="witnessform.abdominalaortacannulatime"
-                    type="datetime"
+                    type="datetime" format="yyyy-MM-dd HH:mm"
                     value-format="yyyy-MM-dd HH:mm:ss"
                     placeholder="閫夋嫨鑵逛富鍔ㄨ剦鎻掔鏃堕棿"
                   >
@@ -1811,7 +1811,7 @@
                   <el-date-picker
                     clearable
                     v-model="witnessform.abdominalaortaperfusiontime"
-                    type="datetime"
+                    type="datetime" format="yyyy-MM-dd HH:mm"
                     value-format="yyyy-MM-dd HH:mm:ss"
                     placeholder="閫夋嫨鑵逛富鍔ㄨ剦鐏屾敞鏃堕棿"
                   >
@@ -1828,7 +1828,7 @@
                   <el-date-picker
                     clearable
                     v-model="witnessform.portalveincannulatime"
-                    type="datetime"
+                    type="datetime" format="yyyy-MM-dd HH:mm"
                     value-format="yyyy-MM-dd HH:mm:ss"
                     placeholder="閫夋嫨闂ㄩ潤鑴夎剦鎻掔鏃堕棿"
                   >
@@ -1845,7 +1845,7 @@
                   <el-date-picker
                     clearable
                     v-model="witnessform.portalveinperfusiontime"
-                    type="datetime"
+                    type="datetime" format="yyyy-MM-dd HH:mm"
                     value-format="yyyy-MM-dd HH:mm:ss"
                     placeholder="閫夋嫨闂ㄩ潤鑴夌亴娉ㄦ椂闂�"
                   >
@@ -1864,7 +1864,7 @@
                   <el-date-picker
                     clearable
                     v-model="witnessform.pulmonaryarterycannulatime"
-                    type="datetime"
+                    type="datetime" format="yyyy-MM-dd HH:mm"
                     value-format="yyyy-MM-dd HH:mm:ss"
                     placeholder="閫夋嫨闂ㄩ潤鑴夋彃绠℃椂闂�"
                   >
@@ -1881,7 +1881,7 @@
                   <el-date-picker
                     clearable
                     v-model="witnessform.pulmonaryarteryperfusiontime"
-                    type="datetime"
+                    type="datetime" format="yyyy-MM-dd HH:mm"
                     value-format="yyyy-MM-dd HH:mm:ss"
                     placeholder="閫夋嫨闂ㄩ潤鑴夌亴娉ㄦ椂闂�"
                   >
@@ -1898,8 +1898,8 @@
                   <el-date-picker
                     clearable
                     v-model="witnessform.aortacannulatime"
-                    type="datetime"
-                    value-format="yyyy-MM-dd  HH:mm:ss"
+                    type="datetime" format="yyyy-MM-dd HH:mm"
+                    value-format="yyyy-MM-dd HH:mm:ss"
                     placeholder="閫夋嫨涓诲姩鑴夋彃绠℃椂闂�"
                   >
                   </el-date-picker>
@@ -1915,8 +1915,8 @@
                   <el-date-picker
                     clearable
                     v-model="witnessform.aortaperfusiontime"
-                    type="datetime"
-                    value-format="yyyy-MM-dd  HH:mm:ss"
+                    type="datetime" format="yyyy-MM-dd HH:mm"
+                    value-format="yyyy-MM-dd HH:mm:ss"
                     placeholder="閫夋嫨涓诲姩鑴夌亴娉ㄦ椂闂�"
                   >
                   </el-date-picker>
@@ -2028,7 +2028,7 @@
                         size="small"
                         style="width: 100%"
                         v-model="scope.row.organStartTime"
-                        type="datetime"
+                        type="datetime" format="yyyy-MM-dd HH:mm"
                         value-format="yyyy-MM-dd HH:mm:ss"
                         placeholder="璇疯緭鍏ヨ幏鍙栧紑濮嬫椂闂�"
                       >
@@ -2048,7 +2048,7 @@
                         size="small"
                         style="width: 100%"
                         v-model="scope.row.organgettime"
-                        type="datetime"
+                        type="datetime" format="yyyy-MM-dd HH:mm"
                         value-format="yyyy-MM-dd HH:mm:ss"
                         placeholder="璇疯緭鍏ュ櫒瀹樼浣撴椂闂�"
                       >
@@ -2450,8 +2450,8 @@
                   clearable
                   size="small"
                   v-model="accomplishform.completetime"
-                  type="date"
-                  value-format="yyyy-MM-dd hh:mm:ss"
+                  type="date" format="yyyy-MM-dd"
+                  value-format="yyyy-MM-dd HH:mm:ss"
                   placeholder="閫夋嫨瀹屾垚鏃堕棿"
                 >
                 </el-date-picker>
@@ -2811,18 +2811,6 @@
         contacttime: "",
         reporttime: ""
       },
-      organOrder: [
-        "鑲濊剰",
-        "宸﹁偩",
-        "鍙宠偩",
-        "蹇冭剰",
-        "宸﹁偤",
-        "鍙宠偤",
-        "鑳拌吅",
-        "灏忚偁",
-        "宸︾溂瑙掕啘",
-        "鍙崇溂瑙掕啘"
-      ], // 鎸囧畾鐨勫櫒瀹橀『搴�
       isSorting: false, // 鏍囧織浣嶏紝琛ㄧず鏄惁姝e湪鎺掑簭
       tableKey: 0,
       istb: false,
@@ -3182,7 +3170,8 @@
     // 鐩戝惉 procureddata 鐨勫彉鍖栵紝鏁版嵁鏇存柊鍚庨噸鏂版帓搴�
     procureddata: {
       handler(newVal) {
-        if (this.procureddata[0].organgettime) {
+        // 鍒ょ┖锛氬彇娑堟渶鍚庝竴涓櫒瀹樻椂鏁扮粍浼氬彉鎴愮┖锛岀洿鎺ュ彇 [0] 浼氭姏 TypeError
+        if (this.procureddata[0] && this.procureddata[0].organgettime) {
           this.organgettimetrue = true;
         }
         if (this.isSorting) {
@@ -3342,7 +3331,8 @@
         listDonateorgan(searchParam).then(res => {
           if (res.code == 200) {
             if (res.rows[0]) {
-              this.allocateddata = res.rows;
+              // 2026-10-23锛氭寜鍣ㄥ畼鎺掗槦搴忓彿鎺掑簭鍚庡啀娓叉煋
+              this.allocateddata = this.sortOrganRows(res.rows);
               console.log("this.allocateddata", this.allocateddata);
               this.allocateddataform.allocateddata = this.allocateddata;
             }
@@ -3383,6 +3373,8 @@
               });
               // this.procureddata.infoid = this.infoid;
             }
+            // 2026-10-23锛氭寜鍣ㄥ畼鎺掗槦搴忓彿鎺掑簭鍚庡啀娓叉煋
+            this.procureddata = this.sortOrganRows(this.procureddata);
             this.organList.organprocured = [];
             for (let i = 0; i < this.procureddata.length; i++) {
               this.organList.organprocured.push(this.procureddata[i].organno);
@@ -3437,6 +3429,8 @@
 
               this.transplantdata.infoid = this.infoid;
             }
+            // 2026-10-23锛氭寜鍣ㄥ畼鎺掗槦搴忓彿鎺掑簭鍚庡啀娓叉煋
+            this.transplantdata = this.sortOrganRows(this.transplantdata);
             for (let i = 0; i < this.transplantdata.length; i++) {
               this.organList.organtransplant.push(
                 this.transplantdata[i].organno
@@ -3485,7 +3479,12 @@
       this.isLeftCollapsed = !this.isLeftCollapsed;
     },
     /** 淇濆瓨涓昏〃鎸夐挳 */
-    submitForm() {
+    submitForm(fromProcess) {
+      // 淇濆瓨闃查噸锛氶潪"娴佺▼鎺ㄨ繘"瑙﹀彂鐨勪繚瀛橈紝2 绉掑唴鐨勯噸澶嶇偣鍑荤洿鎺ュ拷鐣ワ紙闃叉閲嶅鎻掑叆锛�
+      if (!fromProcess && !this.canSave()) {
+        this.$modal.msgWarning("璇峰嬁閲嶅鎻愪氦");
+        return;
+      }
       this.$refs["form"].validate(valid => {
         console.log("鎻愪氦鐨勬暟鎹滑锛�", this.form);
         if (valid) {
@@ -3495,14 +3494,21 @@
             "YYYY-MM-DD HH:mm:ss"
           );
 
-          this.form.diseasetype = this.form.diseasetype.join(",");
-
-          this.form.infectious = this.form.infectious.join(",");
-          this.form.selfwill = this.form.selfwill.join(",");
-          this.form.othercases = this.form.othercases.join(",");
-          this.form.infosources = this.form.infosources.join(",");
-          this.form.kinship = this.form.kinship.join(",");
-          this.form.patientstate = this.form.patientstate.join(",");
+          // 澶氶�夊瓧娈佃浆瀛楃涓诧細骞傜瓑澶勭悊锛堝凡鏄瓧绗︿覆鏃朵繚鎸佸師鏍凤級锛�
+          // 閬垮厤"淇濆瓨鎴愬姛鍚庢湭閲嶆柊鍔犺浇鍐嶆淇濆瓨"鏃舵姏 join is not a function
+          [
+            "diseasetype",
+            "infectious",
+            "selfwill",
+            "othercases",
+            "infosources",
+            "kinship",
+            "patientstate"
+          ].forEach(key => {
+            if (Array.isArray(this.form[key])) {
+              this.form[key] = this.form[key].join(",");
+            }
+          });
           this.form.registerprovince = this.$refs.registerSelect.getSheng();
           this.form.registerprovincename = this.registerAddresss.sheng;
 
@@ -3584,6 +3590,11 @@
     },
     // 淇濆瓨浜岀骇琛ㄦ寜閽�
     Savethedetails() {
+      // 淇濆瓨闃查噸锛�2 绉掑唴鐨勯噸澶嶇偣鍑荤洿鎺ュ拷鐣ワ紙闃叉閲嶅鎻掑叆锛�
+      if (!this.canSave()) {
+        this.$modal.msgWarning("璇峰嬁閲嶅鎻愪氦");
+        return;
+      }
       console.log(this.actives);
       if (this.actives == 1) {
         this.medicineform.infoid = this.infoid;
@@ -3594,14 +3605,19 @@
               updateMedicalevaluation(this.medicineform).then(response => {
                 this.$modal.msgSuccess("鍖诲璇勪及淇℃伅淇敼鎴愬姛");
                 this.$modal.closeLoading();
+                this.Processvalidation();
               });
             } else {
               addMedicalevaluation(this.medicineform).then(response => {
+                // 鍥炲~涓婚敭锛氬惁鍒欎笅娆′繚瀛樹粛璧�"鏂板"锛屼細浜х敓閲嶅琛�
+                if (response && response.data && response.data.id) {
+                  this.medicineform.id = response.data.id;
+                }
                 this.$modal.msgSuccess("鍖诲璇勪及淇℃伅鏂板鎴愬姛");
                 this.$modal.closeLoading();
+                this.Processvalidation();
               });
             }
-            this.Processvalidation();
           }
         });
       } else if (this.actives == 2) {
@@ -3621,17 +3637,22 @@
               updateRelativesconfirmation(this.affirmform).then(response => {
                 this.$modal.msgSuccess("鎹愮尞纭淇℃伅淇敼鎴愬姛");
                 this.$modal.closeLoading();
+                this.Processvalidation();
               });
             } else {
               this.affirmform.residenceprovincename = this.defultAddresss.sheng;
               this.affirmform.residencecityname = this.defultAddresss.shi;
               this.affirmform.residencetownname = this.defultAddresss.qu;
               addRelativesconfirmation(this.affirmform).then(response => {
+                // 鍥炲~涓婚敭锛氬惁鍒欎笅娆′繚瀛樹粛璧�"鏂板"锛屼細浜х敓閲嶅琛�
+                if (response && response.data && response.data.id) {
+                  this.affirmform.id = response.data.id;
+                }
                 this.$modal.msgSuccess("鎹愮尞纭淇℃伅鏂板鎴愬姛");
                 this.$modal.closeLoading();
+                this.Processvalidation();
               });
             }
-            this.Processvalidation();
           }
         });
       } else if (this.actives == 3) {
@@ -3644,15 +3665,20 @@
               updateEthicalreviewopinions(this.ethicform).then(res => {
                 this.$modal.msgSuccess("浼︾悊瀹℃煡淇℃伅淇敼鎴愬姛");
                 this.$modal.closeLoading();
+                this.Processvalidation();
               });
             } else {
               //addDonateflowchart(this.ethicform).then(response => {
               addEthicalreviewopinions(this.ethicform).then(res => {
+                // 鍥炲~涓婚敭锛氬惁鍒欎笅娆′繚瀛樹粛璧�"鏂板"锛屼細浜х敓閲嶅琛�
+                if (res && res.data && res.data.id) {
+                  this.ethicform.id = res.data.id;
+                }
                 this.$modal.msgSuccess("浼︾悊瀹℃煡淇℃伅鏂板鎴愬姛");
                 this.$modal.closeLoading();
+                this.Processvalidation();
               });
             }
-            this.Processvalidation();
           }
         });
       } else if (this.actives == 4) {
@@ -3671,7 +3697,15 @@
               item.transplanthospitalname = objs.organizationname;
             }
           });
+          // 2026-10-23锛氭彁浜ゅ墠鎸夊櫒瀹樻帓闃熷簭鍙锋帓搴忥紝淇濊瘉鍏ュ簱椤哄簭涓庡睍绀轰竴鑷�
+          this.sortOrganRows(this.allocateddata);
           saveDonateorgan(this.allocateddata).then(res => {
+            // 鍥炲~涓婚敭锛氬悗绔凡鎸�"鍚屼竴妗堜緥鍚屼竴鍣ㄥ畼"鍋� upsert锛屽洖濉悗鍓嶇涓嶄細鍐嶈鍒や负鏂板
+            if (res && res.data && res.data.length === this.allocateddata.length) {
+              res.data.forEach((row, i) => {
+                this.allocateddata[i].id = row.id;
+              });
+            }
             if (res.code == 200) {
               this.$modal.msgSuccess("鍣ㄥ畼鎹愮尞鍒嗛厤淇℃伅淇濆瓨鎴愬姛锛�");
               this.$modal.closeLoading();
@@ -3719,8 +3753,15 @@
                   }
                 });
                 //淇濆瓨鍣ㄥ畼鑾峰彇琛ㄦ暟鎹�
+                // 2026-10-23锛氭彁浜ゅ墠鎸夊櫒瀹樻帓闃熷簭鍙锋帓搴�
+                this.sortOrganRows(this.procureddata);
                 saveDonationwitnessorgan(this.procureddata).then(res => {
-                  if (res == 200) {
+                  if (res && res.data && res.data.length === this.procureddata.length) {
+                    res.data.forEach((row, i) => {
+                      this.procureddata[i].id = row.id;
+                    });
+                  }
+                  if (res.code == 200) {
                     this.$modal.msgSuccess("鎹愮尞鍣ㄥ畼鑾峰彇淇℃伅淇濆瓨鎴愬姛锛�");
                   }
                   this.$modal.closeLoading();
@@ -3729,6 +3770,10 @@
             } else {
               addDonationwitness(this.witnessform).then(response => {
                 if (response.code === 200) {
+                  // 鍥炲~涓婚敭锛氬惁鍒欎笅娆′繚瀛樹粛璧�"鏂板"
+                  if (response.data && response.data.id) {
+                    this.witnessform.id = response.data.id;
+                  }
                   this.$modal.msgSuccess("鑾峰彇瑙佽瘉淇℃伅鏂板鎴愬姛");
                   this.form.donationcategory = this.witnessform.donationcategory;
                   let data = JSON.parse(JSON.stringify(this.form));
@@ -3746,8 +3791,15 @@
                     this.Processvalidation();
                   });
                   //淇濆瓨鍣ㄥ畼鑾峰彇琛ㄦ暟鎹�
+                  // 2026-10-23锛氭彁浜ゅ墠鎸夊櫒瀹樻帓闃熷簭鍙锋帓搴�
+                  this.sortOrganRows(this.procureddata);
                   saveDonationwitnessorgan(this.procureddata).then(res => {
-                    if (res == 200) {
+                    if (res && res.data && res.data.length === this.procureddata.length) {
+                      res.data.forEach((row, i) => {
+                        this.procureddata[i].id = row.id;
+                      });
+                    }
+                    if (res.code == 200) {
                       this.$modal.msgSuccess("鎹愮尞鍣ㄥ畼鑾峰彇淇℃伅淇濆瓨鎴愬姛锛�");
                     }
                     this.$modal.closeLoading();
@@ -3781,8 +3833,15 @@
             if (this.accomplishform.id) {
               updateDonatecompletioninfo(this.accomplishform).then(response => {
                 this.$modal.msgSuccess("瀹屾垚鐧昏淇℃伅淇敼鎴愬姛");
+                // 2026-10-23锛氭彁浜ゅ墠鎸夊櫒瀹樻帓闃熷簭鍙锋帓搴�
+                this.sortOrganRows(this.transplantdata);
                 saveDonatecomporgan(this.transplantdata).then(res => {
-                  if (res == 200) {
+                  if (res && res.data && res.data.length === this.transplantdata.length) {
+                    res.data.forEach((row, i) => {
+                      this.transplantdata[i].id = row.id;
+                    });
+                  }
+                  if (res.code == 200) {
                     this.$modal.msgSuccess("鎹愮尞鍣ㄥ畼鐧昏淇℃伅淇濆瓨鎴愬姛锛�");
                   } else {
                     this.$modal.msgSuccess(res.msg);
@@ -3792,8 +3851,19 @@
               });
             } else {
               addDonatecompletioninfo(this.accomplishform).then(response => {
+                // 鍥炲~涓婚敭锛氬惁鍒欎笅娆′繚瀛樹粛璧�"鏂板"
+                if (response && response.data && response.data.id) {
+                  this.accomplishform.id = response.data.id;
+                }
                 this.$modal.msgSuccess("瀹屾垚鐧昏鎴愬姛");
+                // 2026-10-23锛氭彁浜ゅ墠鎸夊櫒瀹樻帓闃熷簭鍙锋帓搴�
+                this.sortOrganRows(this.transplantdata);
                 saveDonatecomporgan(this.transplantdata).then(res => {
+                  if (res && res.data && res.data.length === this.transplantdata.length) {
+                    res.data.forEach((row, i) => {
+                      this.transplantdata[i].id = row.id;
+                    });
+                  }
                   if (res.code == 200) {
                     this.$modal.msgSuccess("鎹愮尞鍣ㄥ畼鐧昏淇℃伅淇濆瓨鎴愬姛锛�");
                   } else {
@@ -3820,35 +3890,48 @@
       }
     },
 
-    customOrganSort() {
-      console.log("璋冪敤");
+    /**
+     * 鍙栧櫒瀹樼殑鎺掗槦搴忓彿锛氬瓧鍏� sys_Organ 鐨� dict_sort 鍘熷��
+     * 瀛楀吀閲屾病鏈夎鍣ㄥ畼鏃惰繑鍥� null锛堟帓搴忔椂鎺掓渶鍚庯級
+     */
+    getOrganSort(organno) {
+      const list =
+        (this.dict && this.dict.type && this.dict.type.sys_Organ) || [];
+      const item = list.find(d => d.value === organno);
+      if (item && item.raw) {
+        const s = item.raw.dictSort;
+        if (s !== null && s !== undefined && s !== "") {
+          return Number(s);
+        }
+      }
+      return null;
+    },
 
+    /**
+     * 鎸夊櫒瀹樻帓闃熷簭鍙峰崌搴忔帓搴忥紙鍘熷湴锛�
+     * sort 涓虹┖/0 瑙嗕负鏈煡锛屾帓鏈�鍚庯紱鐩稿悓搴忓彿鎸� id 鍏滃簳锛屼繚璇侀『搴忕ǔ瀹�
+     */
+    sortOrganRows(rows) {
+      if (!rows || !rows.length) {
+        return rows;
+      }
+      const weight = r => {
+        const s = Number(r.sort);
+        if (r.sort === null || r.sort === undefined || isNaN(s) || s === 0) {
+          return 999999;
+        }
+        return s;
+      };
+      rows.sort((a, b) => weight(a) - weight(b) || (a.id || 0) - (b.id || 0));
+      return rows;
+    },
+
+    customOrganSort() {
       // 1. 鍔犻攣锛岄樆姝㈢洃鍚櫒鎵ц
       this.isSorting = true;
       this.loading = true;
-      // 鑷畾涔夋帓搴忓嚱鏁�
-      this.procureddata.sort((a, b) => {
-        const indexA = this.organOrder.indexOf(a.organname);
-        const indexB = this.organOrder.indexOf(b.organname);
-
-        // 濡傛灉涓や釜閮藉湪鍒楄〃涓紝鎸夊垪琛ㄤ腑鐨勯『搴忔帓搴�
-        if (indexA !== -1 && indexB !== -1) {
-          return indexA - indexB;
-        }
-        // 濡傛灉 a 鍦ㄥ垪琛ㄤ腑锛宐 涓嶅湪锛宎 鎺掑墠闈�
-        if (indexA !== -1) {
-          return -1;
-        }
-        // 濡傛灉 b 鍦ㄥ垪琛ㄤ腑锛宎 涓嶅湪锛宐 鎺掑墠闈�
-        if (indexB !== -1) {
-          return 1;
-        }
-        // 涓や釜閮戒笉鍦ㄥ垪琛ㄤ腑锛屼繚鎸佸師椤哄簭锛堟垨鎸夊叾浠栬鍒欙紝姣斿鎸夊瓧姣嶆帓搴忥紝杩欓噷鎸夊師濮嬮『搴忥級
-        return 0;
-      });
-      console.log(this.procureddata, "椤哄簭");
+      this.sortOrganRows(this.procureddata);
       this.tableKey += 1; // 鏀瑰彉 key 杩娇琛ㄦ牸閲嶆柊娓叉煋
-      // 浣犲彲浠ヤ娇鐢� this.$forceUpdate() 鎴栬�呴噸鏂拌祴鍊兼暟缁勬潵瑙﹀彂鏇存柊
       this.procureddata = [...this.procureddata];
       this.$nextTick(() => {
         this.isSorting = false;
@@ -3856,33 +3939,10 @@
       });
     },
     allocateddataSort() {
-      console.log("璋冪敤");
-
       // 1. 鍔犻攣锛岄樆姝㈢洃鍚櫒鎵ц
       this.isSorting = true;
-      // 鑷畾涔夋帓搴忓嚱鏁�
-      this.allocateddata.sort((a, b) => {
-        const indexA = this.organOrder.indexOf(a.organname);
-        const indexB = this.organOrder.indexOf(b.organname);
-
-        // 濡傛灉涓や釜閮藉湪鍒楄〃涓紝鎸夊垪琛ㄤ腑鐨勯『搴忔帓搴�
-        if (indexA !== -1 && indexB !== -1) {
-          return indexA - indexB;
-        }
-        // 濡傛灉 a 鍦ㄥ垪琛ㄤ腑锛宐 涓嶅湪锛宎 鎺掑墠闈�
-        if (indexA !== -1) {
-          return -1;
-        }
-        // 濡傛灉 b 鍦ㄥ垪琛ㄤ腑锛宎 涓嶅湪锛宐 鎺掑墠闈�
-        if (indexB !== -1) {
-          return 1;
-        }
-        // 涓や釜閮戒笉鍦ㄥ垪琛ㄤ腑锛屼繚鎸佸師椤哄簭锛堟垨鎸夊叾浠栬鍒欙紝姣斿鎸夊瓧姣嶆帓搴忥紝杩欓噷鎸夊師濮嬮『搴忥級
-        return 0;
-      });
-      console.log(this.allocateddata, "椤哄簭");
+      this.sortOrganRows(this.allocateddata);
       this.tableKey += 1; // 鏀瑰彉 key 杩娇琛ㄦ牸閲嶆柊娓叉煋
-      // 浣犲彲浠ヤ娇鐢� this.$forceUpdate() 鎴栬�呴噸鏂拌祴鍊兼暟缁勬潵瑙﹀彂鏇存柊
       this.allocateddata = [...this.allocateddata];
       this.$nextTick(() => {
         this.isSorting = false;
@@ -3962,6 +4022,8 @@
             this.allocateddata.push({
               organname: temporganname,
               organno: value,
+              // 2026-10-23锛氬啓鍏ュ櫒瀹樻帓闃熷簭鍙凤紙瀛楀吀 dict_sort锛�
+              sort: this.getOrganSort(value),
               id: null,
               infoid: this.infoid,
               donorno: this.form.donorno,
@@ -4032,6 +4094,8 @@
             this.procureddata.push({
               organname: temporganname,
               organno: value,
+              // 2026-10-23锛氬啓鍏ュ櫒瀹樻帓闃熷簭鍙凤紙瀛楀吀 dict_sort锛�
+              sort: this.getOrganSort(value),
               id: null,
               infoid: this.infoid,
               donorno: this.form.donorno,
@@ -4108,12 +4172,17 @@
             this.transplantdata.push({
               organname: temporganname,
               organno: value,
+              // 2026-10-23锛氬啓鍏ュ櫒瀹樻帓闃熷簭鍙凤紙瀛楀吀 dict_sort锛�
+              sort: this.getOrganSort(value),
               id: null,
               infoid: this.infoid,
               donorno: this.form.donorno,
               organstate: 1,
               transplantstate: 1
             });
+            // 2026-10-23锛氬畬鎴愮櫥璁板師鍏堟病鏈� watch锛屾柊澧炲櫒瀹樹細鍋滃湪琛ㄦ牸鏈�鍚庯紱
+            // 杩欓噷绔嬪嵆鎸夋帓闃熷簭鍙峰綊浣嶏紙鍘熷湴鎺掑簭鍚庡繀椤婚噸鏂拌祴鍊硷紝鍚﹀垯琛ㄦ牸涓嶉噸娓叉煋锛�
+            this.transplantdata = this.sortOrganRows([...this.transplantdata]);
           }
         } else {
           this.$modal.msgWarning("璇ュ櫒瀹樺凡缁忛�夋嫨锛岃鍕块噸澶嶉�夋嫨锛�");
@@ -4130,6 +4199,15 @@
         console.log("宸插埌杈炬渶澶у��");
       }
     },
+    // 淇濆瓨闃查噸锛�2 绉掑唴閲嶅鐐瑰嚮瑙嗕负閲嶅鎻愪氦
+    canSave() {
+      const now = Date.now();
+      if (this.saveLockAt && now - this.saveLockAt < 2000) {
+        return false;
+      }
+      this.saveLockAt = now;
+      return true;
+    },
     // 鏇存敼杩涚▼鏁堥獙
     Processvalidation() {
       if (this.form.workflow + 1 == this.actives) {
@@ -4137,15 +4215,12 @@
           this.form.workflow++;
         } else {
         }
-        this.submitForm();
-        // this.GetAttacheddata();
+        // 鐢�"淇濆瓨浜岀骇琛�"瑙﹀彂鐨勪繚瀛橈紝涓嶅弬涓庨槻閲嶏紙鍚﹀垯浼氳 canSave 鎷︽帀锛�
+        this.submitForm(true);
       } else if (this.form.workflow > this.actives) {
-        this.submitForm();
-        // Modifydonationattachment(this.donatelist).then(res => {});
-        // this.GetAttacheddata();
+        this.submitForm(true);
       } else {
-        this.submitForm();
-        // this.$modal.msgWarning("璇峰厛瀹屾垚鍓嶉儴姝ラ");
+        this.submitForm(true);
         return;
       }
     },
@@ -4462,21 +4537,21 @@
 <style lang="scss" scoped>
 .particularsdiv {
   display: flex;
-  background-color: #f5f7fa;
+  background-color: var(--opo-bg-page, #f5f7fa);
   height: 100vh;
   overflow: hidden;
   transition: all 0.3s ease;
 
-  // 宸︿晶宸ヤ綔杩涚▼鏍�
+  // 宸︿晶宸ヤ綔杩涚▼鏍忥紙2026-10-22锛氬幓鎺夊簳鑹诧紝鍙暀涓�鏉″垎闅旂嚎锛涙爣棰樻枃瀛楁敼鍝佺墝闈掞級
   .left-course {
-    background: #fff;
+    background: transparent;
     width: 220px;
     min-width: 220px;
     text-align: center;
     margin: 0;
     padding: 0;
     height: 100%;
-    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
+    border-right: 1px solid var(--opo-border-base, #e5e7eb);
     transition: all 0.3s ease;
     position: relative;
     z-index: 100;
@@ -4511,10 +4586,10 @@
       flex-direction: column;
 
       .title {
-        background: #22a2c3;
+        background: transparent;
         margin-bottom: 0;
         padding: 15px 10px;
-        color: #fff;
+        color: var(--opo-primary, #0e768f);
         font-size: 16px;
         font-weight: 600;
         display: flex;
@@ -4524,11 +4599,13 @@
         transition: all 0.3s ease;
         min-height: 54px; // 纭繚鏍囬鍖哄煙鏈夊浐瀹氶珮搴�
         box-sizing: border-box;
+        border-bottom: 1px solid var(--opo-border-base, #e5e7eb);
 
         .collapse-btn {
-          background: rgba(255, 255, 255, 0.2);
-          border: none;
-          color: #fff;
+          // 鏍囬搴曡壊鍘绘帀鍚庯紝鎸夐挳鏀逛负娴呴潚鎻忚竟椋庢牸锛岄伩鍏嶇櫧搴曠櫧瀛楃湅涓嶈
+          background: var(--opo-primary-light-9, #e7f1f4);
+          border: 1px solid var(--opo-primary-light-7, #b7d6dd);
+          color: var(--opo-primary, #0e768f);
           width: 32px; // 绋嶅井澧炲ぇ纭繚鍙偣鍑诲尯鍩�
           height: 32px;
           padding: 0;
@@ -4540,7 +4617,8 @@
           flex-shrink: 0; // 闃叉鎸夐挳琚帇缂�
 
           &:hover {
-            background: rgba(255, 255, 255, 0.3);
+            background: var(--opo-primary-light-7, #b7d6dd);
+            border-color: var(--opo-primary, #0e768f);
             transform: scale(1.1);
           }
 
@@ -4608,7 +4686,7 @@
   }
 }
 
-// 姝ラ鏍峰紡浼樺寲
+// 姝ラ鏍峰紡浼樺寲锛堥厤鑹茬粺涓�鍒扮郴缁熷搧鐗岃壊锛歵eal #0E768F锛�
 ::v-deep .el-steps {
   &.el-steps--vertical {
     height: 100%;
@@ -4618,27 +4696,28 @@
 
       .el-step__head {
         &.is-finish {
-          color: #22a2c3;
-          border-color: #22a2c3;
+          color: var(--opo-primary, #0e768f);
+          border-color: var(--opo-primary, #0e768f);
         }
       }
 
       .el-step__title {
-        font-size: 14px;
+        font-size: var(--opo-font-size-sm);
         font-weight: 600;
 
         &.is-finish {
-          color: #22a2c3;
+          color: var(--opo-primary, #0e768f);
         }
       }
 
       .el-step__description {
-        font-size: 12px;
-        color: #666;
+        font-size: var(--opo-font-size-xs);
+        // 鎻忚堪鏂囧瓧缁熶竴鐢ㄤ腑鎬х伆锛岄伩鍏嶆暣鍧楅潰鏉胯鍝佺墝鑹叉饭娌�
+        color: var(--opo-text-secondary, #6b7280);
         line-height: 1.5;
 
         &.is-finish {
-          color: #22a2c3;
+          color: var(--opo-text-regular, #4b5563);
         }
 
         p {

--
Gitblit v1.9.3