From 392133f4cda2641a2c4297656a50fc75f45b6971 Mon Sep 17 00:00:00 2001
From: qx <1084500556@qq.com>
Date: 星期五, 23 五月 2025 17:26:32 +0800
Subject: [PATCH] Merge branch 'master' of http://101.42.27.146:5001/r/ltkj_peisweb_region

---
 src/views/hosp/biaoben/index.vue         |  320 ++++++++++++++++++
 src/views/doctor/checkAll/index.vue      |   66 ++-
 src/api/hosp/biaoben.js                  |   30 +
 src/api/hosp/part.js                     |   30 +
 src/views/hosp/part/index.vue            |  413 +++++++++++++++++------
 src/components/jianqianwenzhen/index.vue |   16 
 src/views/system/zhiye/index.vue         |  125 ++-----
 7 files changed, 777 insertions(+), 223 deletions(-)

diff --git a/src/api/hosp/biaoben.js b/src/api/hosp/biaoben.js
new file mode 100644
index 0000000..f643bc5
--- /dev/null
+++ b/src/api/hosp/biaoben.js
@@ -0,0 +1,30 @@
+import request from '@/utils/request'
+
+// 鏌ヨ浣撴椤圭洰寤鸿瑙勫垯鏂拌〃鍒楄〃
+export function searchBiaoben(query) {
+    return request({
+        url: '/hosp/project/getProListByBblx',
+        method: 'get',
+        params: query
+    })
+}
+// 鍒犻櫎
+export function delBiaoben(query) {
+    return request({
+        url: '/hosp/project/delProByBblx',
+        method: 'get',
+        params: query
+    })
+}
+export function editBiaoben(data) {
+  const formData = new FormData();
+  data.proIds.forEach(proId => {
+    formData.append('proIds', proId);
+  });
+  formData.append('bblx', data.bblx);
+  return request({
+    url: '/hosp/project/updateProByBblx',
+    method: 'post',
+    data: formData
+  });
+}
\ No newline at end of file
diff --git a/src/api/hosp/part.js b/src/api/hosp/part.js
new file mode 100644
index 0000000..b69049b
--- /dev/null
+++ b/src/api/hosp/part.js
@@ -0,0 +1,30 @@
+import request from '@/utils/request'
+
+// 鏌ヨ浣撴椤圭洰寤鸿瑙勫垯鏂拌〃鍒楄〃
+export function searchPart(query) {
+    return request({
+        url: '/hosp/project/getProListByBwwh',
+        method: 'get',
+        params: query
+    })
+}
+// 鍒犻櫎
+export function delPart(query) {
+    return request({
+        url: '/hosp/project/delProByBbwwh',
+        method: 'get',
+        params: query
+    })
+}
+export function editPart(data) {
+  const formData = new FormData();
+  data.proIds.forEach(proId => {
+    formData.append('proIds', proId);
+  });
+  formData.append('bw', data.bw);
+  return request({
+    url: '/hosp/project/updateProByBwwh',
+    method: 'post',
+    data: formData
+  });
+}
\ No newline at end of file
diff --git a/src/components/jianqianwenzhen/index.vue b/src/components/jianqianwenzhen/index.vue
index d297250..ce915fc 100644
--- a/src/components/jianqianwenzhen/index.vue
+++ b/src/components/jianqianwenzhen/index.vue
@@ -79,12 +79,12 @@
             </el-form-item>
             <el-form-item
               label="鎺ヨЕ鏈夊鐗╁伐榫�"
-              prop="zgongLing"
+              prop="jhgl"
               label-width="150px"
             >
               <!-- <el-input v-model="form.cusName" placeholder="璇疯緭鍏ュ伐榫�" style="width: 150px" />骞� -->
               <el-input-number
-                v-model="form.zgongLing"
+                v-model="form.jhgl"
                 label="璇疯緭鍏ユ帴瑙︽湁瀹崇墿宸ラ緞"
               ></el-input-number
               >骞�
@@ -99,10 +99,10 @@
               <el-input @focus="change" type="textarea" rows="4" v-model="form.contactPoison" placeholder="璇疯緭鍏ユ帴瑙︽瘨鐗�"
                 style="width: 700px" />
             </el-form-item> -->
-            <el-form-item label="浣撴鍗卞鍥犵礌" prop="tjwhyx">
+            <el-form-item label="浣撴鍗卞鍥犵礌" prop="tjwhys">
               <el-select
                 filterable
-                v-model="form.tjwhyx"
+                v-model="form.tjwhys"
                 placeholder="璇烽�夋嫨浣撴鍗卞鍥犵礌"
                 clearable
                 style="width: 180px"
@@ -117,12 +117,12 @@
             </el-form-item>
             <el-form-item
               label="鎺ヨЕ鍗卞鍥犵礌"
-              prop="tcwhyx"
+              prop="jcwhys"
               style="margin-left: 30px"
             >
               <el-select
                 filterable
-                v-model="form.tcwhyx"
+                v-model="form.jcwhys"
                 placeholder="璇烽�夋嫨鎺ヨЕ鍗卞鍥犵礌"
                 clearable
                 style="width: 180px"
@@ -836,13 +836,15 @@
         dwmc: "",
         ygdw: "",
         gongLing: "",
-        zgongLing: "",
+        jhgl: "",
         yjsfyc: "", // 鏄惁寮傚父
         ycms: "", // 寮傚父鎻忚堪
         xiyan: "",
         xiyanpinlv: "",
         xiyanyear: "",
         yinjiu: "",
+        jcwhys:"",
+        tjwhys:"",
         yinjiupinlv: "",
         yinjiuyear: "",
         qita: "",
diff --git a/src/views/doctor/checkAll/index.vue b/src/views/doctor/checkAll/index.vue
index 0d79e70..ac83bf0 100644
--- a/src/views/doctor/checkAll/index.vue
+++ b/src/views/doctor/checkAll/index.vue
@@ -1,6 +1,7 @@
 <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"
+      v-if="tjStatus == 0">
       <el-form-item label="濮撳悕" prop="name">
         <el-input v-model="queryParams.name" style="width: 120px" placeholder="璇疯緭鍏ュ鍚�" clearable
           @keyup.enter.native="submitForm"></el-input>
@@ -21,6 +22,13 @@
           <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>
@@ -28,7 +36,8 @@
     </el-form>
 
 
-    <el-form :model="queryParams" ref="tableList" :inline="true" label-width="76px" style="margin-top: 10px" v-if="tjStatus == 1">
+    <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
           @keyup.enter.native="submitForm"></el-input>
@@ -44,9 +53,16 @@
           <el-option v-for="dict in CompanyList" :key="dict.drugManufacturerId" :label="dict.cnName" :value="dict" />
         </el-select>
       </el-form-item>
-       <el-form-item label="瀹℃牳鍖诲笀" prop="shys">
+      <el-form-item label="瀹℃牳鍖诲笀" prop="shys">
         <el-input ref="inputName" v-model="queryParams.shys" style="width: 180px" placeholder="璇疯緭鍏ュ鏍稿尰甯�" clearable
           @keyup.enter.native="submitForm"></el-input>
+      </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>
@@ -94,12 +110,13 @@
         <el-table-column label="鐢佃瘽" align="center" prop="cusPhone" :show-overflow-tooltip="true" width="130px" />
         <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 label="鐘舵��" align="center" prop="tjStatus" :show-overflow-tooltip="true" width="120px" v-if="tjStatus == 0">
+        <el-table-column label="鐘舵��" align="center" prop="tjStatus" :show-overflow-tooltip="true" width="120px"
+          v-if="tjStatus == 0">
           <template slot-scope="scope" v-if="tjStatus == 0">
             <span>{{ scope.row.tjStatus == "1" ? "宸插鏍�" : "鏈鏍�" }}</span>
           </template>
         </el-table-column>
-         <el-table-column label="瀹℃牳鍖诲笀" align="center" prop="shys"  width="120px" v-if="tjStatus == 1"/>
+        <el-table-column label="瀹℃牳鍖诲笀" align="center" prop="shys" width="120px" v-if="tjStatus == 1" />
         <el-table-column label="鍗曚綅鍚嶇О" align="center" prop="tjCompName" :show-overflow-tooltip="true" />
         <el-table-column label="浣撴绫诲埆" align="center" prop="tjCategory">
           <template slot-scope="scope">
@@ -835,6 +852,7 @@
     Prescription,
   },
   dicts: [
+    "dict_team",
     "dict_tjtype",
     "sys_user_sex",
     "sys_yes_no",
@@ -849,7 +867,7 @@
   data() {
     return {
       zhiyeJl: '', // 鍒濆鍖栨鏌ョ粨璁轰负绌�
-      zhiyeJg: '鏈彂鐜扮洰鏍囨�х柧鐥�', // 鍒濆鍖栦綋妫�缁撴灉涓洪粯璁ゅ��
+      zhiyeJg: '', // 鍒濆鍖栦綋妫�缁撴灉涓洪粯璁ゅ��
       selectedAdvice: null,
       activeAdviceIndex: 0,
       advicerulesList: [],
@@ -951,7 +969,7 @@
       Testitems: [],
       CheckBox: {},
       startTime: [],
-       isCollapsed: 0,
+      isCollapsed: 0,
       textarea1: "",
       loading: true,
       selectLettercurrent: " ",
@@ -974,6 +992,7 @@
         name: null,
         checkStatus: null,
         shys: null,
+        tjCategory: null
       },
       formobj: {},
       yichangList: [],
@@ -1014,7 +1033,6 @@
     this.getConfigKey();
     this.getdate();
   },
-
   mounted() {
     this.$nextTick(() => {
       this.$refs.inputName.focus();
@@ -1088,7 +1106,7 @@
     },
 
 
-     toggleCollapse3() {
+    toggleCollapse3() {
       this.isCollapsed = 0;
     },
     toggleCollapse() {
@@ -1129,7 +1147,7 @@
             this.cancelAdviceDialog();
             done();
           })
-          .catch(() => {});
+          .catch(() => { });
       } else {
         this.cancelAdviceDialog();
         done();
@@ -1327,11 +1345,11 @@
           type: 1
         }]
       };
-      UpdFcPro(data).then(res => {});
+      UpdFcPro(data).then(res => { });
     },
 
     handledeleteClick() {
-      UpdFcPro(data).then(res => {});
+      UpdFcPro(data).then(res => { });
     },
 
     handlexmChange(selection) {
@@ -1825,7 +1843,19 @@
 
     resetQuery() {
       this.startTime = [];
-      this.resetForm("tableList");
+      this.queryParams = {
+        page: 1,
+        pageSize: 10,
+        tjNumber: "",
+        beginTime: null,
+        endTime: null,
+        compId: null,
+        name: null,
+        checkStatus: null,
+        shys: null,
+        tjCategory: null
+      },
+        this.resetForm("tableList");
       this.submitForm();
     },
 
@@ -1891,8 +1921,8 @@
                         this.remark = this.changedate[i].remark;
                       }
                       // 鍥炴樉 zhiyeJl 鍜� zhiyeJg
-                      this.zhiyeJl = response.data.zhiyeJl || '';
-                      this.zhiyeJg = response.data.zhiyeJg || '鏈彂鐜扮洰鏍囨�х柧鐥�';
+                      this.zhiyeJl = this.changedate[0].zhiyejl || '';
+                      this.zhiyeJg = this.changedate[0].zhiyejg || '鏈彂鐜扮洰鏍囨�х柧鐥�';
                     } else {
                       this.$message({
                         type: "warning",
@@ -1936,8 +1966,8 @@
                             this.textarea1 = item.checkAdvice || "";
                           });
                           // 鍥炴樉 zhiyeJl 鍜� zhiyeJg
-                          this.zhiyeJl = response.data.zhiyeJl || '';
-                          this.zhiyeJg = response.data.zhiyeJg || '鏈彂鐜扮洰鏍囨�х柧鐥�';
+                          this.zhiyeJl = this.changedate[0].zhiyejl || '';
+                          this.zhiyeJg = this.changedate[0].zhiyejg || '鏈彂鐜扮洰鏍囨�х柧鐥�';
                         } else {
                           this.$message({
                             type: "warning",
@@ -1981,7 +2011,7 @@
               done();
             });
           })
-          .catch(() => {});
+          .catch(() => { });
       } else {
         let data = {
           userId: this.userId,
diff --git a/src/views/hosp/biaoben/index.vue b/src/views/hosp/biaoben/index.vue
new file mode 100644
index 0000000..f0afc9b
--- /dev/null
+++ b/src/views/hosp/biaoben/index.vue
@@ -0,0 +1,320 @@
+<template>
+  <div class="app-container">
+    <el-row :gutter="24">
+      <!-- 绗竴鍒楋細鍗曢�夋爣鏈� -->
+      <el-col :span="8" :xs="24">
+        <el-form
+          :model="queryParams"
+          ref="queryForm"
+          size="small"
+          :inline="true"
+          label-width="68px"
+          style="height: 45px"
+          @submit.native.prevent
+        >
+          <el-form-item label="椤圭洰鍚嶇О" prop="tjh">
+            <el-input
+              v-model="queryParams.tjh"
+              placeholder="璇疯緭鍏ラ」鐩悕绉�"
+              clearable
+              @keyup.enter.native="handleManual"
+            />
+          </el-form-item>
+          <el-form-item>
+            <el-button type="primary" size="mini" @click="handleManual">鏌ヨ</el-button>
+            <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button>
+          </el-form-item>
+        </el-form>
+
+        <!-- 鏍囨湰鍗曢�夎〃鏍硷紙甯﹀閫夋鏍峰紡锛� -->
+        <el-table
+          border
+          v-loading="loading"
+          :data="filteredSpecimenData"
+          height="478"
+          style="width: 100%"
+          ref="specimenTable"
+          :row-key="row => row.value"
+          @select="handleSpecimenSelect"
+        >
+          <el-table-column type="selection" width="40px" align="center" />
+          <el-table-column label="搴忓彿" align="center" type="index" width="50px" />
+          <el-table-column label="鏍囨湰鍚嶇О" align="center" prop="label" show-overflow-tooltip />
+        </el-table>
+      </el-col>
+
+      <!-- 绗簩鍒楋細涓棿閫変腑椤圭洰鍒楄〃 -->
+      <el-col :span="8" :xs="24">
+        <el-form :model="form" size="small" :inline="true" label-width="68px" style="height: 45px" @submit.native.prevent />
+        <el-table
+          border
+          v-loading="loading"
+          :data="OnenewpacName"
+          height="478"
+          style="width: 100%"
+        >
+          <el-table-column label="宸查�夐」鐩垪琛�" align="center" prop="proName" />
+          <el-table-column label="鎿嶄綔" align="center" width="85">
+            <template slot-scope="scope">
+              <el-button size="mini" type="text" icon="el-icon-delete" @click="handledbelete(scope.row)">鍒犻櫎</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+        <div class="dialog-footer1" style="margin-top: 60px; text-align: center;">
+          <el-button type="primary" @click="submitrighr">纭骞朵繚瀛�</el-button>
+          <el-button @click="cancell">鍙� 娑�</el-button>
+        </div>
+      </el-col>
+
+      <!-- 绗笁鍒楋細鎼滅储 + 椤圭洰閫夋嫨 -->
+      <el-col :span="8" :xs="24">
+        <el-form
+          :model="queryParams1"
+          ref="queryForm"
+          size="small"
+          :inline="true"
+          v-show="showSearch"
+          label-width="68px"
+          style="height: 45px"
+          @submit.native.prevent
+        >
+          <el-form-item label="椤圭洰鍚嶇О" prop="proName">
+            <el-input
+              ref="inputName"
+              v-model="queryParams1.proName"
+              placeholder="璇疯緭鍏ラ」鐩悕绉�"
+              clearable
+              @keyup.enter.native="handleSearchFor"
+              style="width: 140px"
+            />
+          </el-form-item>
+          <el-form-item>
+            <el-button type="primary" icon="el-icon-search" size="mini" @click="handleSearchFor">鎼滅储</el-button>
+          </el-form-item>
+        </el-form>
+        <el-table
+          border
+          v-loading="loading"
+          ref="tre"
+          :data="Treedata"
+          @selection-change="handleChangesingle"
+          height="478"
+          style="width: 100%"
+        >
+          <el-table-column type="selection" width="40px" align="center" />
+          <el-table-column label="椤圭洰鍚嶇О" align="center" prop="proName" show-overflow-tooltip />
+        </el-table>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { searchBiaoben, delBiaoben, editBiaoben } from "@/api/hosp/biaoben";
+import { debounce } from 'lodash';
+
+export default {
+  name: "Part",
+  data() {
+    return {
+      loading: false,
+      OnenewpacName: [],
+      Treedata: [],
+      originalTreedata: [],
+      queryParams: {
+        tjh: '',
+        tjCategory: null,
+      },
+      queryParams1: {
+        proName: '',
+      },
+      form: {
+        price: '',
+      },
+      showSearch: true,
+      filteredSpecimenData: [],
+      originalSpecimenData: [],
+    };
+  },
+  dicts: ["sys_dict_specimen"],
+  created() {
+    this.fetchInitialBiaobenData();
+    this.initializeSpecimenData();
+    this.debouncedFetchBiaobenData = debounce(this.fetchBiaobenData, 300);
+  },
+  watch: {
+    'dict.type.sys_dict_specimen': {
+      handler(newVal) {
+        if (newVal && newVal.length > 0) {
+          console.log('鏍囨湰瀛楀吀鏁版嵁鍔犺浇:', newVal);
+          this.originalSpecimenData = [...newVal];
+          this.filteredSpecimenData = [...newVal];
+        } else {
+          console.warn('鏍囨湰瀛楀吀鏁版嵁涓虹┖鎴栨湭鍔犺浇');
+        }
+      },
+      deep: true,
+      immediate: true,
+    },
+  },
+  methods: {
+    initializeSpecimenData() {
+      if (this.dict?.type?.sys_dict_specimen) {
+        this.originalSpecimenData = [...this.dict.type.sys_dict_specimen];
+        this.filteredSpecimenData = [...this.originalSpecimenData];
+        console.log('鍒濆鍖栨爣鏈暟鎹�:', this.originalSpecimenData);
+      } else {
+        this.$message.warning('鏍囨湰鏁版嵁鏈姞杞斤紝璇锋鏌ュ瓧鍏搁厤缃�');
+        this.originalSpecimenData = [];
+        this.filteredSpecimenData = [];
+      }
+    },
+    handleSearchFor() {
+      const searchText = this.queryParams1.proName?.trim().toLowerCase() || '';
+      if (searchText) {
+        this.Treedata = this.originalTreedata.filter(item =>
+          item.proName.toLowerCase().includes(searchText)
+        );
+        this.Treedata.length
+          ? this.$message.success('鏌ヨ鎴愬姛')
+          : this.$message.warning('鏈壘鍒板尮閰嶇殑椤圭洰');
+      } else {
+        this.Treedata = [...this.originalTreedata];
+        this.$message.info('宸叉樉绀烘墍鏈夐」鐩�');
+      }
+      this.$refs.tre.clearSelection();
+    },
+    resetQuery() {
+      this.$refs.queryForm.resetFields();
+      this.queryParams.tjh = '';
+      this.queryParams.tjCategory = null;
+      this.OnenewpacName = [];
+      this.filteredSpecimenData = [...this.originalSpecimenData];
+      this.$refs.specimenTable.clearSelection();
+      this.$message.success('宸查噸缃煡璇㈡潯浠跺拰鏍囨湰鏁版嵁');
+    },
+    handleManual() {
+      const searchText = this.queryParams.tjh?.trim().toLowerCase() || '';
+      this.filteredSpecimenData = searchText
+        ? this.originalSpecimenData.filter(item => item.label.toLowerCase().includes(searchText))
+        : [...this.originalSpecimenData];
+
+      this.queryParams.tjCategory = null;
+      this.OnenewpacName = [];
+      this.$refs.specimenTable.clearSelection();
+
+      this.$message[this.filteredSpecimenData.length ? 'success' : 'warning'](
+        this.filteredSpecimenData.length ? '鏌ヨ鎴愬姛' : '鏈壘鍒板尮閰嶇殑鏍囨湰'
+      );
+    },
+    handleSpecimenSelect(selection, row) {
+      console.log('鏍囨湰閫夋嫨瑙﹀彂:', { selection, row });
+      this.$refs.specimenTable.clearSelection();
+      if (selection.includes(row)) {
+        this.$refs.specimenTable.toggleRowSelection(row, true);
+        if (this.queryParams.tjCategory !== row.value) {
+          this.queryParams.tjCategory = row.value;
+          console.log('閫変腑鐨勬爣鏈� value:', this.queryParams.tjCategory);
+          this.debouncedFetchBiaobenData(row.value);
+        }
+      } else {
+        this.queryParams.tjCategory = null;
+        this.OnenewpacName = [];
+        console.log('鏍囨湰閫夋嫨宸叉竻绌�');
+      }
+    },
+    handleChangesingle(selection) {
+      if (selection.length > 0) {
+        selection.forEach(item => {
+          if (!this.OnenewpacName.some(existing => existing.proId === item.proId)) {
+            this.OnenewpacName.push({ ...item });
+          }
+        });
+        this.$refs.tre.clearSelection();
+      }
+    },
+    cancell() {
+      this.openOne = false;
+    },
+    submitrighr() {
+      if (!this.queryParams.tjCategory) {
+        this.$message.error('璇峰厛閫夋嫨涓�涓爣鏈�');
+        return;
+      }
+      if (!this.OnenewpacName.length) {
+        this.$message.error('璇疯嚦灏戦�夋嫨涓�涓」鐩�');
+        return;
+      }
+      const proIds = this.OnenewpacName.map(item => item.proId);
+      const bblx = this.queryParams.tjCategory;
+      this.loading = true;
+      editBiaoben({ proIds, bblx })
+        .then(() => {
+          this.$message.success('淇濆瓨鎴愬姛');
+          this.OnenewpacName = [];
+          this.queryParams.tjCategory = null;
+          this.$refs.specimenTable.clearSelection();
+          this.loading = false;
+        })
+        .catch(error => {
+          this.$message.error('淇濆瓨澶辫触');
+          console.error(error);
+          this.loading = false;
+        });
+    },
+    handledbelete(row) {
+      this.loading = true;
+      delBiaoben({ proId: row.proId })
+        .then(() => {
+          this.OnenewpacName = this.OnenewpacName.filter(item => item.proId !== row.proId);
+          this.$message.success('鍒犻櫎鎴愬姛');
+          this.loading = false;
+        })
+        .catch(error => {
+          this.$message.error('鍒犻櫎澶辫触');
+          console.error(error);
+          this.loading = false;
+        });
+    },
+    fetchBiaobenData(bblx) {
+      console.log('璋冪敤 searchBiaoben锛堜腑闂磋〃鏍硷級锛屽弬鏁�:', { bblx });
+      this.loading = true;
+      searchBiaoben({ bblx })
+        .then(response => {
+          this.OnenewpacName = response.data || [];
+          this.loading = false;
+        })
+        .catch(error => {
+          this.$message.error('鑾峰彇鏍囨湰鏁版嵁澶辫触');
+          console.error(error);
+          this.loading = false;
+        });
+    },
+    fetchInitialBiaobenData() {
+      console.log('璋冪敤 searchBiaoben锛堝垵濮嬪姞杞斤紝鍙充晶琛ㄦ牸锛夛紝鍙傛暟: {}');
+      this.loading = true;
+      searchBiaoben({})
+        .then(response => {
+          this.originalTreedata = response.data || [];
+          this.Treedata = [...this.originalTreedata];
+          this.loading = false;
+        })
+        .catch(error => {
+          this.$message.error('鑾峰彇鍒濆椤圭洰鏁版嵁澶辫触');
+          console.error(error);
+          this.loading = false;
+        });
+    },
+  },
+};
+</script>
+
+<style scoped>
+.app-container {
+  padding: 20px;
+}
+.dialog-footer1 {
+  margin-top: 60px;
+  text-align: center;
+}
+</style>
\ No newline at end of file
diff --git a/src/views/hosp/part/index.vue b/src/views/hosp/part/index.vue
index aacb526..cd12797 100644
--- a/src/views/hosp/part/index.vue
+++ b/src/views/hosp/part/index.vue
@@ -1,123 +1,320 @@
 <template>
-    <div class="app-container">
-
-        <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
-            <el-form-item label="椤圭洰鍚嶇О" prop="tjh">
-                <el-input v-model="queryParams.tjh" placeholder="璇疯緭鍏ラ」鐩悕绉�" clearable />
-            </el-form-item>
-            <el-form-item>
-                <el-button type="primary" size="mini" @click="handleManual">鏌ヨ</el-button>
-                <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button>
-            </el-form-item>
+  <div class="app-container">
+    <el-row :gutter="24">
+      <!-- 绗竴鍒楋細鍗曢�夋爣鏈� -->
+      <el-col :span="8" :xs="24">
+        <el-form
+          :model="queryParams"
+          ref="queryForm"
+          size="small"
+          :inline="true"
+          label-width="68px"
+          style="height: 45px"
+          @submit.native.prevent
+        >
+          <el-form-item label="椤圭洰鍚嶇О" prop="tjh">
+            <el-input
+              v-model="queryParams.tjh"
+              placeholder="璇疯緭鍏ラ」鐩悕绉�"
+              clearable
+              @keyup.enter.native="handleManual"
+            />
+          </el-form-item>
+          <el-form-item>
+            <el-button type="primary" size="mini" @click="handleManual">鏌ヨ</el-button>
+            <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button>
+          </el-form-item>
         </el-form>
-        <el-table border v-loading="loading" :data="partList" height="350">
-            <el-table-column type="selection" width="40px" align="center" />
-            <el-table-column label="搴忓彿" align="center" prop="newID" width="50px" />
-            <el-table-column label="椤圭洰鍚嶇О" align="center" prop="groupingName" />
+
+        <!-- 鏍囨湰鍗曢�夎〃鏍硷紙甯﹀閫夋鏍峰紡锛� -->
+        <el-table
+          border
+          v-loading="loading"
+          :data="filteredSpecimenData"
+          height="478"
+          style="width: 100%"
+          ref="specimenTable"
+          :row-key="row => row.value"
+          @select="handleSpecimenSelect"
+        >
+          <el-table-column type="selection" width="40px" align="center" />
+          <el-table-column label="搴忓彿" align="center" type="index" width="50px" />
+          <el-table-column label="鏍囨湰鍚嶇О" align="center" prop="label" show-overflow-tooltip />
         </el-table>
+      </el-col>
 
+      <!-- 绗簩鍒楋細涓棿閫変腑椤圭洰鍒楄〃 -->
+      <el-col :span="8" :xs="24">
+        <el-form :model="form" size="small" :inline="true" label-width="68px" style="height: 45px" @submit.native.prevent />
+        <el-table
+          border
+          v-loading="loading"
+          :data="OnenewpacName"
+          height="478"
+          style="width: 100%"
+        >
+          <el-table-column label="宸查�夐」鐩垪琛�" align="center" prop="proName" />
+          <el-table-column label="鎿嶄綔" align="center" width="85">
+            <template slot-scope="scope">
+              <el-button size="mini" type="text" icon="el-icon-delete" @click="handledbelete(scope.row)">鍒犻櫎</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+        <div class="dialog-footer1" style="margin-top: 60px; text-align: center;">
+          <el-button type="primary" @click="submitrighr">纭骞朵繚瀛�</el-button>
+          <el-button @click="cancell">鍙� 娑�</el-button>
+        </div>
+      </el-col>
 
-        <el-dialog :title="title" :visible.sync="openOne" width="1400px" append-to-body :close-on-click-modal="false">
-            <el-row :gutter="24">
-                <el-col :span="15" :xs="24">
-                    <el-form :model="form" ref="queryForm" size="small" :inline="true" label-width="46px"
-                        style="height: 35px" @submit.native.prevent>
-                        <el-form-item label="鏍囨湰绫诲瀷">
-                            <el-input ref="inputName" v-model="form.price" placeholder="鏍囨湰绫诲瀷" clearable
-                                style="width: 140px" />
-                        </el-form-item>
-                        <el-form-item>
-                            <el-button icon="el-icon-refresh" size="mini" @click="resetQuerys">閲嶇疆</el-button>
-                        </el-form-item>
-                    </el-form>
-                    <el-table border v-loading="loading" :data="OnenewpacName" :row-class-name="tableRowClassName"
-                        height="478">
-                        <el-table-column label="鍘熶环" align="center" prop="proPrice" width="85"></el-table-column>
-                        <el-table-column label="鎿嶄綔" align="center" width="85">
-                            <template slot-scope="scope">
-                                <el-button size="mini" type="text" icon="el-icon-delete"
-                                    @click="handledbelete(scope.row)">鍒犻櫎</el-button>
-                            </template>
-                        </el-table-column>
-                    </el-table>
-                </el-col>
-
-                <el-col :span="7" :xs="24">
-                    <el-form :model="queryParams1" ref="queryForm" size="small" :inline="true" v-show="showSearch"
-                        label-width="68px" @submit.native.prevent>
-
-
-                        <el-form-item label="椤圭洰鍚嶇О" prop="proName">
-                            <el-input ref="inputName" v-model="queryParams1.proName" placeholder="璇疯緭鍏ラ」鐩悕绉�" clearable
-                                @keyup.enter.native="handleSearchFor" style="width: 140px" />
-                        </el-form-item>
-                        <el-form-item>
-                            <el-button type="primary" icon="el-icon-search" size="mini"
-                                @click="handleSearchFor">鎼滅储</el-button>
-                        </el-form-item>
-                    </el-form>
-                    <el-table border v-loading="loading" ref="tre" :data="Treedata"
-                        @selection-change="handleChangesingle" height="478" style="width: 100%">
-                        <el-table-column type="selection" width="40px" align="center" />
-                        <el-table-column label="椤圭洰鍚嶇О" align="center" prop="proName" width="230px" />
-                        <el-table-column label="椤圭洰浠锋牸/鍏�" align="center" prop="proPrice" width="100px" />
-                    </el-table>
-                </el-col>
-            </el-row>
-            <div slot="footer" class="dialog-footer1">
-                <el-button type="primary" @click="submitrighr">纭骞朵繚瀛�</el-button>
-                <el-button @click="cancell">鍙� 娑�</el-button>
-            </div>
-        </el-dialog>
-    </div>
+      <!-- 绗笁鍒楋細鎼滅储 + 椤圭洰閫夋嫨 -->
+      <el-col :span="8" :xs="24">
+        <el-form
+          :model="queryParams1"
+          ref="queryForm"
+          size="small"
+          :inline="true"
+          v-show="showSearch"
+          label-width="68px"
+          style="height: 45px"
+          @submit.native.prevent
+        >
+          <el-form-item label="椤圭洰鍚嶇О" prop="proName">
+            <el-input
+              ref="inputName"
+              v-model="queryParams1.proName"
+              placeholder="璇疯緭鍏ラ」鐩悕绉�"
+              clearable
+              @keyup.enter.native="handleSearchFor"
+              style="width: 140px"
+            />
+          </el-form-item>
+          <el-form-item>
+            <el-button type="primary" icon="el-icon-search" size="mini" @click="handleSearchFor">鎼滅储</el-button>
+          </el-form-item>
+        </el-form>
+        <el-table
+          border
+          v-loading="loading"
+          ref="tre"
+          :data="Treedata"
+          @selection-change="handleChangesingle"
+          height="478"
+          style="width: 100%"
+        >
+          <el-table-column type="selection" width="40px" align="center" />
+          <el-table-column label="椤圭洰鍚嶇О" align="center" prop="proName" show-overflow-tooltip />
+        </el-table>
+      </el-col>
+    </el-row>
+  </div>
 </template>
 
 <script>
-// import {  } from "@/api/system/menu";
+import { searchPart, delPart, editPart } from "@/api/hosp/part";
+import { debounce } from 'lodash';
+
 export default {
-    name: "Part",
-    //   dicts: [
-    //     "",
-    //   ],
-    data() {
-        return {
-            loading: false,
-            openOne: false,
-            partList: [],
-            Treedata: [],
-            queryParams: {
-
-            },
-            queryParams1: {
-
-            },
-            form: {
-
-            },
-
+  name: "Part",
+  data() {
+    return {
+      loading: false,
+      OnenewpacName: [],
+      Treedata: [],
+      originalTreedata: [],
+      queryParams: {
+        tjh: '',
+        tjCategory: null,
+      },
+      queryParams1: {
+        proName: '',
+      },
+      form: {
+        price: '',
+      },
+      showSearch: true,
+      filteredSpecimenData: [],
+      originalSpecimenData: [],
+    };
+  },
+  dicts: ["sys_dict_position"],
+  created() {
+    this.fetchInitialBiaobenData();
+    this.initializeSpecimenData();
+    this.debouncedFetchBiaobenData = debounce(this.fetchBiaobenData, 300);
+  },
+  watch: {
+    'dict.type.sys_dict_position': {
+      handler(newVal) {
+        if (newVal && newVal.length > 0) {
+          console.log('鏍囨湰瀛楀吀鏁版嵁鍔犺浇:', newVal);
+          this.originalSpecimenData = [...newVal];
+          this.filteredSpecimenData = [...newVal];
+        } else {
+          console.warn('鏍囨湰瀛楀吀鏁版嵁涓虹┖鎴栨湭鍔犺浇');
         }
+      },
+      deep: true,
+      immediate: true,
     },
-    created() {
+  },
+  methods: {
+    initializeSpecimenData() {
+      if (this.dict?.type?.sys_dict_position) {
+        this.originalSpecimenData = [...this.dict.type.sys_dict_position];
+        this.filteredSpecimenData = [...this.originalSpecimenData];
+        console.log('鍒濆鍖栨爣鏈暟鎹�:', this.originalSpecimenData);
+      } else {
+        this.$message.warning('鏍囨湰鏁版嵁鏈姞杞斤紝璇锋鏌ュ瓧鍏搁厤缃�');
+        this.originalSpecimenData = [];
+        this.filteredSpecimenData = [];
+      }
     },
-    methods: {
-        getList() {
+    handleSearchFor() {
+      const searchText = this.queryParams1.proName?.trim().toLowerCase() || '';
+      if (searchText) {
+        this.Treedata = this.originalTreedata.filter(item =>
+          item.proName.toLowerCase().includes(searchText)
+        );
+        this.Treedata.length
+          ? this.$message.success('鏌ヨ鎴愬姛')
+          : this.$message.warning('鏈壘鍒板尮閰嶇殑椤圭洰');
+      } else {
+        this.Treedata = [...this.originalTreedata];
+        this.$message.info('宸叉樉绀烘墍鏈夐」鐩�');
+      }
+      this.$refs.tre.clearSelection();
+    },
+    resetQuery() {
+      this.$refs.queryForm.resetFields();
+      this.queryParams.tjh = '';
+      this.queryParams.tjCategory = null;
+      this.OnenewpacName = [];
+      this.filteredSpecimenData = [...this.originalSpecimenData];
+      this.$refs.specimenTable.clearSelection();
+      this.$message.success('宸查噸缃煡璇㈡潯浠跺拰鏍囨湰鏁版嵁');
+    },
+    handleManual() {
+      const searchText = this.queryParams.tjh?.trim().toLowerCase() || '';
+      this.filteredSpecimenData = searchText
+        ? this.originalSpecimenData.filter(item => item.label.toLowerCase().includes(searchText))
+        : [...this.originalSpecimenData];
 
-        },
-        resetQuery() {
-            this.resetForm("queryForm");
-        },
-        handleManual() {
+      this.queryParams.tjCategory = null;
+      this.OnenewpacName = [];
+      this.$refs.specimenTable.clearSelection();
 
-        },
-        handleChangesingle(selection) {
-
-        },
-        cancell() {
-            this.openOne = false
-        },
-        submitrighr() {
-
-        },
-    }
+      this.$message[this.filteredSpecimenData.length ? 'success' : 'warning'](
+        this.filteredSpecimenData.length ? '鏌ヨ鎴愬姛' : '鏈壘鍒板尮閰嶇殑鏍囨湰'
+      );
+    },
+    handleSpecimenSelect(selection, row) {
+      console.log('鏍囨湰閫夋嫨瑙﹀彂:', { selection, row });
+      this.$refs.specimenTable.clearSelection();
+      if (selection.includes(row)) {
+        this.$refs.specimenTable.toggleRowSelection(row, true);
+        if (this.queryParams.tjCategory !== row.value) {
+          this.queryParams.tjCategory = row.value;
+          console.log('閫変腑鐨勬爣鏈� value:', this.queryParams.tjCategory);
+          this.debouncedFetchBiaobenData(row.value);
+        }
+      } else {
+        this.queryParams.tjCategory = null;
+        this.OnenewpacName = [];
+        console.log('鏍囨湰閫夋嫨宸叉竻绌�');
+      }
+    },
+    handleChangesingle(selection) {
+      if (selection.length > 0) {
+        selection.forEach(item => {
+          if (!this.OnenewpacName.some(existing => existing.proId === item.proId)) {
+            this.OnenewpacName.push({ ...item });
+          }
+        });
+        this.$refs.tre.clearSelection();
+      }
+    },
+    cancell() {
+      this.openOne = false;
+    },
+    submitrighr() {
+      if (!this.queryParams.tjCategory) {
+        this.$message.error('璇峰厛閫夋嫨涓�涓爣鏈�');
+        return;
+      }
+      if (!this.OnenewpacName.length) {
+        this.$message.error('璇疯嚦灏戦�夋嫨涓�涓」鐩�');
+        return;
+      }
+      const proIds = this.OnenewpacName.map(item => item.proId);
+      const bw = this.queryParams.tjCategory;
+      this.loading = true;
+      editPart({ proIds, bw })
+        .then(() => {
+          this.$message.success('淇濆瓨鎴愬姛');
+          this.OnenewpacName = [];
+          this.queryParams.tjCategory = null;
+          this.$refs.specimenTable.clearSelection();
+          this.loading = false;
+        })
+        .catch(error => {
+          this.$message.error('淇濆瓨澶辫触');
+          console.error(error);
+          this.loading = false;
+        });
+    },
+    handledbelete(row) {
+      this.loading = true;
+      delPart({ proId: row.proId })
+        .then(() => {
+          this.OnenewpacName = this.OnenewpacName.filter(item => item.proId !== row.proId);
+          this.$message.success('鍒犻櫎鎴愬姛');
+          this.loading = false;
+        })
+        .catch(error => {
+          this.$message.error('鍒犻櫎澶辫触');
+          console.error(error);
+          this.loading = false;
+        });
+    },
+    fetchBiaobenData(bw) {
+      console.log('璋冪敤 searchBiaoben锛堜腑闂磋〃鏍硷級锛屽弬鏁�:', { bw });
+      this.loading = true;
+      searchPart({ bw })
+        .then(response => {
+          this.OnenewpacName = response.data || [];
+          this.loading = false;
+        })
+        .catch(error => {
+          this.$message.error('鑾峰彇鏍囨湰鏁版嵁澶辫触');
+          console.error(error);
+          this.loading = false;
+        });
+    },
+    fetchInitialBiaobenData() {
+      console.log('璋冪敤 searchBiaoben锛堝垵濮嬪姞杞斤紝鍙充晶琛ㄦ牸锛夛紝鍙傛暟: {}');
+      this.loading = true;
+      searchPart({})
+        .then(response => {
+          this.originalTreedata = response.data || [];
+          this.Treedata = [...this.originalTreedata];
+          this.loading = false;
+        })
+        .catch(error => {
+          this.$message.error('鑾峰彇鍒濆椤圭洰鏁版嵁澶辫触');
+          console.error(error);
+          this.loading = false;
+        });
+    },
+  },
 };
-</script>
\ No newline at end of file
+</script>
+
+<style scoped>
+.app-container {
+  padding: 20px;
+}
+.dialog-footer1 {
+  margin-top: 60px;
+  text-align: center;
+}
+</style>
\ No newline at end of file
diff --git a/src/views/system/zhiye/index.vue b/src/views/system/zhiye/index.vue
index f053973..1ae360c 100644
--- a/src/views/system/zhiye/index.vue
+++ b/src/views/system/zhiye/index.vue
@@ -488,20 +488,20 @@
                   @blur="numberChangeXianPrice(discount, discount)" />
               </el-form-item>
               <el-form-item label="鎺ュ宸ラ緞骞�" prop="zhiyeJhgln" label-width="84px">
-                <el-input  v-model="form.zhiyeJhgln"  type="number" style="width: 140px"/>
+                <el-input v-model="form.zhiyeJhgln" type="number" style="width: 140px" />
               </el-form-item>
               <el-form-item label="鎺ュ宸ラ緞鏈�" prop="zhiyeJhgln" label-width="84px">
-                <el-input  v-model="form.zhiyeJhgly" style="width: 140px" type="number" />
+                <el-input v-model="form.zhiyeJhgly" style="width: 140px" type="number" />
               </el-form-item>
               <el-form-item label="寮�濮嬫帴瀹虫棩鏈�" prop="zhiyeKsjhrq" label-width="100px">
-                <el-date-picker clearable v-model="form.zhiyeKsjhrq" type="date"
-                  value-format="yyyy-MM-dd" style="width: 200px" />
+                <el-date-picker clearable v-model="form.zhiyeKsjhrq" type="date" value-format="yyyy-MM-dd"
+                  style="width: 200px" />
               </el-form-item>
               <el-form-item label="宸ュ彿" label-width="50px">
-                <el-input  v-model="form.zhiyeGh"  />
+                <el-input v-model="form.zhiyeGh" />
               </el-form-item>
               <el-form-item label="杞﹂棿" label-width="106px">
-                <el-input  v-model="form.zhiyeCj" />
+                <el-input v-model="form.zhiyeCj" />
               </el-form-item>
               <br />
 
@@ -550,9 +550,6 @@
                 font-size: 16px;
                 margin-right: 20px;
               ">
-              <span v-if="this.tableData1[0]">{{
-                this.tableData1[0].pacName || ""
-              }}</span>
               宸查�夐」鐩潯鏁帮細<span style="font-weight: 700; color: red; margin-right: 5px">{{ this.tableData1.length || 0
                 }}</span>鏉�
             </div>
@@ -2394,90 +2391,29 @@
       let cusSex = this.form.cusSex;
       this.datekey = Date.now();
       //鍏ㄩ儴濂楅
-
-      let param = {
-        sex: cusSex,
-        dwId: this.form.firmId || "",
-      };
-      if (this.form.tjType == 1) {
-        if (!this.form.firmId && !this.form.firmName) {
-          this.$message({
-            type: "warning",
-            message: "璇峰厛缁存姢鍗曚綅锛�",
-          });
-        } else if (!this.form.firmId && this.form.firmName) {
-          this.taocan = true;
-          this.loading = true;
-          deptTreeSelect(cusSex).then((response) => {
-            this.newpacName = response.rows;
-            try {
-              if (this.tableData1.length >= 1) {
-                this.newpacName.forEach((item3) => {
-                  this.tableData1.forEach((item4) => {
-                    item4.list.forEach((item6) => {
-                      if (item6.pacName === item3.pacName) {
-                        this.$nextTick(() => {
-                          this.$refs.tb.toggleRowSelection(item3, true);
-                        });
-                        throw Error();
-                      }
+      this.taocan = true;
+      this.loading = true;
+      deptTreeSelect(cusSex).then((response) => {
+        this.newpacName = response.rows;
+        try {
+          if (this.tableData1.length >= 1) {
+            this.newpacName.forEach((item3) => {
+              this.tableData1.forEach((item4) => {
+                item4.list.forEach((item6) => {
+                  if (item6.pacName === item3.pacName) {
+                    this.$nextTick(() => {
+                      this.$refs.tb.toggleRowSelection(item3, true);
                     });
-                  });
-                });
-              }
-            } catch (error) { }
-            this.loading = false;
-          });
-        }
-
-        else {
-          this.taocan = true;
-          this.loading = true;
-          tuantiSelect(param).then((res) => {
-            this.newpacName = res.data;
-            try {
-              if (this.tableData1.length >= 1) {
-                this.newpacName.forEach((item3) => {
-                  this.tableData1.forEach((item4) => {
-                    item4.list.forEach((item6) => {
-                      if (item6.pacName === item3.pacName) {
-                        this.$nextTick(() => {
-                          this.$refs.tb.toggleRowSelection(item3, true);
-                        });
-                        throw Error();
-                      }
-                    });
-                  });
-                });
-              }
-            } catch (error) { }
-            this.loading = false;
-          });
-        }
-      } else {
-        this.taocan = true;
-        this.loading = true;
-        deptTreeSelect(cusSex).then((response) => {
-          this.newpacName = response.rows;
-          try {
-            if (this.tableData1.length >= 1) {
-              this.newpacName.forEach((item3) => {
-                this.tableData1.forEach((item4) => {
-                  item4.list.forEach((item6) => {
-                    if (item6.pacName === item3.pacName) {
-                      this.$nextTick(() => {
-                        this.$refs.tb.toggleRowSelection(item3, true);
-                      });
-                      throw Error();
-                    }
-                  });
+                    throw Error();
+                  }
                 });
               });
-            }
-          } catch (error) { }
-          this.loading = false;
-        });
-      }
+            });
+          }
+        } catch (error) { }
+        this.loading = false;
+      });
+
     },
 
     // 鐐瑰嚮澶氶�夋鑾峰彇閫変腑鏁版嵁
@@ -2967,6 +2903,15 @@
         });
       }
 
+      // 濡傛灉 tjCategory 涓� "02"锛岀‘淇濋�変腑鐨勫椁愯娣诲姞鍒� tableData1
+      if (this.tjCategory === "02" && this.tableData.length > 0) {
+        this.tableData.forEach((item) => {
+          if (!this.tableData1.some((existingItem) => existingItem.pacId === item.pacId)) {
+            this.tableData1.push(item);
+          }
+        });
+      }
+
       this.taocan = false;
       this.defaultKeys = [];
       this.DataLists = [];

--
Gitblit v1.8.0