From 10b03fefc1355bfaad0b79494d6564ce4ee4adf7 Mon Sep 17 00:00:00 2001
From: qinxianzhangyao <11053546+qinxianzhangyao@user.noreply.gitee.com>
Date: 星期六, 09 十二月 2023 10:35:09 +0800
Subject: [PATCH] qxtj

---
 src/views/hosp/project/index.vue |  101 +++++++++++++++++++++++++++++---------------------
 1 files changed, 59 insertions(+), 42 deletions(-)

diff --git a/src/views/hosp/project/index.vue b/src/views/hosp/project/index.vue
index a8b04ec..dbf405e 100644
--- a/src/views/hosp/project/index.vue
+++ b/src/views/hosp/project/index.vue
@@ -91,8 +91,15 @@
           <treeselect v-model="form.proParentId" :options="projectOptions" :normalizer="normalizer" :show-count="true"
             placeholder="閫夋嫨涓婚」鍚嶇О" style="width: 200px" @select="obtain" />
         </el-form-item>
-        <el-form-item label="鏄庣粏椤圭洰" prop="proName" v-if="key == 'Y'">
-          <el-input v-model="form.proName" placeholder="璇疯緭鍏ユ槑缁嗛」鐩�" @click.native="getDetailed">
+        <el-form-item label="鏄庣粏椤圭洰" prop="proName" v-if="key == 'Y'" >
+          <span slot="label" style="display:inline-block;border-bottom: 2px solid blue;" @click="getDetailed">
+            鏄庣粏椤圭洰
+            <!-- <el-tooltip effect="dark" content="鏄庣粏椤圭洰" placement="bottom">
+              <i class='el-icon-question' @click="getDetailed" />
+            </el-tooltip> -->
+          </span>
+
+          <el-input v-model="form.proName" placeholder="璇疯緭鍏ユ槑缁嗛」鐩�">
           </el-input>
         </el-form-item>
         <el-form-item label="鏄庣粏椤圭洰" prop="proName" v-if="key == 'N'">
@@ -113,22 +120,22 @@
         </el-form-item>
         <el-form-item label="绌鸿吂" prop="isEat">
           <el-select v-model="form.isEat" placeholder="璇烽�夋嫨鏄惁绌鸿吂" style="width: 200px">
-                  <el-option v-for="dict in dict.type.sys_yes_no" :key="dict.value" :label="dict.label"
-                    :value="dict.value"></el-option>
-                </el-select>
+            <el-option v-for="dict in dict.type.sys_yes_no" :key="dict.value" :label="dict.label"
+              :value="dict.value"></el-option>
+          </el-select>
         </el-form-item>
-         <el-form-item label="鎬у埆" prop="proSex">
+        <el-form-item label="鎬у埆" prop="proSex">
           <el-select v-model="form.proSex" placeholder="璇烽�夋嫨浣撴浜烘�у埆" style="width: 200px">
-              <el-option v-for="dict in dict.type.sys_user_sex" :key="dict.value" :label="dict.label"
-                :value="dict.value"></el-option>
-            </el-select>
+            <el-option v-for="dict in dict.type.sys_user_sex" :key="dict.value" :label="dict.label"
+              :value="dict.value"></el-option>
+          </el-select>
         </el-form-item>
         <el-form-item label="椤圭洰绫诲瀷" prop="proType">
           <el-input v-model="form.proType" placeholder="璇疯緭鍏ラ」鐩被鍨�" />
         </el-form-item>
-       
-        <el-form-item label="绉戝鍚嶇О" prop="deptName ">
-          <el-select v-model="form.deptName" placeholder="璇烽�夋嫨绉戝鍚嶇О" @change="changeValue" filterable style="width: 205px">
+
+        <el-form-item label="绉戝鍚嶇О" prop="deptId">
+          <el-select v-model="form.deptId" placeholder="璇烽�夋嫨绉戝鍚嶇О" @change="changeValue" filterable style="width: 205px">
             <el-option v-for="dict in parentNameList" :key="dict.deptId" :label="dict.deptName" :value="dict.deptId" />
           </el-select>
         </el-form-item>
@@ -249,7 +256,7 @@
                   style="margin-bottom: 20px" />
               </div>
               <div id="changtree">
-                <el-tree ref="tree" node-key="id" highlight-current :default-expanded-keys="chargeId" 
+                <el-tree ref="tree" node-key="id" highlight-current :default-expanded-keys="chargeId"
                   :data="deptOptionstree" :props="defaultPropstree" :expand-on-click-node="false"
                   :auto-expand-parent="false" :filter-node-method="filterNode2" @node-click="handleNodecharge" />
               </div>
@@ -337,7 +344,7 @@
 
 export default {
   name: "Project",
-  dicts: ["sys_normal_disable", "dict_personnel_type", "sys_user_sex", "tj_result_type", "dis_sampling_tab", "sys_dict_specimen", "sys_dict_position", "tj_result_type","sys_yes_no"],
+  dicts: ["sys_normal_disable", "dict_personnel_type", "sys_user_sex", "tj_result_type", "dis_sampling_tab", "sys_dict_specimen", "sys_dict_position", "tj_result_type", "sys_yes_no"],
   components: { Treeselect, IconSelect },
   data() {
     return {
@@ -378,7 +385,7 @@
       // 琛ㄦ牸鏍戞暟鎹�
       deptList: [],
       parentNameList: [],
-      sfxmId:null,
+      sfxmId: null,
       // 浣撴椤圭洰琛ㄦ牸鏁版嵁
       projectList: [],
       // 鑿滃崟鏍戦�夐」
@@ -395,7 +402,7 @@
         children: "children",
         label: "label",
       },
-      id:"",
+      id: "",
       // 閲嶆柊娓叉煋琛ㄦ牸鐘舵��
       refreshTable: true,
       // 鏌ヨ鍙傛暟
@@ -437,7 +444,7 @@
         proPrice: [
           { required: true, message: "椤圭洰浠锋牸涓嶈兘涓虹┖", trigger: "blur" },
         ],
-        deptName: [
+        deptId: [
           { required: true, message: "绉戝鍚嶇О涓嶈兘涓虹┖", trigger: "blur" },
         ],
         // proStandard: [
@@ -482,7 +489,7 @@
     this.getDeptTree();
   },
   methods: {
- 
+
     //鏄惁鏄剧ず閫変腑鐨勫��
     display(value) { },
     /** 鏌ヨ浣撴椤圭洰鍒楄〃 */
@@ -526,18 +533,37 @@
       // }
       this.open = true;
       this.title = "浣撴椤圭洰淇℃伅缁存姢";
+      this.form.deptId = this.queryParams.deptId
       if (this.key = "Y") {
-          gettreeList().then((response) => {
-            this.deptOptionstree = response.data;
-            this.chargeId.push(this.deptOptionstree[0].id)
-          });
-        }
+        gettreeList().then((response) => {
+          this.deptOptionstree = response.data;
+          this.chargeId.push(this.deptOptionstree[0].id)
+        });
+      }
     },
 
     // 鎵撳紑input寮规
     getDetailed() {
-      this.dialogTableVisible = true;
-      this.getlistSfxm()
+      if (this.selectList.proName === "涓荤被鐩�") {
+        this.dialogTableVisible = false;
+      } else {
+        this.dialogTableVisible = true;
+        this.getlistSfxm()
+      }
+
+    },
+
+    obtain(vals) {
+      if (this.projectOptions) {
+        this.selectList = vals;
+      }
+      if (this.selectList.proName === "涓荤被鐩�") {
+        this.showPrise = true;
+        this.showRentPrise = false;
+      } else {
+        this.showPrise = false;
+        this.showRentPrise = true;
+      }
     },
     getlistSfxm() {
       this.loading = true;
@@ -600,7 +626,7 @@
         // } else if (response.data.key == "N") {
         //   this.key = response.data.key
         // }
-        this.projectOptions.push(project);      
+        this.projectOptions.push(project);
       });
     },
     /** 鏌ヨ閮ㄩ棬鍒楄〃 */
@@ -734,20 +760,9 @@
       }
     },
 
-    
 
-    obtain(vals) {
-      if (this.projectOptions) {
-        this.selectList = vals;
-      }
-      if (this.selectList.proName === "涓荤被鐩�") {
-        this.showPrise = true;
-        this.showRentPrise = false;
-      } else {
-        this.showPrise = false;
-        this.showRentPrise = true;
-      }
-    },
+
+
     // 鏂板琛�
     addmembers() {
       if (this.form.proName) {
@@ -957,7 +972,8 @@
               } else {
                 this.form.consumablesList = null;
               }
-              if (this.form.deptName === null || this.form.proParentId === null) {
+              
+              if (this.form.deptId === null || this.form.proParentId === null) {
                 this.$message.error("璇峰~鍐欑埗椤瑰悕绉版垨绉戝鍚嶇О");
                 this.open = true;
               } else {
@@ -974,7 +990,7 @@
             }
           }
         });
-      }else if(this.key == "Y"){
+      } else if (this.key == "Y") {
         this.form.sfxmId = this.sfxmId
         this.$refs["form"].validate((valid) => {
           if (valid) {
@@ -1026,7 +1042,8 @@
               } else {
                 this.form.consumablesList = null;
               }
-              if (this.form.deptName === null || this.form.proParentId === null) {
+    
+              if (this.form.deptId === null || this.form.proParentId === null) {
                 this.$message.error("璇峰~鍐欑埗椤瑰悕绉版垨绉戝鍚嶇О");
                 this.open = true;
               } else {

--
Gitblit v1.8.0