JianChaJianYanTable.vue 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  1. <script setup name='JianChaJianYanTable'>
  2. import {yzHeaderSize} from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
  3. import {getWindowSize} from "@/utils/window-size";
  4. import {huoQuZhiXinKeShi} from "@/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru";
  5. import XcComboGrid from "@/components/xiao-chan/combo-grid/XcComboGrid.vue";
  6. import {
  7. biaoBenApi,
  8. diagnosisInOurHospital,
  9. viewInspectionItemDetails
  10. } from "@/api/zhu-yuan-yi-sheng/jian-yan-jian-cha-shen-qing";
  11. import XcSelectV3 from "@/components/xiao-chan/select-v3/XcSelectV3.vue";
  12. import {computed} from "vue";
  13. import store from "@/store";
  14. const {data, isCheck, publicData} = defineProps({
  15. data: {
  16. type: Array,
  17. default: []
  18. },
  19. isCheck: {
  20. type: Boolean,
  21. default: false
  22. },
  23. publicData: {
  24. type: Object,
  25. default: {}
  26. }
  27. })
  28. const emits = defineEmits(['delClick'])
  29. const deleteInspectionCheck = (index, code) => {
  30. delete feeListMap.value[code]
  31. emits('delClick', index)
  32. }
  33. /* 获取执行科室 */
  34. const zhiXingKeShiData = ref([])
  35. const metZhiXingKeShi = (val) => {
  36. huoQuZhiXinKeShi(val).then((res) => {
  37. zhiXingKeShiData.value = res
  38. })
  39. }
  40. // 标本
  41. const biaoBenShuJu = ref([])
  42. const biaoBenSouSuo = (val) => {
  43. biaoBenApi(val).then((res) => {
  44. biaoBenShuJu.value = res
  45. })
  46. }
  47. // 临床诊断
  48. const linChuangZhenDuanShuJu = ref([])
  49. const linChuangZhenDuanSuoSou = (val) => {
  50. diagnosisInOurHospital(val).then((res) => {
  51. linChuangZhenDuanShuJu.value = res
  52. })
  53. }
  54. const divRef = ref(null)
  55. const tableHeight = computed(() => {
  56. if (divRef.value != null) {
  57. return getWindowSize.value.h - (yzHeaderSize.value + 75) - divRef?.value.clientHeight;
  58. }
  59. return getWindowSize.value.h - (yzHeaderSize.value + 75)
  60. })
  61. const PATHOLOGY = '038'
  62. const needPublicData = computed(() => {
  63. if (isCheck) {
  64. return true
  65. } else {
  66. for (let i = 0; i < data.length; i++) {
  67. let item = data[i];
  68. if (item.classes === PATHOLOGY) {
  69. return true
  70. }
  71. }
  72. }
  73. })
  74. const enterPadding = (val) => {
  75. data.forEach(item => {
  76. if (item.classes !== PATHOLOGY) {
  77. item.reqComment = val
  78. }
  79. })
  80. }
  81. const feeListMap = ref({})
  82. const getFeeList = (row) => {
  83. if (feeListMap.value[row.orderCode]) {
  84. return
  85. }
  86. viewInspectionItemDetails(row.orderCode).then((res) => {
  87. feeListMap.value[row.orderCode] = res
  88. })
  89. }
  90. const userInfo = computed(() => {
  91. return store.getters['user/info']
  92. })
  93. const showStartTime = () => {
  94. return userInfo.value.deptCode === '1160000' || userInfo.value.deptCode === '3100000'
  95. }
  96. onMounted(() => {
  97. watch(() => data.length, () => {
  98. if (data.length === 0) {
  99. feeListMap.value = {}
  100. }
  101. })
  102. })
  103. </script>
  104. <template>
  105. <div ref="divRef">
  106. <el-row :gutter="5" v-show="needPublicData">
  107. <el-col :span="12">
  108. 病史摘要:
  109. <el-input v-model="publicData.reqComment"
  110. :rows="2" maxlength="125"
  111. show-word-limit
  112. type="textarea"/>
  113. </el-col>
  114. <el-col :span="12">
  115. 体征信息:
  116. <el-input v-model="publicData.reqTzComment"
  117. :rows="2" maxlength="125"
  118. show-word-limit
  119. type="textarea"/>
  120. </el-col>
  121. <el-col :span="12">
  122. 相关辅检结果:
  123. <el-input v-model="publicData.reqOtherResult"
  124. :rows="2"
  125. maxlength="125"
  126. show-word-limit
  127. type="textarea"/>
  128. </el-col>
  129. <el-col :span="12">
  130. 临床诊断:
  131. <br>
  132. <xc-select-v3
  133. v-model="publicData"
  134. :data="linChuangZhenDuanShuJu"
  135. :remote-method="linChuangZhenDuanSuoSou"
  136. code="diagCode"
  137. name="diagText"/>
  138. </el-col>
  139. </el-row>
  140. </div>
  141. <el-table :data="data"
  142. :height="tableHeight">
  143. <el-table-column label="操作" width="120" fixed="left">
  144. <template #default="scope">
  145. <el-button-group>
  146. <el-button icon="Delete" type="danger"
  147. @click="deleteInspectionCheck(scope.$index, scope.row.orderCode)"></el-button>
  148. <el-popover :width="500"
  149. trigger="click"
  150. placement="right"
  151. title="费用详情">
  152. <template #reference>
  153. <el-button @click="getFeeList(scope.row)">
  154. 明细
  155. </el-button>
  156. </template>
  157. <el-table :data="feeListMap[scope.row.orderCode]">
  158. <el-table-column property="orderCode" label="检查编码"/>
  159. <el-table-column property="occCode" label="收费编码"/>
  160. <el-table-column property="name" label="名字"/>
  161. <el-table-column property="amount" label="数量"/>
  162. <el-table-column property="chargeAmount" label="金额"/>
  163. <el-table-column property="unitPrice" label="单价"/>
  164. </el-table>
  165. </el-popover>
  166. </el-button-group>
  167. </template>
  168. </el-table-column>
  169. <el-table-column label="医嘱时间" prop="startTime" width="180" v-if="showStartTime()">
  170. <template #default="scope">
  171. <el-date-picker
  172. style="width: 150px;"
  173. type="datetime"
  174. v-model="scope.row.startTime"
  175. value-format="YYYY-MM-DD HH:mm:ss"
  176. />
  177. </template>
  178. </el-table-column>
  179. <el-table-column label="项目名称"
  180. prop="orderName"
  181. show-overflow-tooltip>
  182. </el-table-column>
  183. <el-table-column label="执行科室" prop="execDeptName" width="100">
  184. <template #default="scope">
  185. <xc-combo-grid
  186. v-model="scope.row"
  187. code="execDept"
  188. name="execDeptName"
  189. :query-data-func="metZhiXingKeShi"
  190. :data="zhiXingKeShiData"/>
  191. </template>
  192. </el-table-column>
  193. <el-table-column label="标本"
  194. v-if="!isCheck"
  195. prop="inspectStuffName" width="80">
  196. <template #default="scope">
  197. <xc-combo-grid
  198. v-model="scope.row"
  199. :data="biaoBenShuJu"
  200. :query-data-func="biaoBenSouSuo"
  201. code="inspectStuff"
  202. name="inspectStuffName"
  203. />
  204. </template>
  205. </el-table-column>
  206. <el-table-column label="申请说明"
  207. width="220px"
  208. v-if="!isCheck">
  209. <template #default="scope">
  210. <el-input v-model="scope.row.reqComment"
  211. @keydown.enter.prevent="enterPadding(scope.row.reqComment)"
  212. :disabled="scope.row.classes === PATHOLOGY"
  213. maxlength="125"/>
  214. </template>
  215. </el-table-column>
  216. <el-table-column label="急诊" width="90">
  217. <template #default="scope">
  218. <el-switch
  219. v-model="scope.row.jzFlag"
  220. :active-value="1"
  221. :inactive-value="0"
  222. active-color="#13ce66"
  223. active-text="是"
  224. inactive-color="#ff4949"
  225. inactive-text="否">
  226. </el-switch>
  227. </template>
  228. </el-table-column>
  229. <el-table-column label="自费" width="90">
  230. <template #default="scope">
  231. <el-switch
  232. v-model="scope.row.ybSelfFlag"
  233. :active-value="1"
  234. :inactive-value="0"
  235. active-color="#13ce66"
  236. active-text="是"
  237. inactive-color="#ff4949"
  238. inactive-text="否">
  239. </el-switch>
  240. </template>
  241. </el-table-column>
  242. </el-table>
  243. </template>
  244. <style scoped lang="scss">
  245. </style>