From 72ab160441fb85d65813789dfa3f15a60e6de764 Mon Sep 17 00:00:00 2001
From: lkk <364857242@qq.com>
Date: 星期二, 15 七月 2025 18:02:29 +0800
Subject: [PATCH] 1

---
 src/views/doctor/checkAll/index.vue |  257 +++++++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 227 insertions(+), 30 deletions(-)

diff --git a/src/views/doctor/checkAll/index.vue b/src/views/doctor/checkAll/index.vue
index b301dcd..3518837 100644
--- a/src/views/doctor/checkAll/index.vue
+++ b/src/views/doctor/checkAll/index.vue
@@ -1,7 +1,6 @@
 <template>
   <div class="mainbox">
-    <el-form :model="queryParams" ref="tableList" :inline="true" label-width="76px" style="margin-top: 10px"
-      v-if="tjStatus == 0">
+       <el-form :model="queryParams" ref="tableList" :inline="true" label-width="76px" style="margin-top: 10px">
       <el-form-item label="濮撳悕" prop="name">
         <el-input v-model="queryParams.name" style="width: 120px" placeholder="璇疯緭鍏ュ鍚�" clearable
           @keyup.enter.native="submitForm"></el-input>
@@ -10,11 +9,15 @@
         <el-input ref="inputName" v-model="queryParams.tjNumber" style="width: 180px" placeholder="璇疯緭鍏ヤ綋妫�鍙�" clearable
           @keyup.enter.native="submitForm" @blur="hb"></el-input>
       </el-form-item>
-      <el-form-item label="浣撴鏃堕棿" prop="tjTime">
-        <el-date-picker v-model="startTime" type="datetimerange" align="right" :picker-options="pickerOptions"
-          style="width: 310px" start-placeholder="寮�濮嬫棩鏈�" end-placeholder="缁撴潫鏃ユ湡" :default-time="['00:00:00', '23:00:00']"
-          format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm" @change="dateChangebirthday1">
-        </el-date-picker>
+       <el-form-item label="浣撴绫诲埆">
+                <el-select style="width: 200px" v-model="queryParams.tjCategory" placeholder="璇烽�夋嫨浣撴绫诲埆">
+                  <el-option v-for="dict in dict.type.dict_tjtype" :key="dict.value" :label="dict.label"
+                    :value="dict.value"></el-option>
+                </el-select>
+              </el-form-item>
+      <el-form-item label="濂楅鍚嶇О" prop="tcm">
+        <el-input v-model="queryParams.tcm" style="width: 120px" placeholder="璇疯緭鍏ュ椁愬悕绉�" clearable
+          @keyup.enter.native="submitForm"></el-input>
       </el-form-item>
       <el-form-item label="鍗曚綅鍚嶇О" prop="tjCompName" style="margin-left: 20px">
         <el-select :remote-method="getRemoteData" v-model="queryParams.tjCompName" value-key="drugManufacturerId"
@@ -22,21 +25,37 @@
           <el-option v-for="dict in CompanyList" :key="dict.drugManufacturerId" :label="dict.cnName" :value="dict" />
         </el-select>
       </el-form-item>
-      <el-form-item label="浣撴绫诲埆">
-        <el-select style="width: 200px" v-model="queryParams.tjCategory" placeholder="璇烽�夋嫨浣撴绫诲埆">
-          <el-option v-for="dict in dict.type.dict_tjtype" :key="dict.value" :label="dict.label"
-            :value="dict.value"></el-option>
-        </el-select>
-        <!-- <el-input v-model="form.category" placeholder="璇疯緭鍏ヤ綋妫�绫诲埆" /> -->
-      </el-form-item>
+
       <el-form-item>
         <el-button type="primary" size="mini" @click="submitForm" style="margin-right: 15px">鎼滅储</el-button>
         <el-button size="mini" @click="resetQuery">閲嶇疆</el-button>
+        <el-button type="primary" size="mini" @click="toggleCollapse" style="margin-right: 15px"
+          v-show="isCollapsed == 0">楂樼骇鎼滅储</el-button>
+        <el-button type="primary" size="mini" @click="toggleCollapse3" style="margin-right: 15px"
+          v-show="isCollapsed == 1">楂樼骇鎼滅储</el-button>
       </el-form-item>
+      <el-row v-show="isCollapsed == 1" :gutter="20">
+         <el-col :span="4">
+        <el-form-item label="瀹℃牳鍖诲笀" prop="shys">
+          <el-input ref="inputName" v-model="queryParams.shys" style="width: 120px" placeholder="璇疯緭鍏ュ鏍稿尰甯�" clearable
+            @keyup.enter.native="submitForm"></el-input>
+        </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="浣撴鏃堕棿" prop="tjTime">
+            <el-date-picker v-model="startTime" type="datetimerange" align="right" :picker-options="pickerOptions"
+              style="width: 310px" start-placeholder="寮�濮嬫棩鏈�" end-placeholder="缁撴潫鏃ユ湡"
+              :default-time="['00:00:00', '23:00:00']" format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm"
+              @change="dateChangebirthday1">
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+
+      </el-row>
     </el-form>
 
 
-    <el-form :model="queryParams" ref="tableList" :inline="true" label-width="76px" style="margin-top: 10px"
+    <!-- <el-form :model="queryParams" ref="tableList" :inline="true" label-width="76px" style="margin-top: 10px"
       v-if="tjStatus == 1">
       <el-form-item label="濮撳悕" prop="name">
         <el-input v-model="queryParams.name" style="width: 120px" placeholder="璇疯緭鍏ュ鍚�" clearable
@@ -62,7 +81,7 @@
           <el-option v-for="dict in dict.type.dict_tjtype" :key="dict.value" :label="dict.label"
             :value="dict.value"></el-option>
         </el-select>
-        <!-- <el-input v-model="form.category" placeholder="璇疯緭鍏ヤ綋妫�绫诲埆" /> -->
+        <el-input v-model="form.category" placeholder="璇疯緭鍏ヤ綋妫�绫诲埆" /> 
       </el-form-item>
       <el-form-item>
         <el-button type="primary" size="mini" @click="submitForm" style="margin-right: 15px">鎼滅储</el-button>
@@ -84,16 +103,23 @@
         </el-col>
       </el-row>
 
-    </el-form>
+    </el-form> -->
 
     <el-radio-group v-model="tjStatus" @input="radioChange" style="margin-left: 20px">
       <el-radio-button label="0">鏈鏍�</el-radio-button>
       <el-radio-button label="1">宸插鏍�</el-radio-button>
     </el-radio-group>
 
+     <el-row :gutter="10" class="mb8" v-if="piliang" style="margin: 15px;">
+      <el-col :span="1.5">
+        <el-button type="primary"  size="mini" @click="handleshenhe">鎵归噺鏍告敹</el-button>
+      </el-col>
+    </el-row>
+
     <template>
       <el-table v-loading="loading" :data="checkList" ref="table" border style="margin: 20px; width: 98%"
         @current-change="handleCurrentChange">
+        <el-table-column  type="selection" align="center" label="閫夋嫨" width="50"  v-if="piliang"/>
         <el-table-column label="浣撴鍙�" align="center" prop="tjNumber" :show-overflow-tooltip="true" width="160px"
           fixed="left" />
         <el-table-column label="濮撳悕" align="center" prop="cusName" :show-overflow-tooltip="true" width="100px"
@@ -197,6 +223,9 @@
           </div>
           <div class="btn1">
             <el-button @click="fuchaxiangmu()" type="primary"><span class="vertical-text">澶嶆煡椤圭洰</span></el-button>
+          </div>
+          <div class="btn1">
+            <el-button @click="yichanghuifu()" type="primary"><span class="vertical-text">寮傚父鎭㈠</span></el-button>
           </div>
         </div>
         <div class="box">
@@ -308,8 +337,7 @@
 
               <el-form ref="numberValidateForm" label-width="80px" class="demo-ruleForm" v-if="tjproject != '1'">
                 <el-form-item label="鎬绘寤鸿">
-                  <el-input type="textarea" placeholder="璇疯緭鍏ュ唴瀹�" v-model="textarea1" :rows="3"
-                    style="width: 96%"></el-input>
+                  <el-input type="textarea" placeholder="璇疯緭鍏ュ唴瀹�" v-model="textarea1" :autosize="{ minRows: minRows, maxRows: maxRows }"></el-input>
                 </el-form-item>
               </el-form>
               <div slot="footer" class="dialog-footers">
@@ -331,8 +359,9 @@
                   </div>
                   <template v-if="item.jyjc == '0'">
                     <el-table :stripe="true" :row-style="red" :data="item.sone" border style="width: 100%"
-                      :header-cell-style="{ background: '#67C23A' }" :expand-row-keys="expends" :row-key="getRowKeys"
+                      :header-cell-style="{ background: '#67C23A' }"  :row-key="getRowKeys"
                       v-loading="loading">
+                      <!-- :expand-row-keys="expends" -->
                       <el-table-column type="expand">
                         <template slot-scope="props">
                           <div style="padding: 10px;">
@@ -379,11 +408,29 @@
                       <el-table-column align="center" prop="proResult" label="妫�娴嬬粨鏋�" width="85"></el-table-column>
                       <el-table-column align="center" prop="stanId" label=" 鍙傝�冭寖鍥�" width="117"></el-table-column>
                       <el-table-column align="center" prop="proAdvice" label="鍗曚綅" width="78"></el-table-column>
+                      <el-table-column
+                        label="鎿嶄綔"
+                        align="center"
+                        class-name="small-padding fixed-width"
+                        width="60"
+                        fixed="right"
+                      >
+                        <template slot-scope="props">
+                          <el-button
+                            size="mini"
+                            type="text"
+                            icon="el-icon-delete"
+                            @click="shanchu(props.row)"
+                          >
+                          </el-button>
+                        </template>
+                      </el-table-column>
                     </el-table>
                   </template>
                   <template v-if="item.jyjc == '1'">
                     <el-table :stripe="true" :row-style="red" :data="item.sone" border style="width: 100%"
-                      :header-cell-style="{ background: '#67C23A' }" :expand-row-keys="expends" :row-key="getRowKeys">
+                      :header-cell-style="{ background: '#67C23A' }" :row-key="getRowKeys">
+                      <!-- :expand-row-keys="expends"  -->
                       <el-table-column type="expand">
                         <template slot-scope="props">
                           <div style="padding: 10px;">
@@ -428,6 +475,23 @@
                         </template>
                       </el-table-column>
                       <el-table-column align="center" prop="proResult" label="妫�娴嬬粨鏋�" width="403"></el-table-column>
+                      <el-table-column
+                        label="鎿嶄綔"
+                        align="center"
+                        class-name="small-padding fixed-width"
+                        width="60"
+                        fixed="right"
+                      >
+                        <template slot-scope="props">
+                          <el-button
+                            size="mini"
+                            type="text"
+                            icon="el-icon-delete"
+                            @click="shanchu(props.row)"
+                          >
+                          </el-button>
+                        </template>
+                      </el-table-column>
                     </el-table>
                   </template>
                 </div>
@@ -443,16 +507,17 @@
                     <el-table-column align="center" prop="proName" label="椤圭洰" width="260"></el-table-column>
                     <el-table-column label="鐘舵��" align="center" prop="type" :show-overflow-tooltip="true" width="120">
                       <template slot-scope="scope">
-                        <span v-if="scope.row.type == '0'">鏈鏍�</span>
-                        <span v-if="scope.row.type == '1'">宸插鏍�</span>
+                        <span v-if="scope.row.type == '0'">鏈</span>
+                        <span v-if="scope.row.type == '1'">宸叉</span>
                         <span v-if="scope.row.type == '2'">寮冩</span>
                         <span v-if="scope.row.type == '3'">寤舵湡</span>
                       </template>
                     </el-table-column>
-                    <el-table-column label="妫�鏌ユ椂闂�" align="center" prop="bcupdateTime" width="160" />
-                    <el-table-column label="鎿嶄綔" align="center" width="130px">
+                    <el-table-column label="妫�鏌ユ椂闂�" align="center" prop="bcupdateTime" :formatter="formatDate" width="160" />
+                    <el-table-column label="鎿嶄綔" align="center" width="80px">
                       <template slot-scope="scope">
-                        <el-button type="primary" size="mini" @click="huifu" v-if="scope.row.type == '2'">鎭㈠</el-button>
+                        <el-button type="primary" size="mini" @click="huifu(scope.row)" v-if="scope.row.type == '2'">鎭㈠</el-button>
+                         <el-button type="primary" size="mini" @click="chexiao(scope.row)" v-if="scope.row.type == '1'">鎾ら攢</el-button>
                       </template>
                     </el-table-column>
                   </el-table>
@@ -693,6 +758,38 @@
                   </el-form>
                 </div>
               </template>
+              <template v-if="status1 == 4">
+                <div>
+                  <el-table
+                    :data="ychfList"
+                    style="width: 100%"
+                    :header-cell-style="{ background: '#e6a23c' }"
+                  >
+                    <el-table-column
+                      align="center"
+                      prop="jcxm"
+                      label="椤圭洰鍚�"
+                      width="260"
+                    ></el-table-column>
+                    <el-table-column
+                      label="缁撴灉"
+                      align="center"
+                      prop="jcjg"
+                      width="160"
+                    />
+                    <el-table-column label="鎿嶄綔" align="center" width="130px">
+                      <template v-slot="scope">
+                        <el-button
+                          type="primary"
+                          size="mini"
+                          @click="hfyc(scope.row.id)"
+                          >鎭㈠</el-button
+                        >
+                      </template>
+                    </el-table-column>
+                  </el-table>
+                </div>
+              </template>
               <el-button type="primary" @click="addnew" :disabled="isdisabled" style="margin-top: 20px;">鏂板</el-button>
             </div>
           </div>
@@ -808,13 +905,14 @@
     </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" :mrjy="mrjy" @event1="eventchange($event)" />
     <createproposal ref="createproposal" :creatobj="creatobj" />
     <el-dialog title="甯哥敤寤鸿缁存姢" :visible.sync="propdialog" width="500px" append-to-body></el-dialog>
   </div>
 </template>
 <script>
 import _ from 'lodash';
+import { getConfigKey } from "@/api/system/config";
 import jianqianwenzhen from "@/components/jianqianwenzhen";
 import Packages from "@/components/Packages";
 import Prescription from "@/components/Prescription";
@@ -835,7 +933,10 @@
   addOrder,
   addOrder1,
   getFcList,
-  UpdFcPro
+  UpdFcPro,
+  huiFuyichangxiangmu,
+  hfbt,
+  chexiao
 } from "@/api/doctor/checkAll";
 import { getInfoById } from "@/api/hosp/history";
 import { getInfo } from "@/api/login";
@@ -881,9 +982,13 @@
       zhiyeJg: '', // 鍒濆鍖栦綋妫�缁撴灉涓洪粯璁ゅ��
       selectedAdvice: null,
       activeAdviceIndex: 0,
+      minRows: 3,
+      maxRows: null,
+      gotyval: null,
       advicerulesList: [],
       xmChange: [],
       showjianyi: false,
+      piliang: false,
       isLoading: false,
       adviceLoading: false,
       adviceEmptyText: '鏆傛棤鏁版嵁',
@@ -934,6 +1039,7 @@
       src: "",
       url: "",
       userId: "",
+      mrjy: "",
       flag: true,
       bill: null,
       numberList: [],
@@ -1004,6 +1110,7 @@
         name: null,
         checkStatus: null,
         shys: null,
+        tcm: null,
         tjCategory: null
       },
       formobj: {},
@@ -1049,6 +1156,12 @@
     this.$nextTick(() => {
       this.$refs.inputName.focus();
       this.viewportHeight = window.innerHeight || document.documentElement.clientHeight;
+    });
+    getConfigKey("zjysjymrhs").then((res) => {
+      const val = parseInt(res.msg); // 纭繚鏄暟瀛�
+      if (!isNaN(val)) {
+        this.maxRows = val;
+      }
     });
   },
 
@@ -1115,6 +1228,12 @@
 
     handleCurrentChangeAdvice(currentRow) {
       this.selectedAdvice = currentRow;
+    },
+
+    formatDate(row) {
+      if (!row.qdcreateTime) return "";
+      const date = moment(row.qdcreateTime, "YYYY-MM-DD");
+      return date.isValid() ? date.format("YYYY-MM-DD") : "鏃犳晥鏃ユ湡";
     },
 
 
@@ -1719,6 +1838,11 @@
 
     radioChange(value) {
       this.loading = true;
+      if(value == "0" && this.gotyval == "01"){
+        this.piliang = true
+      }else{
+        this.piliang = false
+      }
       this.queryParams.checkStatus = value;
       this.queryParams.page = 1;
       this.queryParams.pageSize = 10;
@@ -1735,8 +1859,11 @@
 
     propoChange() {
       this.cusobj = { sex: this.tableAll.cusSex, isZj: 0 };
-      this.$refs.proposal.open = true;
-      this.$refs.proposal.title = "寤鸿鏂规";
+      getConfigKey("mrzscyjy").then((res) => {
+        this.mrjy = res.msg; 
+        this.$refs.proposal.title = "寤鸿鏂规";
+        this.$refs.proposal.open = true;
+      });
     },
 
     eventchange(data) {
@@ -1819,6 +1946,19 @@
       this.CheckBox = val;
     },
 
+    searchCategory(val){
+      this.gotyval = val
+      if(val == "01" && this.tjStatus == "0"){
+          this.piliang = true
+      }else{
+         this.piliang = false
+      }
+    },
+
+    handleshenhe(){
+
+    },
+
     dateChangebirthday1(val) {
       this.startTime = val;
     },
@@ -1867,6 +2007,62 @@
         });
     },
 
+     chexiao(row) {
+      const tjNUm = this.tjNumber;
+      const proId = row.proId;
+      chexiao(tjNUm, proId).then((res) => {
+        if (res.code == 200) {
+          this.$message.success("鎾ら攢鎴愬姛");
+          this.xiangmuqingkuang();
+        }
+      });
+    },
+
+
+    yichanghuifu() {
+      this.loading = true;
+      let tjNum = this.tjNumber;
+      huiFuyichangxiangmu(tjNum).then((res) => {
+        this.status1 = 4;
+        this.ychfList = res.data;
+        if(this.ychfList.length == 0){
+          this.message.success("鏆傛棤寮傚父鎭㈠椤圭洰")
+        }
+      })
+      .catch((error)=>{
+        console.error("鑾峰彇椤圭洰澶辫触锛�",error);
+        
+        this.$message.error("鑾峰彇椤圭洰澶辫触")
+      })
+      .finally(()=>{
+        this.loading = false;
+      })
+    },
+
+    hfyc(id) {
+      this.$confirm("纭瑕佹仮澶嶈椤瑰悧锛�", "鎻愮ず", {
+        confirmButtonText: "纭畾",
+        cancelButtonText: "鍙栨秷",
+        type: "warning",
+      })
+        .then(() => {
+          // 鐢ㄦ埛纭鍚庢墽琛屾帴鍙�
+          hfbt({ id })
+            .then((res) => {
+              this.$message.success("鎭㈠鎴愬姛");
+              this.yichanghuifu(); // 鎭㈠鍚庡埛鏂板垪琛�
+            })
+            .catch((err) => {
+              console.error(err);
+              this.$message.error("鎭㈠澶辫触");
+            });
+        })
+        .catch(() => {
+          // 鐢ㄦ埛鍙栨秷浜嗘搷浣�
+          this.$message.info("宸插彇娑堟仮澶�");
+        });
+    },
+
     resetQuery() {
       this.startTime = [];
       this.queryParams = {
@@ -1908,6 +2104,7 @@
     },
 
     handleCurrentChange(val) {
+      console.log(val)
       if (val != null) {
         this.handleClick(val);
       }

--
Gitblit v1.8.0