index.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. <template>
  2. <!-- header -->
  3. <div class="nav-container page-component">
  4. <!--左侧导航 #start -->
  5. <div class="nav left-nav">
  6. <div class="nav-item ">
  7. <span class="v-link clickable dark" onclick="javascript:window.location='/user'">实名认证 </span>
  8. </div>
  9. <div class="nav-item selected">
  10. <span class="v-link selected dark" onclick="javascript:window.location='/order'"> 挂号订单 </span>
  11. </div>
  12. <div class="nav-item ">
  13. <span class="v-link clickable dark" onclick="javascript:window.location='/patient'"> 就诊人管理 </span>
  14. </div>
  15. <div class="nav-item ">
  16. <span class="v-link clickable dark"> 修改账号信息 </span>
  17. </div>
  18. <div class="nav-item ">
  19. <span class="v-link clickable dark"> 意见反馈 </span>
  20. </div>
  21. </div>
  22. <!-- 左侧导航 #end -->
  23. <!-- 右侧内容 #start -->
  24. <div class="page-container">
  25. <div class="personal-order">
  26. <div class="title"> 挂号订单</div>
  27. <el-form :inline="true">
  28. <el-form-item label="就诊人:">
  29. <el-select v-model="searchObj.patientId" placeholder="请选择就诊人" class="v-select patient-select">
  30. <el-option
  31. v-for="item in patientList"
  32. :key="item.id"
  33. :label="item.name + '【' + item.certificatesNo + '】'"
  34. :value="item.id">
  35. </el-option>
  36. </el-select>
  37. </el-form-item>
  38. <el-form-item label="订单状态:" style="margin-left: 80px">
  39. <el-select v-model="searchObj.orderStatus" placeholder="全部" class="v-select patient-select" style="width: 200px;">
  40. <el-option
  41. v-for="item in statusList"
  42. :key="item.status"
  43. :label="item.comment"
  44. :value="item.status">
  45. </el-option>
  46. </el-select>
  47. </el-form-item>
  48. <el-form-item>
  49. <el-button type="text" class="search-button v-link highlight clickable selected" @click="fetchData()">
  50. 查询
  51. </el-button>
  52. </el-form-item>
  53. </el-form>
  54. <div class="table-wrapper table">
  55. <el-table
  56. :data="list"
  57. stripe
  58. style="width: 100%">
  59. <el-table-column
  60. label="就诊时间"
  61. width="120">
  62. <template slot-scope="scope">
  63. {{ scope.row.reserveDate }} {{ scope.row.reserveTime === 0 ? '上午' : '下午' }}
  64. </template>
  65. </el-table-column>
  66. <el-table-column
  67. prop="hosname"
  68. label="医院"
  69. width="100">
  70. </el-table-column>
  71. <el-table-column
  72. prop="depname"
  73. label="科室">
  74. </el-table-column>
  75. <el-table-column
  76. prop="title"
  77. label="医生">
  78. </el-table-column>
  79. <el-table-column
  80. prop="amount"
  81. label="医事服务费">
  82. </el-table-column>
  83. <el-table-column
  84. prop="patientName"
  85. label="就诊人">
  86. </el-table-column>
  87. <el-table-column
  88. prop="param.orderStatusString"
  89. label="订单状态">
  90. </el-table-column>
  91. <el-table-column label="操作">
  92. <template slot-scope="scope">
  93. <el-button type="text" class="v-link highlight clickable selected" @click="show(scope.row.id)">详情</el-button>
  94. </template>
  95. </el-table-column>
  96. </el-table>
  97. </div>
  98. <!-- 分页 -->
  99. <el-pagination
  100. class="pagination"
  101. layout="prev, pager, next"
  102. :current-page="page"
  103. :total="total"
  104. :page-size="limit"
  105. @current-change="fetchData">
  106. </el-pagination>
  107. </div>
  108. </div>
  109. <!-- 右侧内容 #end -->
  110. </div>
  111. <!-- footer -->
  112. </template>
  113. <script>
  114. import '~/assets/css/hospital_personal.css'
  115. import '~/assets/css/hospital.css'
  116. import orderInfoApi from '@/api/order/orderInfo'
  117. import patientApi from '@/api/user/patient'
  118. export default {
  119. data() {
  120. return {
  121. list: [], // banner列表
  122. total: 0, // 数据库中的总记录数
  123. page: 1, // 默认页码
  124. limit: 10, // 每页记录数
  125. searchObj: {}, // 查询表单对象
  126. patientList: [],
  127. statusList: []
  128. }
  129. },
  130. created() {
  131. this.orderId = this.$route.query.orderId
  132. this.fetchData()
  133. this.findPatientList()
  134. this.getStatusList()
  135. },
  136. methods: {
  137. fetchData(page = 1) {
  138. this.page = page
  139. orderInfoApi.getPageList(this.page, this.limit, this.searchObj).then(response => {
  140. console.log(response.data);
  141. this.list = response.data.records
  142. this.total = response.data.total
  143. })
  144. },
  145. findPatientList() {
  146. patientApi.findList().then(response => {
  147. this.patientList = response.data
  148. })
  149. },
  150. getStatusList() {
  151. orderInfoApi.getStatusList().then(response => {
  152. this.statusList = response.data
  153. })
  154. },
  155. changeSize(size) {
  156. console.log(size)
  157. this.limit = size
  158. this.fetchData(1)
  159. },
  160. show(id) {
  161. window.location.href = '/order/show?orderId=' + id
  162. }
  163. }
  164. }
  165. </script>