From 94e3b64fbb8d3d4b148174cabcfbbccad2e9809f Mon Sep 17 00:00:00 2001
From: qx <1084500556@qq.com>
Date: 星期五, 27 六月 2025 17:48:55 +0800
Subject: [PATCH] qx

---
 src/views/hosp/project/index.vue |   67 +++++++++++++++++++++++++++++++--
 1 files changed, 62 insertions(+), 5 deletions(-)

diff --git a/src/views/hosp/project/index.vue b/src/views/hosp/project/index.vue
index 0ee06f4..7e0036e 100644
--- a/src/views/hosp/project/index.vue
+++ b/src/views/hosp/project/index.vue
@@ -9,7 +9,7 @@
         <div class="scrollable-container">
           <div class="content">
             <el-tree :data="deptOptions" :props="defaultProps" :expand-on-click-node="false"
-              :filter-node-method="filterNode" ref="tree" node-key="id" :default-expanded-keys="treeId"
+              :filter-node-method="filterNode" ref="tree1" node-key="id" :default-expanded-keys="treeId"
               highlight-current @node-click="handleNodeClick" :render-content="renderContent" v-loading="loadings" />
           </div>
         </div>
@@ -75,6 +75,11 @@
           <el-table-column label="鏄惁绌鸿吂" align="center" prop="proCheckMethod" :show-overflow-tooltip="true" width="75px">
             <template slot-scope="scope">
               <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.proCheckMethod" />
+            </template>
+          </el-table-column>
+          <el-table-column label="鏄惁澶栭��" align="center" prop="proDelivery" :show-overflow-tooltip="true" width="75px">
+            <template v-slot="scope">
+              {{ scope.row.proDelivery === 0 ? "鏄�" : scope.row.proDelivery === 1 ? "鍚�" : "" }}
             </template>
           </el-table-column>
           <el-table-column label="椤圭洰鏍囧噯鍊�" align="center" prop="proScope" :show-overflow-tooltip="true" width="90px">
@@ -228,6 +233,18 @@
         </el-form-item>
         <el-form-item label="鎺掑簭" prop="xh">
           <el-input v-model="form.xh" placeholder="璇疯緭鍏ユ帓搴�" style="width: 200px" />
+        </el-form-item>
+        <el-form-item label="鏄惁鍙備笌寮傚父" prop="sfcyyc">
+          <el-select v-model="form.sfcyyc" placeholder="璇烽�夋嫨鏄惁鍙備笌寮傚父" style="width: 260px">
+            <el-option v-for="dict in dictTypesy" :key="dict.value" :label="dict.label"
+              :value="dict.value"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="鏄惁澶栭��" prop="proDelivery">
+          <el-select v-model="form.proDelivery" placeholder="璇烽�夋嫨鏄惁澶栭��" style="width: 200px">
+            <el-option v-for="dict in wsTypesy" :key="dict.value" :label="dict.label"
+              :value="dict.value"></el-option>
+          </el-select>
         </el-form-item>
       </el-form>
       <el-button style="margin-left: 40px" type="primary" plain size="mini" icon="el-icon-plus"
@@ -441,6 +458,26 @@
       },
       xmmc: "",
       chargeId: [],
+      dictTypesy: [
+        {
+          value:"0",
+          label:"鏄�"
+        },
+        {
+          value:"1",
+          label:"鍚�"
+        }
+      ],
+      wsTypesy: [
+        {
+          value:"0",
+          label:"鏄�"
+        },
+        {
+          value:"1",
+          label:"鍚�"
+        }
+      ],
       List: false,
       deptName: "",
       deptOption: [],
@@ -515,6 +552,8 @@
         proScope: "",
         proSex: "2",
         resultType: "",
+        sfcyyc: "0",
+        proDelivery:"1"
       },
       rules: {
         createTime: [
@@ -549,7 +588,7 @@
           const lastId = newVal[newVal.length - 1] || "532";
           const node = this.findNodeById(this.deptOptions, lastId);
           if (node) {
-            this.$refs.tree.setCurrentKey(lastId);
+            this.$refs.tree1.setCurrentKey(lastId);
             const nodeElement = document.querySelector(`.el-tree-node[data-key="${lastId}"] .el-tree-node__content`);
             if (nodeElement) {
               nodeElement.click();
@@ -587,7 +626,7 @@
   },
   methods: {
     debounceFilter: debounce(function (val) {
-      this.$refs.tree.filter(val);
+      this.$refs.tree1.filter(val);
     }, 300),
     precomputePinyin() {
       const traverse = (nodes) => {
@@ -725,6 +764,7 @@
       this.title = "浣撴椤圭洰淇℃伅缁存姢";
       this.form.deptId = this.queryParams.deptId || null;
       this.form.proCheckMethod = "N";
+      this.form.proDelivery = "1";
       if (this.key === "Y") {
         gettreeList().then((response) => {
           this.deptOptionstree = response.data;
@@ -836,7 +876,7 @@
     handleNodeClick(date) {
 
       this.treeDate = date;
-      console.log(this.treeDate)
+      this.xiugaiList ={}
       this.xiugais = date.qf === "0";
       let proId = date.id;
       getInfoByProId(proId).then((response) => {
@@ -872,6 +912,11 @@
       getAllChildListById(data).then(() => {
         this.loading = false;
       });
+      this.deptName = "";
+      // 鎵嬪姩璋冪敤杩囨护鏂规硶锛堥渶绛夊緟 DOM 鏇存柊锛�
+      this.$nextTick(() => {
+        this.$refs.tree1.filter(this.deptName);
+      });
     },
     handleClose() {
       this.cancel();
@@ -901,6 +946,7 @@
         tjStandardList: [],
         proStatus: "0",
         resultType: "1",
+        proDelivery:'1'
       };
       this.resetForm("form");
     },
@@ -910,7 +956,7 @@
     resetQuery() {
       this.resetForm("queryForm");
       this.queryParams.proId = undefined;
-      this.$refs.tree.setCurrentKey(null);
+      this.$refs.tree1.setCurrentKey(null);
       this.handleQuery();
     },
     flexColumnWidth(column) {
@@ -981,8 +1027,11 @@
       }
     },
     handleUpdate1() {
+      this.form ={}
       this.form = this.xiugaiList;
       this.form.proStatus = this.form.proStatus.toString();
+      this.form.sfcyyc = this.form.sfcyyc.toString();
+      this.form.proDelivery = this.form.proDelivery.toString();
       this.proParent = true;
       this.isPriceDisabled = true;
       getlist().then((response) => {
@@ -993,6 +1042,7 @@
           project.children = this.handleTree(response.data.list, "proId");
           this.key = response.data.key;
           this.projectOptions.push(project);
+          console.log( this.projectOptions,11111)
         }
       });
       this.open = true;
@@ -1008,6 +1058,8 @@
         this.showPrise = this.form.proParentId === "0";
         this.showRentPrise = !this.showPrise;
         this.form.proStatus = this.form.proStatus.toString();
+        this.form.sfcyyc = this.form.sfcyyc.toString();
+        this.form.proDelivery =  this.form.proDelivery.toString() 
         this.form.consumablesList = response.data.consumablesList;
         this.form.tjStandardList = response.data.tjStandardList;
         if (this.form.tjStandardList) {
@@ -1067,6 +1119,11 @@
           }
         }
       });
+      this.deptName = "";
+      // 鎵嬪姩璋冪敤杩囨护鏂规硶锛堥渶绛夊緟 DOM 鏇存柊锛�
+      this.$nextTick(() => {
+        this.$refs.tree1.filter(this.deptName);
+      });
     },
     processSubmission(isUpdate, isY) {
       if (isUpdate) {

--
Gitblit v1.8.0