From 9903954c85f651dd5cc6d4b538cfe66b17fc5baa Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期三, 28 十月 2026 18:23:45 +0800
Subject: [PATCH] 提交

---
 src/views/followvisit/discharge/outpatientService.vue |  199 ++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 178 insertions(+), 21 deletions(-)

diff --git a/src/views/followvisit/discharge/outpatientService.vue b/src/views/followvisit/discharge/outpatientService.vue
index a31c4ee..243496d 100644
--- a/src/views/followvisit/discharge/outpatientService.vue
+++ b/src/views/followvisit/discharge/outpatientService.vue
@@ -64,6 +64,12 @@
             placeholder="璇疯緭鍏ラ殢璁夸汉鍛�"
           ></el-input>
         </el-form-item>
+        <el-form-item label="涓绘不鍖荤敓" prop="drname">
+          <el-input
+            v-model="topqueryParams.drname"
+            placeholder="璇疯緭鍏ヤ富娌诲尰鐢�"
+          ></el-input>
+        </el-form-item>
 
         <el-form-item label="鎮h�呰寖鍥�" prop="status">
           <el-cascader
@@ -179,7 +185,7 @@
             </div>
           </div>
         </el-col>
-        <el-col :span="1.5">
+        <!-- <el-col :span="1.5">
           <div class="documentf">
             <div class="document">
               <el-button
@@ -191,7 +197,7 @@
               >
             </div>
           </div>
-        </el-col>
+        </el-col> -->
         <el-col :span="1.5">
           <div class="documentf">
             <div class="document">
@@ -394,8 +400,8 @@
         <el-table-column
           label="绉戝"
           align="center"
-          key="deptname"
-          prop="deptname"
+          key="leaveldeptname"
+          prop="leaveldeptname"
           width="120"
         >
         </el-table-column>
@@ -752,7 +758,7 @@
           <el-input
             style="width: 400px"
             disabled
-            v-model="zcform.deptname"
+            v-model="zcform.leaveldeptname"
           ></el-input>
         </el-form-item>
         <el-form-item label="鐥呭尯">
@@ -842,6 +848,8 @@
       total: 0,
       // 鐢ㄦ埛琛ㄦ牸鏁版嵁
       userList: null,
+      jgvalue: 0,
+
       // 寮瑰嚭灞傛爣棰�
       title: "鏂板褰卞儚闅忚",
       // 鏄惁鏄剧ず淇敼銆佹坊鍔犲脊鍑哄眰
@@ -864,7 +872,7 @@
       dynamicTags: ["閫夐」涓�", "閫夐」浜�", "閫夐」涓�"], //閫夐」
       inputVisible: false,
       Labelchange: false,
-      ycvalue: "",
+      ycvalue: 0,
       yfsvalue: "",
       inputValue: "",
       preachform: "",
@@ -1109,7 +1117,21 @@
       rules: {},
     };
   },
-  watch: {},
+  watch: {
+    // 鍙充笅瑙掋�屽緟澶勭悊闅忚浠诲姟銆嶅崱鐗囧啀娆$偣鍑伙紙褰撳墠宸插湪鏈〉锛�
+    "$route.query": {
+      handler(newQuery) {
+        if (
+          newQuery?.month &&
+          newQuery?.fromPendingTask === "1" &&
+          this.taskQueryReady
+        ) {
+          this.applyPendingTaskQuery();
+        }
+      },
+      immediate: true,
+    },
+  },
   created() {
     this.serviceState = store.getters.serviceState;
     this.checkboxlist = store.getters.checkboxlist;
@@ -1128,7 +1150,9 @@
         value: dept.districtCode,
       };
     });
-    if (this.errtype) {
+    if (this.applyPendingTaskQuery()) {
+      // 鍙充笅瑙掋�屽緟澶勭悊闅忚浠诲姟銆嶅崱鐗囪烦杞細宸叉寜骞存湀 + 寰呴殢璁挎潯浠舵煡璇�
+    } else if (this.errtype) {
       this.toleadExport(2);
     } else {
       this.getList(1);
@@ -1136,8 +1160,13 @@
     this.getConfigKey("sys.user.initPassword").then((response) => {
       this.initPassword = response.msg;
     });
+    // created 鍒濆鍖栧畬鎴愶紝涔嬪悗璺敱 query 鍙樺寲鎵嶆寜鍗$墖鏉′欢閲嶆柊鏌ヨ
+    this.taskQueryReady = true;
   },
   activated() {
+    if (this.applyPendingTaskQuery()) {
+      return;
+    }
     this.getList(1);
   },
   methods: {
@@ -1219,8 +1248,10 @@
       this.getList(1);
     },
     onthatday() {
-      this.topqueryParams.startSendDateTime = this.getCurrentDate();
-      this.topqueryParams.endSendDateTime = this.getCurrentDate();
+      this.topqueryParams.sendstateView = 1; // 寰呴殢璁�
+      this.topqueryParams.sendstate = null;
+      this.topqueryParams.startSendDateTime = null;
+      this.topqueryParams.endSendDateTime = this.getCurrentDate(); // 寮�濮嬮殢璁挎棩鏈� <= 浠婂ぉ
       this.getList(1);
     },
     getCurrentDate() {
@@ -1228,13 +1259,12 @@
       return now.toISOString().slice(0, 10); // 鎴彇鍓�10涓瓧绗︼紝鍗� YYYY-MM-DD
     },
     buidegetTasklist(type) {
-      if (this.topqueryParams.searchscope == 3) {
-        this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
-          (obj) => obj.deptCode
-        );
-        this.topqueryParams.leavehospitaldistrictcodes =
-          store.getters.belongWards.map((obj) => obj.districtCode);
-      }
+      // 鐢ㄦ埛鏉冮檺涓嬫墍鏈夊緟闅忚浠诲姟锛氫紶閫掑叏閮ㄧ瀹ゅ拰鐥呭尯
+      this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
+        (obj) => obj.deptCode
+      );
+      this.topqueryParams.leavehospitaldistrictcodes =
+        store.getters.belongWards.map((obj) => obj.districtCode);
       // 鎺ュ彈寮傚父璺宠浆
       if (this.errtype) {
         this.topqueryParams.leavehospitaldistrictcodes.push(
@@ -1246,7 +1276,7 @@
         pageSize: 10,
         leavehospitaldistrictcodes:
           this.topqueryParams.leavehospitaldistrictcodes,
-        sendstates: [2, 3],
+        sendstateView: 1,
         leaveldeptcodes: this.topqueryParams.leaveldeptcodes,
       };
       buidegetTasklist(obj).then((response) => {
@@ -1341,6 +1371,60 @@
       };
       this.resetForm("form");
     },
+    /**
+     * 鍙充笅瑙掋�屽緟澶勭悊闅忚浠诲姟銆嶅崱鐗囩偣鍑绘暟瀛楄烦杞繃鏉ワ細
+     * 鎸夊嚭闄㈠勾鏈� + 寰呴殢璁匡紙sendstate 1/2/3/5/7锛�+ 鍑洪櫌婊� 7 澶� 杩囨护锛屽彛寰勪笌鍗$墖涓�鑷�
+     * @returns {boolean} 鏄惁宸叉寜鍗$墖鏉′欢鍙戣捣鏌ヨ
+     */
+    applyPendingTaskQuery() {
+      const query = this.$route.query || {};
+      if (!query.month || query.fromPendingTask !== "1") {
+        return false;
+      }
+      // 椤甸潰琚� keep-alive 澶嶇敤鏃朵細閲嶅瑙﹀彂 activated锛屽悓涓�娆$偣鍑诲彧澶勭悊涓�娆�
+      if (this.pendingTaskToken && this.pendingTaskToken === query._t) {
+        return false;
+      }
+      this.pendingTaskToken = query._t;
+
+      const month = String(query.month);
+      const serviceType = Number(query.serviceType) === 3 ? 3 : 2;
+      this.errtype = undefined;
+      const start = month + "-01";
+      let end = this.pendingTaskMonthEnd(month);
+      // 鏈堝垵 7 澶╁唴锛�"浠婂ぉ-7澶�" 浼氭棭浜庢湀鍒濓紝鍏滃簳鎴愭湀鍒濓紝閬垮厤鏃ユ湡鍖洪棿鍊掓寕
+      if (end < start) {
+        end = start;
+      }
+      this.dateRange = [start, end];
+      this.topqueryParams.serviceType = serviceType;
+      this.topqueryParams.sendstateView = 1;
+      this.topqueryParams.sendstate = null;
+      // 鍗$墖缁熻鐨勬槸鍏ㄩ儴寰呴殢璁夸换鍔★紙涓嶅尯鍒嗛杞�/澶嶈瘖锛夛紝鍒楄〃杩欓噷鍚屾鏀惧紑
+      this.topqueryParams.visitCount = null;
+      this.topqueryParams.pageNum = 1;
+      this.handleQuery(1);
+      return true;
+    },
+    /**
+     * 鍗$墖鍙e緞鐨勬湀浠界粨鏉熸棩锛�
+     * 褰撴湀鍙粺璁″嚭闄㈡弧 7 澶╃殑锛屾墍浠ュ彇銆屼粖澶� - 7 澶┿�嶏紱鍘嗗彶鏈堜唤鍙栧綋鏈堟渶鍚庝竴澶�
+     */
+    pendingTaskMonthEnd(month) {
+      const parts = String(month).split("-");
+      const year = Number(parts[0]);
+      const mon = Number(parts[1]);
+      const now = new Date();
+      let date;
+      if (year === now.getFullYear() && mon === now.getMonth() + 1) {
+        date = new Date(year, mon - 1, now.getDate() - 7);
+      } else {
+        date = new Date(year, mon, 0);
+      }
+      const mm = String(date.getMonth() + 1).padStart(2, "0");
+      const dd = String(date.getDate()).padStart(2, "0");
+      return date.getFullYear() + "-" + mm + "-" + dd;
+    },
     /** 鎼滅储鎸夐挳鎿嶄綔 */
     handleQuery(refresh) {
       if (this.topqueryParams.searchscope == 3) {
@@ -1410,10 +1494,12 @@
     resetQuery() {
       this.dateRange = [];
       this.dateRangefs = [];
+      this.serviceStatusValue = 10;
+
       this.topqueryParams = {
         pageNum: 1,
         pageSize: 10,
-        sendstateView:2,
+        sendstateView:1,
         sort: 2, //0 鍑洪櫌鏃堕棿(姝e簭)    1 鍑洪櫌鏃堕棿(鍊掑簭)   2 鍙戦�佹椂闂�(姝e簭)    3 鍙戦�佹椂闂�(鍊掑簭)
         serviceType: 3,
         searchscope: 3,
@@ -1732,8 +1818,8 @@
 <style lang="scss" scoped>
 .el-button--primary.is-plain {
   color: #ffffff;
-  background: #409eff;
-  border-color: #4fabe9;
+  background: #5b7cfa;
+  border-color: #5b7cfa;
 }
 
 .document {
@@ -1908,4 +1994,75 @@
   flex-shrink: 0;
   margin-top: 2px;
 }
+/* ================= 娓呮柊楂樼骇绠�绾﹂ ================= */
+.app-container {
+  background: #f5f7fb;
+  border-radius: 14px;
+  padding: 20px;
+}
+
+/* 鏌ヨ琛ㄥ崟锛氱櫧鑹插渾瑙掑崱鐗� */
+::v-deep .el-form--inline {
+  background: #ffffff;
+  border-radius: 14px;
+  padding: 22px 22px 8px;
+  margin-bottom: 18px;
+  box-shadow: 0 2px 12px rgba(31, 45, 61, 0.05);
+}
+
+/* 闅愯棌鍒嗗壊绾� */
+::v-deep .el-divider {
+  display: none;
+}
+
+/* 宸ュ叿鏍忓簳閮ㄩ棿璺� */
+.mb8 {
+  margin-bottom: 18px;
+}
+
+/* 鎸夐挳锛氬渾瑙� + 鏌斿拰杩囨浮 */
+::v-deep .el-button {
+  border-radius: 8px;
+  font-weight: 500;
+  transition: all 0.25s ease;
+}
+
+/* 涓绘寜閽細娓呮柊闈涜摑 */
+::v-deep .el-button--primary:not(.is-plain) {
+  background: #5b7cfa;
+  border-color: #5b7cfa;
+}
+::v-deep .el-button--primary:not(.is-plain):hover,
+::v-deep .el-button--primary:not(.is-plain):focus {
+  background: #7593fb;
+  border-color: #7593fb;
+}
+
+/* 琛ㄦ牸锛氱櫧鑹插渾瑙掑崱鐗� + 鏌斿拰琛ㄥご */
+::v-deep .el-table {
+  border-radius: 14px;
+  overflow: hidden;
+  box-shadow: 0 2px 12px rgba(31, 45, 61, 0.05);
+}
+::v-deep .el-table::before {
+  display: none;
+}
+::v-deep .el-table th {
+  background: #f7f9fd !important;
+  color: #3f4d63;
+  font-weight: 600;
+}
+::v-deep .el-table td {
+  padding: 12px 0;
+}
+
+/* 鏍囩鍦嗚 */
+::v-deep .el-tag {
+  border-radius: 6px;
+}
+
+/* 鍒嗛〉闂磋窛 */
+::v-deep .pagination-container {
+  padding-top: 18px;
+}
 </style>

--
Gitblit v1.9.3