prescriptionTable.vue 6.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. <template>
  2. <div class="prescriptionTable">
  3. <el-table v-if="prescription.type == 1" :data="prescription.advices" border style="width: 99%;"
  4. :row-style="{ color: '#303133' }"
  5. :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
  6. <el-table-column align="center" prop="name" label="名称">
  7. <template slot-scope="scope"><span :title='scope.row.drug_name'>{{ scope.row.drug_name }}</span></template>
  8. </el-table-column>
  9. <el-table-column align="center" prop="name" width="90" label="单次用量">
  10. <template slot-scope="scope">
  11. <div style="display:flex;align-items:center;">
  12. <el-input v-model="scope.row.single_dose" readonly style="width:65%;"></el-input>
  13. <div> {{scope.row.single_dose_unit}}</div>
  14. </div>
  15. </template>
  16. </el-table-column>
  17. <el-table-column align="center" prop="name" width="100" label="用法">
  18. <template slot-scope="scope">
  19. <el-input v-model="scope.row.delivery_way" readonly></el-input>
  20. </template>
  21. </el-table-column>
  22. <el-table-column align="center" prop="name" width="100" label="频率">
  23. <template slot-scope="scope">
  24. <el-input v-model="scope.row.execution_frequency" readonly></el-input>
  25. </template>
  26. </el-table-column>
  27. <el-table-column align="center" prop="name" width="100" label="总量">
  28. <template slot-scope="scope">
  29. <div style="display:flex;align-items:center;">
  30. <el-input v-model="scope.row.prescribing_number" style="width:60%" readonly placeholder=""></el-input>
  31. <div>{{scope.row.prescribing_number_unit}}</div>
  32. </div>
  33. </template>
  34. </el-table-column>
  35. <el-table-column align="center" prop="name" width="60" label="单价">
  36. <template slot-scope="scope">
  37. <el-input v-model="scope.row.retail_price" placeholder="" readonly></el-input>
  38. </template>
  39. </el-table-column>
  40. <el-table-column align="center" prop="name" width="50" label="备注">
  41. <template slot-scope="scope">
  42. <el-input v-model="scope.row.remark" :title="scope.row.remark" placeholder="" readonly></el-input>
  43. </template>
  44. </el-table-column>
  45. </el-table>
  46. <el-table v-if="prescription.type == 2" :data="prescription.project" border style="width: 99%;"
  47. :row-style="{ color: '#303133' }"
  48. :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
  49. <el-table-column align="center" prop="project_name" label="名称">
  50. <template slot-scope="scope">{{ scope.row.project_name }}</template>
  51. </el-table-column>
  52. <el-table-column align="center" prop="statistical_classification" width="100" label="组">
  53. <template slot-scope="scope">
  54. {{getGroup(scope.row.statistical_classification)}}
  55. </template>
  56. </el-table-column>
  57. <el-table-column align="center" prop="single_dose" width="80" label="单次用量">
  58. <template slot-scope="scope">
  59. <el-input v-model="scope.row.single_dose" placeholder="" readonly></el-input>
  60. </template>
  61. </el-table-column>
  62. <el-table-column align="center" prop="delivery_way" width="80" label="用法">
  63. <template slot-scope="scope">
  64. <el-input v-model="scope.row.delivery_way" placeholder="" readonly></el-input>
  65. </template>
  66. </el-table-column>
  67. <el-table-column align="center" prop="execution_frequency" width="80" label="频率">
  68. <template slot-scope="scope">
  69. <el-input v-model="scope.row.execution_frequency" placeholder="" readonly></el-input>
  70. </template>
  71. </el-table-column>
  72. <el-table-column align="center" prop="number_days" width="50" label="天数">
  73. <template slot-scope="scope">
  74. <el-input v-model="scope.row.number_days" placeholder="" readonly></el-input>
  75. </template>
  76. </el-table-column>
  77. <el-table-column align="center" prop="total" width="50" label="总量">
  78. <template slot-scope="scope">
  79. <div style="display:flex;">
  80. <el-input v-model="scope.row.total" placeholder="" readonly></el-input>
  81. </div>
  82. </template>
  83. </el-table-column>
  84. <el-table-column align="center" prop="name" width="50" label="单价">
  85. <template slot-scope="scope">
  86. <el-input v-model="scope.row.price" placeholder="" readonly></el-input>
  87. </template>
  88. </el-table-column>
  89. <el-table-column align="center" prop="name" width="50" label="备注">
  90. <template slot-scope="scope">
  91. <el-input v-model="scope.row.remark" readonly></el-input>
  92. </template>
  93. </el-table-column>
  94. </el-table>
  95. </div>
  96. </template>
  97. <script>
  98. import { getInitData } from '@/api/his/his'
  99. import { getDictionaryDataConfig} from "@/utils/data";
  100. export default {
  101. props: {
  102. prescription: Object
  103. },
  104. data() {
  105. return {
  106. drugways: [],
  107. efs: []
  108. }
  109. }, mounted() {
  110. getInitData().then(response => {
  111. if (response.data.state == 0) {
  112. this.$message.error(response.data.msg)
  113. return false
  114. } else {
  115. this.drugways = response.data.data.drugways
  116. this.efs = response.data.data.efs
  117. }
  118. })
  119. }, methods: {
  120. getGroup(id){
  121. var name = ""
  122. var statistics_category = getDictionaryDataConfig('system','statistics_category')
  123. console.log("2235",statistics_category)
  124. for(let i=0;i<statistics_category.length;i++){
  125. if(id == statistics_category[i].id){
  126. name = statistics_category[i].name
  127. }
  128. }
  129. return name
  130. },
  131. }
  132. }
  133. </script>
  134. <style lang="scss">
  135. .prescriptionTable{
  136. .additionalBox{
  137. margin-top: 20px;
  138. display: flex;
  139. flex-wrap: wrap;
  140. .additionalOne{
  141. margin-right:20px;
  142. margin-bottom:10px;
  143. display: flex;
  144. align-items: center;
  145. >span{
  146. white-space: nowrap;
  147. overflow: hidden;
  148. text-overflow: ellipsis;
  149. width:60px;
  150. display: inline-block;
  151. font-size: 14px;
  152. }
  153. }
  154. .deleteIcon{
  155. color:red;
  156. margin-left:5px;
  157. }
  158. }
  159. .el-table th .cell, .el-table td .cell{
  160. padding: 0 2px;
  161. white-space: pre-line;
  162. }
  163. .el-icon-delete{
  164. color:red;
  165. }
  166. }
  167. </style>