فهرست منبع

Merge branch 'feature/协定方' into develop

cc12458 1 سال پیش
والد
کامیت
e2d9b684da

+ 65 - 41
src/components/ChineseMedicine.vue

@@ -215,7 +215,7 @@
         <!-- 表格  -->
         <div class="table-show flex-plane-t-between flex-wrap">
           <!-- 表一和表二 -->
-          <div class="table-left-body">
+          <div class="table-left-body" :style="{zIndex: Math.max(0, index % 2 + 1)}">
             <div class="table-left" v-if="true">
               <el-table
                 :data="recipe_tabs[recipe_tabs_c].tableData"
@@ -243,11 +243,7 @@
                           :disabled="recipe_tabs[recipe_tabs_c].disable"
                         ></el-input>
 
-                        <div
-                          class="table-choose3"
-                          v-if="index === scope.row.id - 1"
-                          :style="medIndex==0?'':{top:(medIndex*35)+'px'}"
-                        >
+                        <div class="table-choose3" v-if="index === scope.row.id - 1">
                           <div class="table-choose-h flex-vertical-between">
                             <div class="flex-center">药品名称</div>
                             <div class="flex-center">规格</div>
@@ -312,10 +308,7 @@
                           :disabled="recipe_tabs[recipe_tabs_c].disable"
                         ></el-input>
                         <!-- v-model="scope.row.key" -->
-                        <div
-                          class="table-choose3"
-                          :style="medIndex==0?'':{top:(medIndex*35)+'px'}"
-                        >
+                        <div class="table-choose3">
                           <div class="table-choose-h flex-vertical-between">
                             <div class="flex-center">药品名称</div>
                             <div class="flex-center">规格</div>
@@ -459,7 +452,7 @@
             </div>
           </div>
 
-          <div class="table-left-body">
+          <div class="table-left-body" :style="{zIndex: Math.max(0, index % 2)}">
             <div class="table-left" v-if="true">
               <el-table
                 :data="recipe_tabs[recipe_tabs_c].tableData1"
@@ -486,11 +479,7 @@
                           :disabled="recipe_tabs[recipe_tabs_c].disable"
                         ></el-input>
 
-                        <div
-                          class="table-choose3"
-                          v-if="index === scope.row.id - 1"
-                          :style="medIndex==0?'':{top:(medIndex*35)+'px'}"
-                        >
+                        <div class="table-choose3" v-if="index === scope.row.id - 1">
                           <div class="table-choose-h flex-vertical-between">
                             <div class="flex-center">药品名称</div>
                             <div class="flex-center">规格</div>
@@ -555,10 +544,7 @@
                           :disabled="recipe_tabs[recipe_tabs_c].disable"
                         ></el-input>
                         <!-- v-model="scope.row.key" -->
-                        <div
-                          class="table-choose3"
-                          :style="medIndex==0?'':{top:(medIndex*35)+'px'}"
-                        >
+                        <div class="table-choose3">
                           <div class="table-choose-h flex-vertical-between">
                             <div class="flex-center">药品名称</div>
                             <div class="flex-center">规格</div>
@@ -957,7 +943,7 @@
       </div>
     </div>
 
-    <popup
+    <popup class="accord-edit-wrapper"
       :showDialog="showDialog"
       distanceTop="4vh"
       @cancle="showDialog=false"
@@ -2014,10 +2000,10 @@ export default {
       let index = scope.row.id ? scope.row.id - 1 : 0;
       // console.log(this.recipe_tabs[this.recipe_tabs_c].totalTableD[index], '我是key')
 
-      let ids = document.querySelectorAll("#operate2");
-      ids.forEach((item, index) => {
-        item.style["z-index"] = "auto";
-      });
+      // let ids = document.querySelectorAll("#operate2");
+      // ids.forEach((item, index) => {
+      //   item.style["z-index"] = "auto";
+      // });
       // if (e != '') {
       //     this.recipe_tabs[this.recipe_tabs_c].totalTableD[
       //         scope.row.id - 1
@@ -2051,10 +2037,10 @@ export default {
         this.recipe_tabs[this.recipe_tabs_c].totalTableD[index].key = "";
         this.recipe_tabs[this.recipe_tabs_c].totalTableD[index].showSearch = false;
         this.recipe_tabs[this.recipe_tabs_c].totalTableD[index].drugList = [];
-        let ids = document.querySelectorAll("#operate2");
-        ids.forEach((item, index) => {
-          item.style["z-index"] = "99";
-        });
+        // let ids = document.querySelectorAll("#operate2");
+        // ids.forEach((item, index) => {
+        //   item.style["z-index"] = "99";
+        // });
         this._splitDataToView();
       }, 500);
     },
@@ -2612,7 +2598,15 @@ export default {
       }
       setTimeout(() => {
         const el = document.querySelectorAll(`#searchD${index+1}`)[0];
-        if (el) el.focus();
+        if (el) {
+          el.focus();
+          const container = document.querySelector(`.table-container`);
+          if (container) {
+            const _bottom = container.getBoundingClientRect().bottom;
+            const bottom = el.getBoundingClientRect().bottom;
+            if (bottom + 220 > _bottom) container.scrollTop += 220;
+          }
+        }
       }, 100);
     },
     // 获取省数据
@@ -2828,6 +2822,16 @@ export default {
   }
 };
 </script>
+<style lang="scss">
+.accord-edit-wrapper {
+  .popup-container {
+    display: flex;
+    flex-direction: column;
+    > div { flex: auto; }
+    > div.btns { flex: none; }
+  }
+}
+</style>
 <style lang="scss" scoped>
 @import "../style/common.scss";
 
@@ -2883,14 +2887,24 @@ export default {
 }
 
 #chineseM {
+  display: flex;
+  flex-direction: column;
   height: 100%;
   .table-container {
-    padding: 5px 0px;
+    display: flex;
+    flex-direction: column;
+    //padding: 5px 0px;
+    height: 100%;
     // height: 340px;
-    height: calc(100% - 80px);
+    //height: calc(100% - 80px);
     overflow: auto;
 
     .t-con-header {
+      position: sticky;
+      top: -1px;
+      z-index: 99;
+      background-color: #fff;
+      padding-top: 5px;
       margin-bottom: 0px;
 
       .t-con-radio {
@@ -2923,21 +2937,29 @@ export default {
         cursor: pointer;
       }
     }
+    .table-msg {
+      flex: auto;
+      display: flex;
+      flex-direction: column;
+
+    }
   }
 }
 
 .table-show {
+  flex: auto;
   width: 100%;
   // min-height: 212px;
-  overflow: auto;
+  //overflow: auto;
 
   // background: #5386F6;
   // overflow: hidden;
-  z-index: 999;
+  //z-index: 999;
   position: relative;
 
   .table-left-body {
     width: 50%;
+    height: 100%;
     position: relative;
     perspective: 100px;
     // padding-bottom: 10px;
@@ -2945,6 +2967,7 @@ export default {
 
   .table-left {
     width: 100%;
+    height: 100%;
     overflow-y: auto;
     border: 1px solid #dedede;
     box-sizing: border-box;
@@ -3002,7 +3025,7 @@ export default {
         height: 53px;
         line-height: 53px;
         border: 1px solid #dedede;
-        z-index: 9999;
+        //z-index: 9999;
         border-top: 0 !important;
       }
 
@@ -3064,7 +3087,7 @@ export default {
   }
 
   .table-choose {
-    z-index: 9999;
+    //z-index: 9999;
     width: 332px;
     height: 221px;
     background: #ffffff;
@@ -3118,7 +3141,7 @@ export default {
   padding: 0 10px;
   // margin-top: 241px;
   margin-top: 5px;
-  z-index: -1;
+  //z-index: -1;
 
   .header-about {
     .item {
@@ -3347,7 +3370,7 @@ export default {
   // perspective: 100px;
 
   .dose-section {
-    z-index: 999999 !important;
+    //z-index: 999999 !important;
     position: fixed;
     width: 50px;
     //left: 136px;
@@ -3367,16 +3390,16 @@ export default {
 }
 
 .table-choose3 {
-  z-index: 999999 !important;
+  z-index: 99;
   // width: 332px;
   width: 532px;
   height: 221px;
   background: #ffffff;
   border: 2px solid #d8d8d8;
   position: fixed;
-  top: 44px;
+  //top: 44px;
   left: 84px;
-  margin-top: 19px;
+  //margin-top: 19px;
   overflow: auto;
 
   .table-choose-h {
@@ -3446,6 +3469,7 @@ export default {
 
 .table-show::v-deep .el-table {
   // z-index: 999;
+  height: 100%;
 }
 
 .table-show::v-deep .el-table th {

+ 94 - 83
src/components/MedicineAccord.vue

@@ -44,14 +44,13 @@
         <!-- 表格  -->
         <div class="table-show flex-plane-t-between flex-wrap">
           <!-- 表一和表二 -->
-          <div class="table-left-body">
+          <div class="table-left-body" :style="{zIndex: Math.max(0, index % 2 + 1)}">
             <div class="table-left" v-if="true">
               <el-table
                 :data="recipe_tabs[recipe_tabs_c].tableData"
                 style="width:100%;"
                 :span-method="arraySpanMethod1"
                 id="table1"
-                height="500px"
               >
                 <el-table-column prop="id" label width="20">
                   <template slot-scope="scope">
@@ -73,11 +72,7 @@
                           :disabled="recipe_tabs[recipe_tabs_c].disable"
                         ></el-input>
 
-                        <div
-                          class="table-choose3"
-                          v-if="index === scope.row.id - 1"
-                          :style="medIndex==0?'':{top:(medIndex*35)+'px'}"
-                        >
+                        <div class="table-choose3" v-if="index === scope.row.id - 1">
                           <div class="table-choose-h flex-vertical-between">
                             <div class="flex-center">药品名称</div>
                             <div class="flex-center">规格</div>
@@ -142,10 +137,7 @@
                           :disabled="recipe_tabs[recipe_tabs_c].disable"
                         ></el-input>
                         <!-- v-model="scope.row.key" -->
-                        <div
-                          class="table-choose3"
-                          :style="medIndex==0?'':{top:(medIndex*35)+'px'}"
-                        >
+                        <div class="table-choose3">
                           <div class="table-choose-h flex-vertical-between">
                             <div class="flex-center">药品名称</div>
                             <div class="flex-center">规格</div>
@@ -289,13 +281,12 @@
             </div>
           </div>
 
-          <div class="table-left-body">
+          <div class="table-left-body" :style="{zIndex: Math.max(0, index % 2)}">
             <div class="table-left" v-if="true">
               <el-table
                 :data="recipe_tabs[recipe_tabs_c].tableData1"
                 :span-method="arraySpanMethod1"
                 id="table1"
-                height="500px"
               >
                 <el-table-column prop="id" label width="20">
                   <template slot-scope="scope">
@@ -317,11 +308,7 @@
                           :disabled="recipe_tabs[recipe_tabs_c].disable"
                         ></el-input>
 
-                        <div
-                          class="table-choose3"
-                          v-if="index === scope.row.id - 1"
-                          :style="medIndex==0?'':{top:(medIndex*35)+'px'}"
-                        >
+                        <div class="table-choose3" v-if="index === scope.row.id - 1">
                           <div class="table-choose-h flex-vertical-between">
                             <div class="flex-center">药品名称</div>
                             <div class="flex-center">规格</div>
@@ -386,10 +373,7 @@
                           :disabled="recipe_tabs[recipe_tabs_c].disable"
                         ></el-input>
                         <!-- v-model="scope.row.key" -->
-                        <div
-                          class="table-choose3"
-                          :style="medIndex==0?'':{top:(medIndex*35)+'px'}"
-                        >
+                        <div class="table-choose3">
                           <div class="table-choose-h flex-vertical-between">
                             <div class="flex-center">药品名称</div>
                             <div class="flex-center">规格</div>
@@ -1481,9 +1465,9 @@ export default {
       // console.log(this.recipe_tabs[this.recipe_tabs_c].totalTableD[index], '我是key')
 
       let ids = document.querySelectorAll(".medicine-editor-wrapper #operate2");
-      ids.forEach((item, index) => {
-        item.style["z-index"] = "auto";
-      });
+      // ids.forEach((item, index) => {
+      //   item.style["z-index"] = "auto";
+      // });
       // if (e != '') {
       //     this.recipe_tabs[this.recipe_tabs_c].totalTableD[
       //         scope.row.id - 1
@@ -1518,9 +1502,9 @@ export default {
         this.recipe_tabs[this.recipe_tabs_c].totalTableD[index].showSearch = false;
         this.recipe_tabs[this.recipe_tabs_c].totalTableD[index].drugList = [];
         let ids = document.querySelectorAll("#operate2");
-        ids.forEach((item, index) => {
-          item.style["z-index"] = "99";
-        });
+        // ids.forEach((item, index) => {
+        //   item.style["z-index"] = "99";
+        // });
         this._splitDataToView();
       }, 500);
     },
@@ -2069,8 +2053,15 @@ export default {
       }
       setTimeout(() => {
         const el = document.querySelectorAll(`.medicine-editor-wrapper #searchD${index+1}`)[0];
-        console.log(el);
-        if (el) el.focus();
+        if (el) {
+          el.focus();
+          const container = document.querySelector(`.popup-container`) || document.querySelector(`.second-view`)
+          if (container) {
+            const _bottom = container.getBoundingClientRect().bottom;
+            const bottom = el.getBoundingClientRect().bottom;
+            if (bottom + 220 > _bottom) container.scrollTop += 220;
+          }
+        }
       }, 100);
     },
     // 获取省数据
@@ -2268,6 +2259,55 @@ export default {
 };
 </script>
 <style lang="scss" scoped>
+.medicine-editor-wrapper {
+  height: 100%;
+}
+.table-container {
+  display: flex;
+  flex-direction: column;
+  padding: 5px 0px;
+  height: 100%;
+
+  .t-con-header {
+    flex: none;
+    margin-bottom: 0px;
+
+    .t-con-radio {
+      flex: 1;
+      padding-bottom: 5px;
+      border-bottom: 1px solid #eaeaea;
+    }
+
+    .t-radio-title {
+      width: 82px;
+      font-size: 16px;
+      font-family: PingFang SC;
+      font-weight: 400;
+      color: #333333;
+    }
+
+    .t-radio-group {
+      flex: 1;
+    }
+
+    .add-presc1 {
+      width: 84px;
+      height: 34px;
+      background: #ffae45;
+      border-radius: 4px;
+      font-size: 14px;
+      font-family: PingFang SC;
+      font-weight: bold;
+      color: #ffffff;
+      cursor: pointer;
+    }
+  }
+  .table-msg {
+    flex: auto;
+  }
+}
+</style>
+<style lang="scss" scoped>
 @import "../style/common.scss";
 
 .table-header {
@@ -2321,69 +2361,29 @@ export default {
   margin-right: 10px;
 }
 
-#chineseM {
-  height: 100%;
-  .table-container {
-    padding: 5px 0px;
-    // height: 340px;
-    height: calc(100% - 80px);
-    overflow: auto;
-
-    .t-con-header {
-      margin-bottom: 0px;
-
-      .t-con-radio {
-        flex: 1;
-        padding-bottom: 5px;
-        border-bottom: 1px solid #eaeaea;
-      }
-
-      .t-radio-title {
-        width: 82px;
-        font-size: 16px;
-        font-family: PingFang SC;
-        font-weight: 400;
-        color: #333333;
-      }
-
-      .t-radio-group {
-        flex: 1;
-      }
-
-      .add-presc1 {
-        width: 84px;
-        height: 34px;
-        background: #ffae45;
-        border-radius: 4px;
-        font-size: 14px;
-        font-family: PingFang SC;
-        font-weight: bold;
-        color: #ffffff;
-        cursor: pointer;
-      }
-    }
-  }
-}
-
 .table-show {
   width: 100%;
+  height: 100%;
   // min-height: 212px;
-  overflow: auto;
+  //overflow: auto;
 
   // background: #5386F6;
   // overflow: hidden;
-  z-index: 999;
+  //z-index: 999;
   position: relative;
 
   .table-left-body {
     width: 50%;
+    height: 100%;
     position: relative;
+    z-index: 0;
     perspective: 100px;
     // padding-bottom: 10px;
   }
 
   .table-left {
     width: 100%;
+    height: 100%;
     overflow-y: auto;
     border: 1px solid #dedede;
     box-sizing: border-box;
@@ -2441,7 +2441,7 @@ export default {
         height: 53px;
         line-height: 53px;
         border: 1px solid #dedede;
-        z-index: 9999;
+        //z-index: 9999;
         border-top: 0 !important;
       }
 
@@ -2503,7 +2503,7 @@ export default {
   }
 
   .table-choose {
-    z-index: 9999;
+    //z-index: 9999;
     width: 332px;
     height: 221px;
     background: #ffffff;
@@ -2557,7 +2557,7 @@ export default {
   padding: 0 10px;
   // margin-top: 241px;
   margin-top: 5px;
-  z-index: -1;
+  //z-index: -1;
 
   .header-about {
     .item {
@@ -2786,7 +2786,7 @@ export default {
   // perspective: 100px;
 
   .dose-section {
-    z-index: 999999 !important;
+    //z-index: 999999 !important;
     position: fixed;
     width: 50px;
     left: 136px;
@@ -2805,16 +2805,16 @@ export default {
 }
 
 .table-choose3 {
-  z-index: 999999 !important;
+  z-index: 99;
   // width: 332px;
   width: 532px;
   height: 221px;
   background: #ffffff;
   border: 2px solid #d8d8d8;
   position: fixed;
-  top: 44px;
+  //top: 32px;
   left: 84px;
-  margin-top: 19px;
+  //margin-top: 19px;
   overflow: auto;
 
   .table-choose-h {
@@ -2884,6 +2884,17 @@ export default {
 
 .table-show::v-deep .el-table {
   // z-index: 999;
+  display: flex;
+  flex-direction: column;
+  height: 100%;
+
+  .el-table__header-wrapper {
+    flex: none;
+  }
+  .el-table__body-wrapper {
+    flex: auto;
+    min-height: 221px;
+  }
 }
 
 .table-show::v-deep .el-table th {

+ 11 - 11
src/style/media/diagnosis/prescribing.scss

@@ -20,11 +20,11 @@
     ::v-deep {
       #chineseM{
         .table-msg{
-          height: calc(100% - 25px);
-          overflow: auto;
+          //height: calc(100% - 25px);
+          //overflow: auto;
         }
         .table-show {
-          min-height: calc(100% - 80px);
+          //min-height: calc(100% - 80px);
         }
       }
 
@@ -100,8 +100,8 @@
   // 中药
   .prescribing ::v-deep .table-container {
     // height: 659px !important;
-    height: calc(100% - 80px) !important;
-    overflow: auto;
+    //height: calc(100% - 80px) !important;
+    //overflow: auto;
   }
 
    .prescribing ::v-deep .med-accord .table-container{
@@ -131,8 +131,8 @@
   // 中药
   .prescribing ::v-deep .table-container {
     // height: 519px !important;
-     height: calc(100% - 80px) !important;
-    overflow: auto;
+    // height: calc(100% - 80px) !important;
+    //overflow: auto;
   }
 
    .prescribing ::v-deep .med-accord .table-container{
@@ -162,8 +162,8 @@
   // 中药
   .prescribing ::v-deep .table-container {
     // height: 394px !important;
-     height: calc(100% - 80px) !important;
-    overflow: auto;
+    // height: calc(100% - 80px) !important;
+    //overflow: auto;
   }
 
    .prescribing ::v-deep .med-accord .table-container{
@@ -199,8 +199,8 @@
    // 中药
   .prescribing ::v-deep .table-container {
     // height: 394px !important;
-     height: calc(100% - 80px) !important;
-    overflow: auto;
+    // height: calc(100% - 80px) !important;
+    //overflow: auto;
   }
 
   

+ 2 - 1
src/utils/minix/prescribing.js

@@ -113,7 +113,8 @@ export default {
         },
         // 我的协定方转方
         agreeTurnRecipe(agreeInfo) {
-            this.turnRecipe2(agreeInfo)
+            // this.turnRecipe2(agreeInfo)
+            this.transposition({...agreeInfo, medicine: agreeInfo.preStiDetails, __RecipeFrom__: '2'});
 
             if (agreeInfo.diseaseid) {
                 this.$refs.TCM.setParams({

+ 52 - 29
src/views/business/AccordEdit.vue

@@ -1,16 +1,16 @@
 <template>
   <div class="accordEdit">
     <!-- <div class="flex-center back" @click="$router.back()" v-if='showBtn'>返回</div> -->
-    <div>
+    <div class="sticky" v-if="showBtn">
       <el-button size="mini" type="primary" @click="$router.back()" v-if="showBtn">返回</el-button>
       <el-button
         size="mini"
         type="warning"
-        v-if="(type=='edit' &&showBtn) || (type=='add' && showBtn)"
+        v-if="type === 'edit' || type === 'add'"
         @click="save()"
       >保存</el-button>
     </div>
-    <div class="flex-vertical-center-l flex-wrap topForm">
+    <div class="flex-vertical-center-l flex-wrap">
       <div class="item flex-vertical-center-l">
         <span>*</span>
         <div class="name">方名:</div>
@@ -114,6 +114,28 @@
           </el-select>
         </div>
       </div>
+      <div class="item flex-vertical-center-l" v-if="form.doseType=='0'">
+        <span></span>
+        <div class="name">浓煎每次:</div>
+        <div class="input">
+          <el-select
+            size="small"
+            v-model="form.nongjian"
+            placeholder="请选择"
+            :disabled="type=='find'"
+          >
+            <el-option label="50ml" value="50"></el-option>
+            <el-option label="100ml" value="100"></el-option>
+            <el-option label="150ml" value="150"></el-option>
+            <el-option label="200ml" value="200"></el-option>
+            <el-option label="250ml" value="250"></el-option>
+            <el-option label="300ml" value="300"></el-option>
+            <el-option label="400ml" value="400"></el-option>
+            <el-option label="500ml" value="500"></el-option>
+            <el-option label="1000ml" value="1000"></el-option>
+          </el-select>
+        </div>
+      </div>
       <div class="item flex-vertical-center-l" v-if="form.doseType=='1'">
         <span></span>
         <div class="name">每次:</div>
@@ -322,33 +344,33 @@ export default {
         return;
       }
 
-      let tcmdParams = this.$refs.tcmd.getParams();
-      if (tcmdParams.namemedicine == "") {
+      // let tcmdParams = this.$refs.tcmd.getParams();
+      /*if (tcmdParams.namemedicine == "") {
         this.$message({
           type: "error",
           message: "请输入病名",
           showClose: true
         });
         return;
-      }
+      }*/
 
-      if (tcmdParams.syndrometypes == "") {
+      /*if (tcmdParams.syndrometypes == "") {
         this.$message({
           type: "error",
           message: "请输入证型",
           showClose: true
         });
         return;
-      }
+      }*/
 
-      if (tcmdParams.treatment == "") {
+      /*if (tcmdParams.treatment == "") {
         this.$message({
           type: "error",
           message: "请输入治法",
           showClose: true
         });
         return;
-      }
+      }*/
 
       this.addAccordData();
     },
@@ -604,6 +626,7 @@ export default {
         markfree,
         curetype: this.form.doseType,
         density: this.form.nongjian,
+        strongFried: this.form.nongjian, //浓煎
         effect: this.form.efficacy,
         provenance: this.showPurposeType ? this.form.provenance : '0',
         purposeType: this.form.purposeType,
@@ -706,6 +729,25 @@ export default {
 };
 </script>
 <style lang="scss" scoped>
+.accordEdit {
+  display: flex;
+  flex-direction: column;
+  height: 100%;
+  > div { flex: none; }
+  > div.bottom { flex: auto; }
+  
+  .sticky {
+    position: sticky;
+    top: -6px;
+    width: 100%;
+    background-color: #fff;
+    z-index: 11;
+    padding-bottom: 5px;
+    margin-bottom: 5px;
+  }
+}
+</style>
+<style lang="scss" scoped>
 @import "../../style/common.scss";
 
 .accordEdit {
@@ -713,22 +755,6 @@ export default {
   background: #ffffff;
   border-radius: 5px;
   box-sizing: border-box;
-  height: 99%;
-  overflow: auto;
-
-  .back {
-    width: 74px;
-    height: 36px;
-    background: #5386f6;
-    border-radius: 4px;
-    font-size: 14px;
-    font-family: PingFang SC;
-    font-weight: 400;
-    color: #ffffff;
-    margin-bottom: 49px;
-    cursor: pointer;
-  }
-
   .item {
     font-size: 14px;
     font-family: PingFang SC;
@@ -751,8 +777,5 @@ export default {
   .topForm {
     margin-top: 10px;
   }
-
-  .bottom {
-  }
 }
 </style>

+ 37 - 7
src/views/diagnosis/Prescribing.vue

@@ -2466,7 +2466,7 @@ export default {
       }, 1000);
     },
     // 协定方数据转方 赋值给中药处方
-    agreeAssignToTCM(data, loading) {
+    agreeAssignToTCM(data, loading, request = true) {
       let children = this.$children.filter(item => {
         return (
           item.name == "中药处方" ||
@@ -2514,6 +2514,8 @@ export default {
 
       data1.recipe_tabs[data1.recipe_tabs_c].totalTableD = [];
 
+      if (!request) return;
+
       // 赋值给表格
       data.preStiDetails.forEach((item, index) => {
         let obj1 = {
@@ -2788,7 +2790,34 @@ export default {
       this.showRecord = false;
       this.showAgree = false;
     },
-    // 协定方转方
+    transposition(recipe) {
+     const is = recipe.medicine.every(m => m.matid);
+     if (is) {
+       // 调用 方剂 换方
+       const medicine = recipe.medicine.map((m, i) => {
+         return {
+           matid: m.matid,
+           matname: m.ypmc,
+           dose: m.dose,
+           unit: m.dw || m.zxdw || m.bzdw,
+           useage: m.usagestr,
+           seqn: i + 1,
+         }
+       });
+       if (recipe.__RecipeFrom__ === '2') this.agreeAssignToTCM(recipe, void 0, true);
+       this.setDrugsInfo(medicine);
+       this.changeAndJoin(1);
+     } else if (recipe.__RecipeFrom__ === '2') {
+       this.agreeInfo = recipe;
+       this.changeBasisPre(this.agreeInfo.pid);
+     }
+     if (recipe.__RecipeFrom__) this.addRecipeFrom(recipe.__RecipeFrom__ /* 2 协定方*/);
+    },
+
+    /**
+     * 协定方转方
+     * @deprecated
+     */
     turnRecipe2() {
       this.addRecipeFrom("2");
       this.changeBasisPre(this.agreeInfo.pid);
@@ -3387,7 +3416,7 @@ export default {
             this.rDoctorCase.page += 1;
           }
         } else {
-          this.rPrescriprDoctorCasetion.loadMore = false;
+          this.rPrescriprDoctorCasetion = { ...this.rPrescriprDoctorCasetion, loadMore: false, };
         }
       }
     },
@@ -4570,15 +4599,16 @@ export default {
   }
 
   .pre-center {
-    height: 100%;
+    display: flex;
+    flex-direction: column;
     flex: 1;
     padding: 5px 5px;
     background: #fff;
     box-sizing: border-box;
-    overflow: auto;
-    overflow-y: auto;
-    height: 470px;
+    overflow: hidden;
 
+    > div { flex: none; }
+    > div.center-table { flex: auto; }
     .center-tab {
       div {
         cursor: default;

+ 4 - 2
src/views/diagnosis/components/prescription-unify.vue

@@ -208,8 +208,10 @@ export default {
         pid: id
       });
       if (res.ResultCode == 0) {
-        this.$parent.$parent.$parent.agreeInfo = res.Data;
-        this.$parent.$parent.$parent.turnRecipe2(res.Data);
+        // this.$parent.$parent.$parent.agreeInfo = res.Data;
+        // this.$parent.$parent.$parent.turnRecipe2(res.Data);
+        const recipe = { ...res.Data, medicine: res.Data.preStiDetails, __RecipeFrom__: '2' }
+        this.$parent.$parent.$parent.transposition(recipe);
         if (res.Data.diseaseid) {
           this.$parent.$parent.$parent.$refs.TCM.setParams({
             namemedicine: res.Data.diseasename,

+ 4 - 2
src/views/diagnosis/components/prescription.vue

@@ -246,8 +246,10 @@ export default {
         pid: id
       });
       if (res.ResultCode == 0) {
-        this.$parent.$parent.$parent.agreeInfo = res.Data;
-        this.$parent.$parent.$parent.turnRecipe2(res.Data);
+        // this.$parent.$parent.$parent.agreeInfo = res.Data;
+        // this.$parent.$parent.$parent.turnRecipe2(res.Data);
+        const recipe = { ...res.Data, medicine: res.Data.preStiDetails, __RecipeFrom__: '2' }
+        this.$parent.$parent.$parent.transposition(recipe);
         if (res.Data.diseaseid) {
           this.$parent.$parent.$parent.$refs.TCM.setParams({
             namemedicine: res.Data.diseasename,