JianYanShenQing.vue 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. <template>
  2. <el-container>
  3. <el-header style="height: 30px">
  4. 检验名称:
  5. <el-autocomplete
  6. v-model="chaXunJianYanTiaoJian.orderName"
  7. :fetch-suggestions="querySearchAsync"
  8. clearable
  9. style="width: 120px"
  10. @keyup.enter="dianJiChaXunJianYan(0)"
  11. ></el-autocomplete>
  12. 检验时间:
  13. <el-date-picker
  14. v-model="dateRange"
  15. :shortcuts="shortcuts"
  16. clearable
  17. end-placeholder="结束日期"
  18. placeholder="选择日期"
  19. range-separator="至"
  20. size="small"
  21. start-placeholder="开始日期"
  22. style="width: 280px"
  23. type="daterange"
  24. ></el-date-picker>
  25. <el-divider direction="vertical"></el-divider>
  26. <el-button icon="Search" type="primary" @click="dianJiChaXunJianYan(0)">查询</el-button>
  27. <el-button icon="Plus" type="primary" @click="dianJiXinZengJianYan">新增</el-button>
  28. <el-button icon="View" type="primary" @click="dianJiChaKanHuanZheJianYan">查看患者检验</el-button>
  29. </el-header>
  30. <el-main>
  31. <el-table :data="jianYanShuJu" :height="windowSize.h / 1.5">
  32. <el-table-column label="医嘱号" prop="actOrderNo"></el-table-column>
  33. <el-table-column label="项目名称" prop="groupName"></el-table-column>
  34. <el-table-column label="执行科室" prop="execDeptName"></el-table-column>
  35. <el-table-column label="标本" prop="inspectStuffName"></el-table-column>
  36. <el-table-column label="申请备注" prop="reqComment" show-overflow-tooltip></el-table-column>
  37. <el-table-column label="申请时间" prop="reqDate" show-overflow-tooltip></el-table-column>
  38. <el-table-column label="申请科室" prop="reqDeptName"></el-table-column>
  39. <el-table-column label="申请医生" prop="reqDoctorName"></el-table-column>
  40. <el-table-column label="接受" prop="receiveFlagName"></el-table-column>
  41. <el-table-column label="操作" width="250" fixed="right">
  42. <template #default="scope">
  43. <el-popover :width="500"
  44. trigger="click"
  45. placement="left"
  46. title="费用详情">
  47. <template #reference>
  48. <el-button icon="View" type="primary" text @click="viewFeeDetails(scope.row )">查看详情</el-button>
  49. </template>
  50. <el-table :data="feeDetailsData">
  51. <el-table-column property="orderCode" label="检查编码"/>
  52. <el-table-column property="occCode" label="收费编码"/>
  53. <el-table-column property="name" label="名字"/>
  54. <el-table-column property="amount" label="数量"/>
  55. <el-table-column property="chargeAmount" label="金额"/>
  56. <el-table-column property="unitPrice" label="单价"/>
  57. </el-table>
  58. </el-popover>
  59. <el-button icon="Delete" type="danger" text @click="dianJiShanChu(scope.row, scope.$index)">删除</el-button>
  60. </template>
  61. </el-table-column>
  62. </el-table>
  63. <el-pagination
  64. :current-page="chaXunJianYanTiaoJian.currentPage"
  65. :page-size="chaXunJianYanTiaoJian.pageSize"
  66. :page-sizes="[10, 20, 30, 40]"
  67. :total="chaXunJianYanTiaoJian.currentPage"
  68. layout="total, sizes, prev, pager, next, jumper"
  69. @size-change="jianYanTiaoShu"
  70. @current-change="jianYanFenYe"
  71. >
  72. </el-pagination>
  73. </el-main>
  74. </el-container>
  75. </template>
  76. <script name="JianYanShenQing" setup>
  77. import {computed, ref, watch} from 'vue'
  78. import {shortcuts} from '@/data/shortcuts'
  79. import store from '@/store'
  80. import {getDateRangeFormatDate, getFormatDatetime} from '@/utils/date'
  81. import {huanZheXinXi, youWuXuanZheHuanZhe} from '@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng'
  82. import {
  83. huoQuJianYan,
  84. huoQuJianYanJianChaMing,
  85. shanChuJianChaJianYan, viewInspectionItemDetails
  86. } from '@/api/zhu-yuan-yi-sheng/jian-yan-jian-cha-shen-qing'
  87. import router from '@/router'
  88. import {ElMessageBox} from 'element-plus'
  89. import {getServerDateApi} from '@/api/public-api'
  90. const windowSize = computed(() => {
  91. return store.state.app.windowSize
  92. })
  93. const dateRange = ref(null)
  94. const jianYanShuJu = ref([])
  95. const tianJiaJianYan = ref()
  96. const chaXunJianYanTiaoJian = ref({
  97. orderName: '',
  98. startTime: '',
  99. endTime: '',
  100. currentPage: 1,
  101. pageSize: 20,
  102. total: 0,
  103. patNo: '',
  104. times: '',
  105. })
  106. const dianJiChaXunJianYan = (val) => {
  107. chaXunJianYanTiaoJian.value.total = val
  108. let dateS = getDateRangeFormatDate(dateRange.value)
  109. chaXunJianYanTiaoJian.value.startTime = dateS.startTime
  110. chaXunJianYanTiaoJian.value.endTime = dateS.endTime
  111. chaXunJianYanTiaoJian.value.patNo = huanZheXinXi.value.inpatientNo
  112. chaXunJianYanTiaoJian.value.times = huanZheXinXi.value.admissTimes
  113. huoQuJianYan(chaXunJianYanTiaoJian.value).then((res) => {
  114. if (val === 0) {
  115. chaXunJianYanTiaoJian.value.total = res.total
  116. }
  117. jianYanShuJu.value = res.records
  118. })
  119. }
  120. const jianYanTiaoShu = (val) => {
  121. chaXunJianYanTiaoJian.value.currentPage = 1
  122. chaXunJianYanTiaoJian.value.pageSize = val
  123. dianJiChaXunJianYan(0)
  124. }
  125. const jianYanFenYe = (val) => {
  126. chaXunJianYanTiaoJian.value.currentPage = val
  127. dianJiChaXunJianYan(chaXunJianYanTiaoJian.value.total)
  128. }
  129. const querySearchAsync = (val, cb) => {
  130. if (youWuXuanZheHuanZhe()) return
  131. huoQuJianYanJianChaMing(val, huanZheXinXi.value.inpatientNo, huanZheXinXi.value.admissTimes, huanZheXinXi.value.bedNo, '2').then((res) => {
  132. cb(res)
  133. })
  134. }
  135. let feeDetailsData = $ref([])
  136. const viewFeeDetails = ({orderCode}) => {
  137. viewInspectionItemDetails(orderCode).then((res) => {
  138. feeDetailsData = res
  139. })
  140. }
  141. const dianJiShanChu = (row, index) => {
  142. ElMessageBox.confirm(`您确定要删除【${row.orderName}】吗?`, '提示')
  143. .then(() => {
  144. shanChuJianChaJianYan(row.reqNo, row.inpatientNo, row.admissTimes).then((res) => {
  145. jianYanShuJu.value.splice(index, 1)
  146. })
  147. })
  148. .catch(() => {
  149. })
  150. }
  151. const dianJiXinZengJianYan = () => {
  152. router.push({
  153. name: 'xinZengShuJu',
  154. params: {passRule: true, name: '检验'},
  155. query: {path: '/inpatient/zhuYuanYiSheng/jianYanShenQing'},
  156. })
  157. }
  158. const dianJiChaKanHuanZheJianYan = () => {
  159. if (youWuXuanZheHuanZhe()) return
  160. let end = ''
  161. getServerDateApi().then((res) => {
  162. end = getFormatDatetime(res, 'YYYY-MM-DD')
  163. router.push({
  164. name: 'inspectionReportIndex',
  165. params: {
  166. passRule: true,
  167. patNo: huanZheXinXi.value.inpatientNo,
  168. start: huanZheXinXi.value.admissDate,
  169. end: end,
  170. },
  171. })
  172. })
  173. }
  174. watch(
  175. () => huanZheXinXi.value,
  176. () => {
  177. dianJiChaXunJianYan(0)
  178. }
  179. )
  180. </script>
  181. <style scoped></style>