From 4150655e17cf8903a5caa34562ddecd0f92ba5cc Mon Sep 17 00:00:00 2001
From: qinxianzhangyao <11053546+qinxianzhangyao@user.noreply.gitee.com>
Date: 星期二, 26 三月 2024 17:49:06 +0800
Subject: [PATCH] qxtj

---
 src/views/hosp/order/index.vue |  114 ++++++++++++++++++++++-----------------------------------
 1 files changed, 44 insertions(+), 70 deletions(-)

diff --git a/src/views/hosp/order/index.vue b/src/views/hosp/order/index.vue
index 20ea617..3a04bfa 100644
--- a/src/views/hosp/order/index.vue
+++ b/src/views/hosp/order/index.vue
@@ -412,7 +412,7 @@
     <el-dialog
       :title="title"
       :visible.sync="Projectopen"
-      width="1500px"
+      width="1100px"
       style="height: 860px"
       append-to-body
     >
@@ -426,7 +426,7 @@
           <el-input placeholder="杈撳叆鍏抽敭瀛楄繘琛岃繃婊�" v-model="filterText">
           </el-input>
           <div class="tab3">
-            <div class="outside1">
+           
               <el-tree
                 class="filter-tree"
                 v-loading="loading"
@@ -434,23 +434,22 @@
                 :props="defaultProps"
                 show-checkbox
                 node-key="proId"
-                @check-change="handleCurrentChecked"
+                @check="handleCurrentChecked"
                 :default-checked-keys="checkedkey"
                 :filter-node-method="filterNode"
                 ref="tree"
               >
               </el-tree>
-            </div>
+           
           </div>
         </el-col>
-        <el-col :span="4">
+        <el-col :span="5">
           <div
             style="text-align: center; margin-bottom: 10px; margin-top: 10px"
           >
-            椤圭洰鍒楄〃
+            鏄庣粏椤圭洰鍒楄〃
           </div>
           <div class="tab3">
-            <div class="outside1">
               <el-tree
                 class="filter-tree"
                 v-loading="loading"
@@ -463,33 +462,24 @@
                 :default-checked-keys="checkedListkey"
               >
               </el-tree>
-            </div>
           </div>
         </el-col>
-        <el-col :span="12">
+        <el-col :span="11">
           <div class="grid-content bg-purple">
             <div style="text-align: center; margin-bottom: 10px">
               宸查�夐」鐩垪琛�
             </div>
-            <div
-              style="
-                padding: 0px 6px;
-                border: 1px solid #e6ebf5;
-                max-height: 420px;
-                overflow: auto;
-              "
-            >
               <el-table
                 :data="DataList"
                 border
                 style="width: 100%"
                 height="250"
               >
-                <el-table-column prop="propinName" label="鐖堕」">
+              <el-table-column prop="propinName" label="妫�鏌ラ」鐩�" >
                 </el-table-column>
-                <el-table-column prop="proName" label="椤圭洰" width="180">
+                <el-table-column prop="proName" label="鏄庣粏椤圭洰" width="260px">
                 </el-table-column>
-                <el-table-column prop="proPrice" label="鍘熶环">
+                <el-table-column prop="proPrice" label="鍘熶环" width="56px">
                 </el-table-column>
 
                 <el-table-column
@@ -497,7 +487,7 @@
                   align="center"
                   fixed="right"
                   class-name="small-padding fixed-width"
-                  width="80px"
+                  width="50px"
                 >
                   <template slot-scope="scope">
                     <el-button
@@ -505,7 +495,8 @@
                       type="text"
                       icon="el-icon-delete"
                       @click="handleDelete(scope.row)"
-                      >鍒犻櫎</el-button
+                      title="鍒犻櫎"
+                      ></el-button
                     >
                   </template>
                 </el-table-column>
@@ -522,7 +513,6 @@
                   </el-collapse-item>
                 </div>
               </el-collapse>
-            </div>
             <template>
               <el-form :model="form">
                 <el-form-item label="浣撴绫诲瀷" prop="tjType">
@@ -593,7 +583,7 @@
     <el-dialog
       :title="title"
       :visible.sync="Projectopen1"
-      width="1500px"
+      width="1100px"
       style="height: 860px"
       append-to-body
     >
@@ -607,7 +597,7 @@
           <el-input placeholder="杈撳叆鍏抽敭瀛楄繘琛岃繃婊�" v-model="filterText">
           </el-input>
           <div class="tab3">
-            <div class="outside1">
+           
               <el-tree
                 class="filter-tree"
                 v-loading="loading"
@@ -621,14 +611,14 @@
                 ref="tree"
               >
               </el-tree>
-            </div>
+           
           </div>
         </el-col>
-        <el-col :span="4">
+        <el-col :span="5">
           <div
             style="text-align: center; margin-bottom: 10px; margin-top: 10px"
           >
-            椤圭洰鍒楄〃
+          鏄庣粏椤圭洰鍒楄〃
           </div>
           <div class="tab3">
             <div class="outside1">
@@ -647,30 +637,23 @@
             </div>
           </div>
         </el-col>
-        <el-col :span="12">
+        <el-col :span="11">
           <div class="grid-content bg-purple">
             <div style="text-align: center; margin-bottom: 10px">
               宸查�夐」鐩垪琛�
             </div>
-            <div
-              style="
-                padding: 0px 6px;
-                border: 1px solid #e6ebf5;
-                max-height: 420px;
-                overflow: auto;
-              "
-            >
+            
               <el-table
                 :data="DataList"
                 border
                 style="width: 100%"
                 height="250"
               >
-                <el-table-column prop="propinName" label="妫�鏌ラ」鐩�">
+              <el-table-column prop="propinName" label="妫�鏌ラ」鐩�" >
                 </el-table-column>
-                <el-table-column prop="proName" label="鏄庣粏椤圭洰" width="180">
+                <el-table-column prop="proName" label="鏄庣粏椤圭洰" width="260px">
                 </el-table-column>
-                <el-table-column prop="proPrice" label="鍘熶环">
+                <el-table-column prop="proPrice" label="鍘熶环" width="56px">
                 </el-table-column>
 
                 <el-table-column
@@ -678,7 +661,7 @@
                   align="center"
                   fixed="right"
                   class-name="small-padding fixed-width"
-                  width="80px"
+                  width="50px"
                 >
                   <template slot-scope="scope">
                     <el-button
@@ -703,7 +686,7 @@
                   </el-collapse-item>
                 </div>
               </el-collapse>
-            </div>
+            
             <template>
               <el-form :model="form">
                 <el-form-item label="浣撴绫诲瀷" prop="tjType">
@@ -880,6 +863,7 @@
       loading: true,
       // 閫変腑鏁扮粍
       ids: [],
+      dataObj:{},
       // 闈炲崟涓鐢�
       single: true,
       // 闈炲涓鐢�
@@ -1287,11 +1271,6 @@
         cusPhone: this.cusPhone,
         cusSex: this.cusSex,
       };
-      // if (row.tjType) {
-      //   this.form.tjType = parseInt(row.tjType);
-      // } else {
-      //   this.form.tjType = 0;
-      // }
       /** 鏌ヨ閮ㄩ棬涓嬫媺鏍戠粨鏋� */
       this.getDataList();
       this.Projectopen1 = true;
@@ -1299,8 +1278,7 @@
     },
     // 鐐瑰嚮鑾峰彇姣忎釜鏍戣妭鐐�
     handleCurrentChecked(data, checked, checkedNodes) {
-      console.log(data, checked, checkedNodes);
-      console.log(this.DataList,22222);
+      this.dataObj = data
       if (checked.checkedNodes.length != 0) {
         this.$refs.tree.setCheckedKeys([data.proId]);
         let proId = data.proId;
@@ -1309,13 +1287,13 @@
           this.TreedataList.forEach((item) => {
             this.checkedListkey.push(item.proId);
             this.DataList.push(item);
+            this.spliceData();
             this.DataList.forEach((item1) => {
               if (item1.proParentId == data.proId) {
                 item1.propinName = data.proName;
               }
             });
           });
-          this.spliceData(this.DataList);
           this.TotalPrice1 = 0;
           if (this.DataList.length != 0) {
             this.list1 = false;
@@ -1328,34 +1306,23 @@
         let proId = data.proId;
         getProSonDxList(proId).then((res) => {
           this.TreedataList = res.data.list;
-          this.DataList.forEach((item, index) => {
-            this.TreedataList.forEach((item1) => {
-              if (item.proId == item1.proId) {
-                this.DataList.splice(index, this.TreedataList.length);
-                this.TotalPrice1 = 0;
-                this.DataList.forEach((item1) => {
-                  this.TotalPrice1 = item1.proPrice + this.TotalPrice1;
-                });
-              }
-            });
-          });
+          this.checkedListkey = [];
         });
-        this.checkedListkey = [];
-        console.log(this.DataList,1111)
+        
       }
     },
 
-    spliceData(row) {
-      for (var i = 0; i < row.length; i++) {
-        for (var j = i + 1; j < row.length; j++) {
-          if (row[i].proId == row[j].proId) {
+    spliceData() {
+      for (var i = 0; i < this.DataList.length; i++) {
+        for (var j = i + 1; j < this.DataList.length; j++) {
+          if (this.DataList[i].proId == this.DataList[j].proId) {
             //濡傛灉绗竴涓瓑浜庣浜屼釜锛宻plice鏂规硶鍒犻櫎绗簩涓�
-            row.splice(j, 1);
+            this.DataList.splice(j, 1);
             j--;
           }
         }
       }
-      return row;
+      return this.DataList;
     },
 
     // 鐐瑰嚮鑾峰彇姣忎釜鏍戣妭鐐�
@@ -1372,6 +1339,12 @@
         });
       } else if (checked == true) {
         this.DataList.push(data);
+        this.DataList.forEach((item1) => {
+              if (item1.proParentId == this.dataObj.proId) {
+                item1.propinName = this.dataObj.proName;
+              }
+            });
+        this.spliceData()
         this.TotalPrice1 = 0;
         this.DataList.forEach((item1) => {
           this.TotalPrice1 = item1.proPrice + this.TotalPrice1;
@@ -1562,7 +1535,7 @@
 // }
 
 .outside {
-  width: 700px;
+  width: 500px;
   display: flex;
   margin-top: 8px;
 }
@@ -1570,6 +1543,7 @@
 .tab3 {
   max-height: 500px;
   overflow-y: auto;
+  border: 1px solid #d9d9d9;
 }
 
 .outside1 {

--
Gitblit v1.8.0