Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

pastInquiries.vue 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  1. <template>
  2. <div class="main-contain">
  3. <div class="position">
  4. <bread-crumb :crumbs='crumbs'></bread-crumb>
  5. </div>
  6. <div class="app-container">
  7. <div class="cell clearfix">
  8. <el-input size="small" style="width:150px;" v-model="keywords"
  9. class="filter-item"/>
  10. <el-button size="small" style="margin:0 10px;" class="filter-item" type="primary" @click="searchAction">搜索
  11. </el-button>
  12. <el-date-picker v-model="record_date" prefix-icon="el-icon-date" @change="handleScheduleDateChange"
  13. :editable="false" :clearable="false" style="width: 196px;margin-right:10px;" type="date"
  14. format="yyyy-MM-dd"
  15. value-format="yyyy-MM-dd"
  16. placeholder="选择日期时间" align="right"></el-date-picker>
  17. <el-button size="small" style="margin:0 10px;" class="filter-item" type="primary" @click="batchPrint(1)">处方筏批量打印</el-button>
  18. <el-button size="small" style="margin:0 10px;" class="filter-item" type="primary" @click="batchPrint(2)">治疗单批量打印</el-button>
  19. <el-button size="small" style="margin:0 10px;" class="filter-item" type="primary" @click="batchPrint(3)">检验单批量打印</el-button>
  20. </div>
  21. <el-table :data="tableData" border ref="table" style="width: 100%;" :row-style="{ color: '#303133' }" @selection-change="handleSelectionChange"
  22. :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
  23. <el-table-column align="center" type="selection" width="55"></el-table-column>
  24. <el-table-column align="center" label="序号" width="60" type="index"></el-table-column>
  25. <el-table-column align="center" prop="name" label="姓名" width="100">
  26. <template slot-scope="scope">{{scope.row.patients?scope.row.patients.name:''}}</template>
  27. </el-table-column>
  28. <el-table-column align="center" prop="name" label="处方日期" width="200">
  29. <template slot-scope="scope"> {{getTimes(scope.row.ctime)}}</template>
  30. </el-table-column>
  31. <!--<el-table-column align="center" prop="name" label="患者类型">-->
  32. <!--<template slot-scope="scope">{{}}</template>-->
  33. <!--</el-table-column>-->
  34. <el-table-column align="center" prop="name" label="处方号">
  35. <template slot-scope="scope">{{scope.row.prescription_number}}</template>
  36. </el-table-column>
  37. <el-table-column align="center" prop="name" label="开立医生">
  38. <template slot-scope="scope">{{scope.row.doctor}}</template>
  39. </el-table-column>
  40. <el-table-column align="center" prop="name" label="诊断">
  41. <template slot-scope="scope">{{getDiagnosis(scope.row.diagnosis)}}</template>
  42. </el-table-column>
  43. <el-table-column align="center" prop="name" label="状态" width="100">
  44. <template slot-scope="scope">
  45. <div v-if="scope.row.id > 0">已就诊</div>
  46. <div v-else>未就诊</div>
  47. </template>
  48. </el-table-column>
  49. <el-table-column align="center" prop="name" label="操作" width="100">
  50. <template slot-scope="scope">
  51. <el-button size="mini" type="primary" @click="handerShowDetail(scope.row)">详情</el-button>
  52. </template>
  53. </el-table-column>
  54. </el-table>
  55. <el-pagination
  56. @size-change="handleSizeChange"
  57. @current-change="handleCurrentChange"
  58. :page-sizes="[10, 50, 100]"
  59. :page-size="10"
  60. background
  61. style="margin-top:20px;float: right"
  62. layout="total, sizes, prev, pager, next, jumper"
  63. :total="total"
  64. >
  65. </el-pagination>
  66. <inquiries-detail ref="inquiriesDetail"></inquiries-detail>
  67. <el-dialog
  68. class="centerDialog"
  69. width="600px"
  70. title="打印"
  71. :visible.sync="innerVisible"
  72. append-to-body>
  73. <template>
  74. <el-button
  75. style="float:right;"
  76. size="small"
  77. icon="el-icon-printer"
  78. @click="printThisPage"
  79. type="primary"
  80. >打印
  81. </el-button>
  82. </template>
  83. <div id='printMain'>
  84. <print ref="print" v-if="printType == 1" :printData='printData'></print>
  85. <treatPrint ref="treatPrint" v-if="printType == 2" :printData='printData'></treatPrint>
  86. <checkPrint ref="checkPrint" v-if="printType == 3" :printData='printData'></checkPrint>
  87. </div>
  88. </el-dialog>
  89. </div>
  90. </div>
  91. </template>
  92. <script>
  93. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  94. import inquiriesDetail from './components/inquiriesDetail'
  95. import { getHisPrescriptionList } from '@/api/his/his'
  96. import { uParseTime } from '@/utils/tools'
  97. import { getInitData, getBatchPrint } from '@/api/his/his'
  98. import print from './batch_print_template/index'
  99. import treatPrint from './batch_print_treatTemplate/index'
  100. import checkPrint from './batch_print_checkTemplate/index'
  101. export default {
  102. components: {
  103. BreadCrumb,
  104. inquiriesDetail,
  105. print,
  106. treatPrint,
  107. checkPrint
  108. },
  109. data() {
  110. return {
  111. keywords:"",
  112. total:0,
  113. record_date:"",
  114. page:1,
  115. limit:10,
  116. crumbs: [
  117. { path: false, name: '门诊医生站' },
  118. { path: false, name: '既往查询' }
  119. ],
  120. tableData: [],
  121. diagnoses:[],
  122. innerVisible: false,
  123. selecting_schs:[],
  124. printData:[],
  125. printType: 0,
  126. org_id:'',
  127. }
  128. },
  129. methods: {
  130. printThisPage() {
  131. if(this.org_id == 10138){
  132. const style =
  133. '@media print {#prescription-print{font-size:14px;border:1px solid white}.prescription-print:last-child {page-break-after: auto;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 10px;}.infoTitle{display: flex;margin-top:10px;}.infoTitle div{width: 200px;}.infoMain{display: flex;flex-wrap: wrap;margin-top:10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:350px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}@media print {html {zoom: 88%;}}#prescription-print{font-size:14px;border:1px solid white}.prescription-print:last-child {page-break-after: auto;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 10px;}.infoTitle{display: flex;margin-top:10px;}.infoTitle div{width: 200px;}.infoMain{display: flex;flex-wrap: wrap;margin-top:10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:350px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}@media print {html {zoom: 87%;}}}'
  134. printJS({
  135. printable: 'printMain',
  136. type: 'html',
  137. style: style,
  138. scanStyles: false
  139. })
  140. }else{
  141. const style =
  142. '@media print {#prescription-print{font-size:14px;border:1px solid white}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 10px;}.infoTitle{display: flex;border-bottom: 2px solid #000;margin-top:10px;line-height: 1px; padding:0 10px;}.infoTitle p{width: 200px;font-size:14px;}.infoMain{display: flex;flex-wrap: wrap;border-bottom: 2px solid #000;padding:0 10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:450px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}@media print {html {zoom: 88%;}}#prescription-print{font-size:14px;border:1px solid white}.prescription-print:last-child {page-break-after: auto;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 10px;}.infoTitle{display: flex;margin-top:10px;}.infoTitle div{width: 200px;}.infoMain{display: flex;flex-wrap: wrap;margin-top:10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:450px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}.NoCell{display: flex;justify-content: space-between;margin-bottom: 10px;}.underLine{display: inline-block;border-bottom: 1px solid #000;text-align: center;line-height: 24px;}.basicCell{display: flex;} .basicCell span{line-height: 24px;margin-bottom: 10px;}}'
  143. printJS({
  144. printable: 'printMain',
  145. type: 'html',
  146. style: style,
  147. scanStyles: false
  148. })
  149. }
  150. this.innerVisible = false
  151. // this.$nextTick(() => {
  152. // this.$refs.print.printThisPage()
  153. // this.$refs.treatPrint.printThisPage()
  154. // this.$refs.checkPrint.printThisPage()
  155. // })
  156. },
  157. searchAction(){
  158. this.page = 1;
  159. this.limit = 10;
  160. this.getHisPrescriptionList()
  161. },
  162. handleScheduleDateChange(){
  163. this.page = 1;
  164. this.limit = 10;
  165. this.getHisPrescriptionList()
  166. },
  167. handleCurrentChange(page) {
  168. this.page = page;
  169. this.getHisPrescriptionList()
  170. },
  171. handleSizeChange(limit) {
  172. this.limit = limit;
  173. this.getHisPrescriptionList()
  174. },
  175. getTimes(time) {
  176. return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");
  177. },
  178. handerShowDetail(row) {
  179. if(row.id == 0){
  180. this.$message.error("未就诊")
  181. return
  182. }
  183. this.$refs.inquiriesDetail.show(row.id)
  184. }, getHisPrescriptionList() {
  185. let params = {
  186. record_date:this.record_date,
  187. page: this.page,
  188. limit: this.limit,
  189. keywords: this.keywords,
  190. }
  191. getHisPrescriptionList(params).then(response => {
  192. if (response.data.state == 0) {
  193. this.$message.error(response.data.msg)
  194. return false
  195. } else {
  196. this.tableData = response.data.data.order
  197. this.total = response.data.data.total
  198. this.$nextTick(() => {
  199. this.$refs.table.doLayout(); //解决表格错位
  200. });
  201. }
  202. })
  203. },
  204. getInitData() {
  205. getInitData().then(response => {
  206. if (response.data.state == 0) {
  207. this.$message.error(response.data.msg)
  208. return false
  209. } else {
  210. this.diagnoses = response.data.data.diagnose
  211. console.log("诊断列表",this.diagnoses)
  212. }
  213. })
  214. },
  215. getDiagnosis(id){
  216. let ids = id.split(",")
  217. var name = ""
  218. for(let i = 0; i < ids.length; i++){
  219. for(let b=0;b<this.diagnoses.length;b++){
  220. if(parseInt(ids[i]) == this.diagnoses[b].id){
  221. if(name.length == 0){
  222. name = this.diagnoses[b].class_name
  223. }else{
  224. name = name +"," + this.diagnoses[b].class_name
  225. }
  226. }
  227. }
  228. }
  229. return name
  230. },
  231. handleSelectionChange(val) {
  232. this.selecting_schs = val;
  233. },
  234. batchPrint(type){
  235. this.printType = type
  236. if (this.selecting_schs.length === 0) {
  237. this.$message.error("请至少选择一条需要打印的内容");
  238. return false;
  239. }
  240. this.innerVisible = true
  241. var sch_ids = [];
  242. for (let index = 0; index < this.selecting_schs.length; index++) {
  243. sch_ids.push(this.selecting_schs[index].patient_id);
  244. }
  245. console.log('sch_ids',sch_ids)
  246. let params = {
  247. record_date: this.record_date,
  248. patient_ids: sch_ids.join(","),
  249. type: type
  250. }
  251. getBatchPrint(params).then(res => {
  252. console.log('res',res)
  253. let printData = res.data.data.patients
  254. this.printData = printData
  255. })
  256. }
  257. }, created() {
  258. var nowDate = new Date()
  259. var nowYear = nowDate.getFullYear()
  260. var nowMonth = nowDate.getMonth() + 1
  261. var nowDay = nowDate.getDate()
  262. this.record_date =
  263. nowYear +
  264. '-' +
  265. (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
  266. '-' +
  267. (nowDay < 10 ? '0' + nowDay : nowDay)
  268. this.org_id = this.$store.getters.xt_user.template_info.org_id
  269. this.getHisPrescriptionList()
  270. this.getInitData()
  271. }
  272. }
  273. </script>