From 8925a21e020cdaee64924f3243898c4d86038fa2 Mon Sep 17 00:00:00 2001
From: lkk <364857242@qq.com>
Date: 星期四, 05 六月 2025 13:56:52 +0800
Subject: [PATCH] 1

---
 src/views/doctor/checkAll/index.vue |  311 +++++++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 261 insertions(+), 50 deletions(-)

diff --git a/src/views/doctor/checkAll/index.vue b/src/views/doctor/checkAll/index.vue
index b05ef0b..22a0081 100644
--- a/src/views/doctor/checkAll/index.vue
+++ b/src/views/doctor/checkAll/index.vue
@@ -59,8 +59,11 @@
           :show-overflow-tooltip="true"
           width="110px"
         /> -->
-        <el-table-column label="瀹℃牳鏃堕棿" align="center" prop="shsj" :show-overflow-tooltip="true" width="180px" />
-        <el-table-column label="瀹屾垚鏃堕棿" align="center" prop="finishTime" :show-overflow-tooltip="true" width="160px" />
+        <el-table-column v-if="tjStatus === '1'" label="瀹℃牳鏃堕棿" align="center" prop="shsj" :show-overflow-tooltip="true"
+          width="180px" />
+        <el-table-column v-if="tjStatus === '0'" label="瀹屾垚鏃堕棿" align="center" prop="finishTime"
+          :show-overflow-tooltip="true" width="160px" />
+        <el-table-column label="濂楅鍚嶇О" align="center" prop="pacName" :show-overflow-tooltip="true" width="160px" />
         <el-table-column label="鐘舵��" align="center" prop="tjStatus" :show-overflow-tooltip="true" width="120px">
           <template slot-scope="scope">
             <span>{{ scope.row.tjStatus == "1" ? "宸插鏍�" : "鏈鏍�" }}</span>
@@ -75,12 +78,12 @@
         <el-table-column label="鎿嶄綔" align="center" width="120px" fixed="right">
           <template slot-scope="scope">
             <el-button fixed="right" title="璇︽儏" type="text" size="mini" @click.stop="handleClick(scope.row)"
-            icon="el-icon-document-copy"></el-button>
+              icon="el-icon-document-copy"></el-button>
             <el-button fixed="right" title="鍚屾" type="text" size="mini" @click.stop="tongbu(scope.row)"
-            icon="el-icon-upload2"></el-button>
+              v-if="scope.row.tjStatus != '1'" icon="el-icon-upload2"></el-button>
             <el-button fixed="right" title="澶勬柟" type="text" size="mini" @click.stop="rowClick(scope.row)"
               icon="el-icon-edit-outline"></el-button>
- 
+
             <!-- <el-button type="text" size="mini" @click="generate(scope.row)" v-if="scope.row.tjStatus=='1'">鐢熸垚</el-button> -->
             <el-button type="text" size="mini" @click.stop="viewReport(scope.row)" v-if="scope.row.tjStatus == '1'"
               title="棰勮" icon="el-icon-view"></el-button>
@@ -98,9 +101,9 @@
       </div>
     </template>
 
-    <!-- 鐐瑰嚮寮瑰嚭妗� -->
-    <el-drawer custom-class="tanchu" :visible.sync="drawer" :before-close="handleClose" :with-header="false" size="100%"
-      show-close="true">
+    <!-- 鐐瑰嚮寮瑰嚭妗�   show-close="true"-->
+    <el-drawer custom-class="tanchu" :visible.sync="drawer" :before-close="handleClose" :with-header="false"
+      size="100%">
       <div class="top">
         <table style="
             width: 100%;
@@ -125,16 +128,16 @@
               {{ tableAll.cusName }}
             </td>
             <td style="border: 1px solid #dfe6ec; border-collapse: collapse">
-              鎬у埆锛�
-            </td>
-            <td style="border: 1px solid #dfe6ec; border-collapse: collapse">
-              {{
+              鎬у埆锛歿{
                 tableAll.cusSex == 0
                   ? "鐢�"
                   : tableAll.cusSex == 1
                     ? "濂�"
                     : "鏈煡"
               }}
+            </td>
+            <td style="border: 1px solid #dfe6ec; border-collapse: collapse">
+              骞撮緞锛歿{ tableAll.age }}
             </td>
           </tr>
           <tr style="
@@ -180,6 +183,9 @@
         </div>
         <div class="btn1">
           <el-button @click="yichangjieguo()" type="primary"><span class="vertical-text">寮傚父缁撴灉</span></el-button>
+        </div>
+        <div class="btn1">
+          <el-button @click="fuchaxiangmu()" type="primary"><span class="vertical-text">澶嶆煡椤圭洰</span></el-button>
         </div>
       </div>
       <div class="box">
@@ -244,7 +250,10 @@
                       ">
                       涓绘鍖诲笀锛�
                     </td>
-                    <td style="border: 1px solid #dfe6ec; border-collapse: collapse" colspan="2">
+                    <td style="
+                        border: 1px solid #dfe6ec;
+                        border-collapse: collapse;
+                      " colspan="2">
                       {{ item.doctorName }}
                     </td>
                   </tr>
@@ -260,7 +269,10 @@
                       ">
                       澶囨敞锛�
                     </td>
-                    <td style="border: 1px solid #dfe6ec; border-collapse: collapse" colspan="3">
+                    <td style="
+                        border: 1px solid #dfe6ec;
+                        border-collapse: collapse;
+                      " colspan="3">
                       <el-input type="textarea" autosize placeholder="璇疯緭鍏ュ唴瀹�" v-model="changedate[index].remark"
                         v-on:input="change" style="width: 100%">
                       </el-input>
@@ -305,7 +317,10 @@
                       ">
                       妫�鏌ユ彁绀猴細
                     </td>
-                    <td style="border: 1px solid #dfe6ec; border-collapse: collapse" colspan="2">
+                    <td style="
+                        border: 1px solid #dfe6ec;
+                        border-collapse: collapse;
+                      " colspan="2">
                       <el-input type="textarea" autosize placeholder="璇疯緭鍏ュ唴瀹�" v-model="item.remark" style="width: 100%">
                       </el-input>
                       <!-- <textarea
@@ -328,7 +343,10 @@
                       ">
                       涓绘鍖诲笀锛�
                     </td>
-                    <td style="border: 1px solid #dfe6ec; border-collapse: collapse" colspan="2">
+                    <td style="
+                        border: 1px solid #dfe6ec;
+                        border-collapse: collapse;
+                      " colspan="2">
                       {{ item.doctorName }}
                     </td>
                   </tr>
@@ -373,9 +391,11 @@
                     :header-cell-style="{ background: '#67C23A' }" :expand-row-keys="expends" :row-key="getRowKeys">
                     <el-table-column type="expand">
                       <template slot-scope="props">
-                        <div style="padding: 10px;">
+                        <div style="padding: 10px">
                           <!-- 鍐呭鍖哄煙 -->
-                          <div v-if="props.row.advices && props.row.advices.length > 0">
+                          <div v-if="
+                            props.row.advices && props.row.advices.length > 0
+                          ">
                             <div v-for="(jianyi, index1) in props.row.advices" :key="index1"
                               style="margin-bottom: 10px">
                               <div>
@@ -401,8 +421,7 @@
                             </div>
                           </div>
 
-
-                          <div style="margin-top: 10px;">
+                          <div style="margin-top: 10px">
                             <el-button @click="shanchu(props.row)" type="danger" size="small">鍒犻櫎</el-button>
                           </div>
                         </div>
@@ -422,7 +441,6 @@
 
                     <el-table-column align="center" prop="proAdvice" label="鍗曚綅" width="78">
                     </el-table-column>
-
                   </el-table>
                 </template>
                 <template v-if="item.jyjc == '1'">
@@ -430,9 +448,11 @@
                     :header-cell-style="{ background: '#67C23A' }" :expand-row-keys="expends" :row-key="getRowKeys">
                     <el-table-column type="expand">
                       <template slot-scope="props">
-                        <div style="padding: 10px;">
+                        <div style="padding: 10px">
                           <!-- 鍐呭鍖哄煙 -->
-                          <div v-if="props.row.advices && props.row.advices.length > 0">
+                          <div v-if="
+                            props.row.advices && props.row.advices.length > 0
+                          ">
                             <div v-for="(jianyi, index1) in props.row.advices" :key="index1"
                               style="margin-bottom: 10px">
                               <div>
@@ -458,8 +478,7 @@
                             </div>
                           </div>
 
-
-                          <div style="margin-top: 10px;">
+                          <div style="margin-top: 10px">
                             <el-button @click="shanchu(props.row)" type="danger" size="small">鍒犻櫎</el-button>
                           </div>
                         </div>
@@ -505,11 +524,43 @@
                 </el-table>
               </div>
             </template>
-          </div>
-        </div>
-      </div>
+            <template v-if="status1 == 2">
+              <div>
+                <div style="text-align: center; margin-top: 10px;">
+                  澶嶆煡椤圭洰
+                </div>
+                <div style="display: flex;margin:15px ;">
+                  <span slot="label" style="display: inline-block; border-bottom: 2px solid blue;font-size: 0.8vw;"
+                    @click="handleQuery">
+                    椤圭洰閫夋嫨
+                  </span>
+                  <div v-if="xmChange.length > 0" style="display: flex;">
+                    <div style="margin:0 40px;font-size: 0.8vw;">椤圭洰鍚嶇О锛歿{ xmChange[0].proName || "" }}</div>
+                    <div style="margin:0 40px ;font-size: 0.8vw;">浠锋牸锛歿{ xmChange[0].price || "" }}</div>
+                  </div>
+                  <div v-else style="display: flex;">
+                    <div style="margin:0 40px;font-size: 0.8vw;">椤圭洰鍚嶇О锛歿{ }}</div>
+                    <div style="margin:0 40px ;font-size: 0.8vw;">浠锋牸锛歿{ }}</div>
+                  </div>
+                  <el-button type="primary" size="mini" @click="handleaddClick()">娣诲姞</el-button>
+                </div>
 
-      <div class="hist3" v-if="wenzhen">
+                <el-table :row-style="redxiangmu" :data="fcList" style="width: 100%">
+                  <el-table-column type="selection" width="40" align="center" />
+                  <el-table-column label="搴忓彿" align="center" prop="newID" />
+                  <el-table-column label="鍚嶇О" align="center" prop="proName" width="100px" />
+                  <el-table-column label="浠锋牸" align="center" prop="price" />
+                  <el-table-column label="绉戝" align="center" prop="deptName" />
+                  <el-table-column label="鎿嶄綔" align="center" width="130px">
+                    <template slot-scope="scope">
+                      <el-button type="primary" size="mini" @click="handledeleteClick(scope.row)">鍒犻櫎</el-button>
+                    </template>
+                  </el-table-column>
+                </el-table>
+              </div>
+            </template>
+            <template v-if="status1 == 3">
+              <div class="hist3" >
         <span class="txt">闂瘖淇℃伅</span>
         <el-form ref="form" :model="formobj" label-width="100px" :inline="true" size="mini">
           <el-collapse class="coll" v-model="activeName" accordion>
@@ -709,8 +760,30 @@
           </el-collapse>
         </el-form>
       </div>
+            </template>
+          </div>
+        </div>
+      </div>
+
+     
     </el-drawer>
 
+    <el-dialog :visible.sync="xmopen" width="800px" append-to-body>
+      <div style="margin: 20px;">
+        <el-table :data="datasList" ref="elTable" v-loading="loading" @selection-change="handlexmChange" border
+          height="320px">
+          <el-table-column type="selection" width="40" align="center" />
+          <el-table-column label="鍚嶇О" align="center" prop="proName" width="100px" />
+          <el-table-column label="浠锋牸" align="center" prop="price" />
+          <el-table-column label="绉戝" align="center" prop="deptName" />
+        </el-table>
+      </div>
+
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFormxm">纭� 瀹�</el-button>
+        <el-button @click="cancels">鍙� 娑�</el-button>
+      </div>
+    </el-dialog>
     <el-dialog title="PDF 棰勮" :visible.sync="dialogVisible" :close-on-click-modal="false" width="50%">
       <div class="main">
         <iframe id="printIframe" :src="url" frameborder="0" style="width: 100%; height: 100%"></iframe>
@@ -724,7 +797,7 @@
     </el-dialog>
     <Packages ref="bbb" :baogao="baogao" />
     <Prescription ref="Pre" :preObj="preObj" />
-    <proposal ref="proposal" :cusobj="cusobj" @event1="eventchange($event)" />
+    <proposal ref="proposal" :cusobj="cusobj" :tjNumber="tjNumber" @event1="eventchange($event)" />
     <createproposal ref="createproposal" :creatobj="creatobj" />
 
     <el-dialog title="甯哥敤寤鸿缁存姢" :visible.sync="propdialog" width="500px" append-to-body>
@@ -751,14 +824,15 @@
   gettoPdf,
   getModified,
   isPdfOrJimu,
-  addOrder,
+  addOrder,UpdFcPro,
+  getFcList
 } from "@/api/doctor/checkAll";
 import { getInfoById } from "@/api/hosp/history";
 import { getInfo } from "@/api/login";
 import { getCompany, queryCompany } from "@/api/team/tuanti";
 import { reportHistory, yichang, shanchu } from "@/api/doctor/check";
 import { getPdf, revoke } from "@/api/hosp/order";
-import { cSWebGetPro,dataSynchronization } from "@/api/doctor/examination";
+import { cSWebGetPro, dataSynchronization } from "@/api/doctor/examination";
 import ViewPdf from "@/components/ViewPdf";
 import Historicalreport from "@/components/Historicalreport";
 import { getDicts } from "@/api/system/dict/data";
@@ -802,12 +876,13 @@
       preObj: {},
       baogao: [],
       flags: false,
+      fcList: [],
+      xmopen: false,
+      datasList: [],
       jianqianwenzhendata: [],
       jianqians: false,
       sex: true,
       activeName: "1",
-      wenzhen: false,
-      hosproy: true,
       remarks: "",
       remark: "",
       creatobj: {},
@@ -899,6 +974,7 @@
       // 鏌ヨ鍙傛暟
       yichangList: [],
       statusList: [],
+      xmChange: [],
       queryParam: {
         pageNum: 1,
         pageSize: 10,
@@ -957,32 +1033,32 @@
       dataSynchronization(tjNumber)
         .then((res, error) => {
           if (res.code == 200) {
-          
             this.clearTimeSet = null;
             this.$modal.closeLoading();
             this.$modal.msgSuccess("鍚屾鎴愬姛锛�");
           }
         })
         .catch((error) => {
-        
           this.clearTimeSet = null;
           this.$modal.closeLoading();
         });
     },
-    shanchu(row) {
-      console.log(row)
+    /*  shanchu(row) {
+      console.log(row);
       shanchu({
         id: row.orderDetailId,
       }).then((res) => {
         console.log(res);
         // 鎵惧埌瑕佸垹闄ら」鎵�鍦ㄧ殑鐖剁骇鏁扮粍
-        const parentItem = this.yichangList.find(item =>
-          item.sone.some(soneItem => soneItem.proId === row.proId)
+        const parentItem = this.yichangList.find((item) =>
+          item.sone.some((soneItem) => soneItem.proId === row.proId)
         );
 
         if (parentItem) {
           // 浠庣埗绾х殑 sone 鏁扮粍涓垹闄よ椤�
-          const index = parentItem.sone.findIndex(item => item.proId === row.proId);
+          const index = parentItem.sone.findIndex(
+            (item) => item.proId === row.proId
+          );
           if (index > -1) {
             parentItem.sone.splice(index, 1);
 
@@ -997,11 +1073,61 @@
             // 鏇存柊 expends 鏁扮粍
             this.getExpends();
 
-            this.$message.success('鍒犻櫎鎴愬姛');
+            this.$message.success("鍒犻櫎鎴愬姛");
           }
         }
-      })
+      });
+    }, */
+    shanchu(row) {
+      this.isdisabled = true;
 
+      shanchu({
+        id: row.orderDetailId,
+      })
+        .then((res) => {
+          console.log(res, 1111);
+
+          if (res.code === 200) {
+            const parentItem = this.yichangList.find((item) =>
+              item.sone.some(
+                (soneItem) => soneItem.orderDetailId === row.orderDetailId
+              )
+            );
+
+            if (parentItem) {
+              const index = parentItem.sone.findIndex(
+                (item) => item.orderDetailId === row.orderDetailId
+              );
+              if (index > -1) {
+                parentItem.sone.splice(index, 1);
+
+                if (parentItem.sone.length === 0) {
+                  const parentIndex = this.yichangList.indexOf(parentItem);
+                  if (parentIndex > -1) {
+                    this.yichangList.splice(parentIndex, 1);
+                  }
+                }
+
+                this.getExpends();
+                this.$forceUpdate();
+                this.$message.success("鍒犻櫎鎴愬姛");
+              } else {
+                this.$message.error("鏈壘鍒拌鍒犻櫎鐨勫瓙椤�");
+              }
+            } else {
+              this.$message.error("鏈壘鍒拌鍒犻櫎鐨勭埗椤�");
+            }
+          } else {
+            this.$message.error("鍚庣鍒犻櫎澶辫触锛�" + (res.msg || "鏈煡閿欒"));
+          }
+        })
+        .catch((error) => {
+          console.error("鍒犻櫎澶辫触:", error);
+          this.$message.error("鍒犻櫎鎿嶄綔澶辫触锛�" + error.message);
+        })
+        .finally(() => {
+          this.isdisabled = false;
+        });
     },
     getConfigKey() {
       getconfigKey("sfkqtwbg").then((res) => {
@@ -1036,6 +1162,88 @@
         }
       });
     },
+
+    fuchaxiangmu() {
+      this.loading = true;
+      this.status1 = 2;
+      let data = {
+        tjNum: this.tjNumber,
+        type: 1
+      };
+      getFcList(data)
+        .then((res) => {
+          this.fcList = res.data;
+          this.fcList.forEach((item,index) => {
+            item.newID = index + 1;
+          })
+        })
+        .catch((error) => {
+          console.error('鑾峰彇澶嶆煡椤圭洰澶辫触:', error);
+          this.$message.error('鑾峰彇澶嶆煡椤圭洰澶辫触');
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+
+    handleQuery() {
+      this.xmopen = true
+      let data = {
+        tjNum: this.tjNumber,
+        type: 0
+      }
+      getFcList(data).then(res => {
+        this.datasList = res.data
+      })
+    },
+
+    handleaddClick() {
+      console.log(this.xmChange)
+      let data = {
+        orderId: this.xmChange[0].orderId,
+        data: [{
+          proId: this.xmChange[0].proId,
+          type: 1
+        }]
+      }
+      UpdFcPro(data).then(res => {
+        if (res.code == 200) {
+          this.xmChange = []
+          this.fuchaxiangmu()
+        }
+      })
+    },
+
+    handledeleteClick(row) {
+      let data = {
+        orderId: row.orderId,
+        data: [{
+          proId: row.proId,
+          type: 0
+        }]
+      }
+      UpdFcPro(data).then(res => {
+        if (res.code == 200) {
+          this.fuchaxiangmu()
+        }
+      })
+    },
+
+    handlexmChange(selection) {
+      this.xmChange = []
+      this.xmChange = selection
+      if (selection.length > 1) {
+        let del_row = selection.shift();
+        this.$refs.elTable.toggleRowSelection(del_row, false); //璁剧疆杩欎竴琛屽彇娑堥�変腑
+      }
+    },
+    submitFormxm() {
+      this.xmopen = false
+    },
+    cancels() {
+      this.xmopen = false
+      this.xmChange = []
+    },
     guanbi() {
       this.drawer = false;
     },
@@ -1047,7 +1255,7 @@
       }).then((res) => {
         this.yichangList = res.data;
 
-        console.log(this.yichangList, 3232);
+        // console.log(this.yichangList, 3232);
         this.getExpends();
 
         this.yichangList.forEach((item) => {
@@ -1176,7 +1384,7 @@
               }, 3000);
               this.$message({
                 message: "鎶ュ憡姝e湪鐢熸垚锛岃涓ゅ垎閽熷悗棰勮锛�",
-                type: "error"
+                type: "error",
               });
             } else {
               this.dialogVisible = true;
@@ -1240,8 +1448,6 @@
 
     historicalreport() {
       this.loading = true;
-      this.wenzhen = false;
-      this.hosproy = true;
       let data = {
         cusId: this.tableAll.cusId,
       };
@@ -1256,8 +1462,7 @@
     },
 
     medicalhistory() {
-      this.wenzhen = true;
-      this.hosproy = false;
+      this.status1 = 3;
       let tjNumber = this.tableAll.tjNumber;
       getInfoById(tjNumber).then((response) => {
         this.formobj = response.data;
@@ -1335,11 +1540,16 @@
     },
     eventchange(data) {
       this.dataText = data;
+      console.log(data, 6655);
+
       if (this.textarea1 == null) {
         this.textarea1 = "";
       }
-      data.forEach((item) => {
+      /* data.forEach((item) => {
         this.textarea1 += item.advice;
+      }); */
+      data.forEach((item) => {
+        this.textarea1 += (item.advice || item.jynr || "") + "\n";
       });
     },
     proposalChange() {
@@ -1390,6 +1600,7 @@
           if (res.data) {
             // this.Testitems = res.data
             this.changedate = res.data;
+
             this.changedate.forEach((item) => {
               this.textarea1 = item.checkAdvice;
             });

--
Gitblit v1.8.0