|
@@ -10,20 +10,21 @@
|
10
|
10
|
<p>已就诊:<span>0</span>人</p>
|
11
|
11
|
</div>
|
12
|
12
|
<div class="mainCell">
|
13
|
|
- <el-radio-group v-model="radio">
|
14
|
|
- <el-radio :label="1">未就诊</el-radio>
|
15
|
|
- <el-radio :label="2">已就诊</el-radio>
|
16
|
|
- <el-radio :label="3">全部</el-radio>
|
|
13
|
+ <el-radio-group v-model="radio" @change="chageRadio">
|
|
14
|
+ <el-radio :label=1>未就诊</el-radio>
|
|
15
|
+ <el-radio :label=2>已就诊</el-radio>
|
|
16
|
+ <el-radio :label=3>全部</el-radio>
|
17
|
17
|
</el-radio-group>
|
18
|
18
|
</div>
|
19
|
19
|
<div class="mainCell" style="margin-bottom:10px;">
|
20
|
|
- <el-input size="small" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/>
|
|
20
|
+ <el-input size="small" v-model.trim="search_input" class="filter-item"/>
|
21
|
21
|
<el-button size="small" style="margin-left:10px;" class="filter-item" type="primary" @click="searchAction">搜索</el-button>
|
22
|
22
|
</div>
|
23
|
23
|
<div style="flex:1;overflow-y:auto;">
|
24
|
|
- <el-table :data="tableData" border style="width: 100%;" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
|
|
24
|
+ <el-table :data="tableData" ref="tab" border style="width: 100%;" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
|
|
25
|
+ highlight-current-row @current-change="changePatient">
|
25
|
26
|
<el-table-column align="center" prop="name" label="患者姓名">
|
26
|
|
- <template slot-scope="scope">{{ scope.row.date }}</template>
|
|
27
|
+ <template slot-scope="scope">{{ scope.row.name }}</template>
|
27
|
28
|
</el-table-column>
|
28
|
29
|
<el-table-column align="center" prop="name" label="就诊号" width="90">
|
29
|
30
|
<template slot-scope="scope">{{ scope.row.date }}</template>
|
|
@@ -106,6 +107,7 @@ import charged from './components/charged'
|
106
|
107
|
import medicalInsuranceRefund from './components/medicalInsuranceRefund'
|
107
|
108
|
import prescriptionTable from './components/prescriptionTable'
|
108
|
109
|
import additionalCharges from './components/additionalCharges'
|
|
110
|
+import {getPatientList,getHisPrescription } from "@/api/project/project"
|
109
|
111
|
export default {
|
110
|
112
|
components:{
|
111
|
113
|
BreadCrumb,
|
|
@@ -121,73 +123,18 @@ export default {
|
121
|
123
|
{ path: false, name: '门诊收费' },
|
122
|
124
|
{ path: false, name: '门诊收费管理' }
|
123
|
125
|
],
|
124
|
|
- tableData: [{
|
125
|
|
- date: '2016-05-02',
|
126
|
|
- name: '王小虎',
|
127
|
|
- address: '上海市普陀区金沙江路 1518 弄'
|
128
|
|
- }, {
|
129
|
|
- date: '2016-05-04',
|
130
|
|
- name: '王小虎',
|
131
|
|
- address: '上海市普陀区金沙江路 1517 弄'
|
132
|
|
- }, {
|
133
|
|
- date: '2016-05-01',
|
134
|
|
- name: '王小虎',
|
135
|
|
- address: '上海市普陀区金沙江路 1519 弄'
|
136
|
|
- }, {
|
137
|
|
- date: '2016-05-03',
|
138
|
|
- name: '王小虎',
|
139
|
|
- address: '上海市普陀区金沙江路 1516 弄'
|
140
|
|
- },{
|
141
|
|
- date: '2016-05-02',
|
142
|
|
- name: '王小虎',
|
143
|
|
- address: '上海市普陀区金沙江路 1518 弄'
|
144
|
|
- }, {
|
145
|
|
- date: '2016-05-04',
|
146
|
|
- name: '王小虎',
|
147
|
|
- address: '上海市普陀区金沙江路 1517 弄'
|
148
|
|
- }, {
|
149
|
|
- date: '2016-05-01',
|
150
|
|
- name: '王小虎',
|
151
|
|
- address: '上海市普陀区金沙江路 1519 弄'
|
152
|
|
- }, {
|
153
|
|
- date: '2016-05-03',
|
154
|
|
- name: '王小虎',
|
155
|
|
- address: '上海市普陀区金沙江路 1516 弄'
|
156
|
|
- },{
|
157
|
|
- date: '2016-05-02',
|
158
|
|
- name: '王小虎',
|
159
|
|
- address: '上海市普陀区金沙江路 1518 弄'
|
160
|
|
- }, {
|
161
|
|
- date: '2016-05-04',
|
162
|
|
- name: '王小虎',
|
163
|
|
- address: '上海市普陀区金沙江路 1517 弄'
|
164
|
|
- }, {
|
165
|
|
- date: '2016-05-01',
|
166
|
|
- name: '王小虎',
|
167
|
|
- address: '上海市普陀区金沙江路 1519 弄'
|
168
|
|
- }, {
|
169
|
|
- date: '2016-05-03',
|
170
|
|
- name: '王小虎',
|
171
|
|
- address: '上海市普陀区金沙江路 1516 弄'
|
172
|
|
- }, {
|
173
|
|
- date: '2016-05-04',
|
174
|
|
- name: '王小虎',
|
175
|
|
- address: '上海市普陀区金沙江路 1517 弄'
|
176
|
|
- }, {
|
177
|
|
- date: '2016-05-01',
|
178
|
|
- name: '王小虎',
|
179
|
|
- address: '上海市普陀区金沙江路 1519 弄'
|
180
|
|
- }, {
|
181
|
|
- date: '2016-05-03',
|
182
|
|
- name: '王小虎',
|
183
|
|
- address: '上海市普陀区金沙江路 1516 弄'
|
184
|
|
- }],
|
|
126
|
+ tableData: [],
|
185
|
127
|
editableTabsValue: '1',
|
186
|
128
|
editableTabs: [{
|
187
|
129
|
title: '处方1',
|
188
|
130
|
name: '1',
|
189
|
131
|
}],
|
190
|
132
|
tabIndex: 1,
|
|
133
|
+ radio:1,
|
|
134
|
+ search_input:"",
|
|
135
|
+ radio_status:1,
|
|
136
|
+ patient_id:0
|
|
137
|
+
|
191
|
138
|
}
|
192
|
139
|
},
|
193
|
140
|
methods:{
|
|
@@ -231,8 +178,70 @@ export default {
|
231
|
178
|
this.editableTabs = tabs.filter(tab => tab.name !== targetName);
|
232
|
179
|
},
|
233
|
180
|
addCharges(){
|
234
|
|
- this.$refs.additionalCharges.show()
|
235
|
|
- }
|
|
181
|
+ var patient_id = this.patient_id
|
|
182
|
+ console.log("patient_id",patient_id)
|
|
183
|
+ this.$refs.additionalCharges.show(patient_id)
|
|
184
|
+ },
|
|
185
|
+ chageRadio(id){
|
|
186
|
+ this.radio_status = id
|
|
187
|
+ this.getPatientList()
|
|
188
|
+ },
|
|
189
|
+ getPatientList(){
|
|
190
|
+ getPatientList().then(response=>{
|
|
191
|
+ if(response.data.state == 1){
|
|
192
|
+ var hisPatient = response.data.data.hisPatient
|
|
193
|
+ for(let i=0;i<hisPatient.length;i++){
|
|
194
|
+ hisPatient[i].id_card_no = hisPatient[i].id_number
|
|
195
|
+ }
|
|
196
|
+ var scheduleList = response.data.data.scheduleList
|
|
197
|
+ hisPatient.push(...scheduleList)
|
|
198
|
+ //去除身份相同的患者
|
|
199
|
+ var tabArr = this.unique(hisPatient)
|
|
200
|
+ console.log("222",tabArr)
|
|
201
|
+ this.patient_id = tabArr[0].id
|
|
202
|
+ this.$refs.tab.setCurrentRow(tabArr[0])
|
|
203
|
+ if(this.radio_status == 1){
|
|
204
|
+ this.tableData = []
|
|
205
|
+ this.tableData = tabArr
|
|
206
|
+ }
|
|
207
|
+ var prescription = response.data.data.prescription
|
|
208
|
+ console.log("prescription",prescription)
|
|
209
|
+ if(this.radio_status == 2){
|
|
210
|
+ this.tableData = []
|
|
211
|
+ this.tableData = prescription
|
|
212
|
+ this.patient_id = prescription[0].his_patient_id
|
|
213
|
+ }
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+ }
|
|
217
|
+ })
|
|
218
|
+ },
|
|
219
|
+ searchAction(){
|
|
220
|
+
|
|
221
|
+ },
|
|
222
|
+ unique(arr) {
|
|
223
|
+ console.log("arr22222",arr)
|
|
224
|
+ const res = new Map();
|
|
225
|
+ return arr.filter((arr) => !res.has(arr.id_card_no) && res.set(arr.id_card_no, 1))
|
|
226
|
+ },
|
|
227
|
+ changePatient(val){
|
|
228
|
+ this.currentRow = val
|
|
229
|
+ this.patient_id = val.id
|
|
230
|
+ this.getHisPrescription(val.id)
|
|
231
|
+ },
|
|
232
|
+ getHisPrescription(id){
|
|
233
|
+ getHisPrescription(id).then(response=>{
|
|
234
|
+ if(response.data.state == 1){
|
|
235
|
+ var prescription = response.data.data.prescriptionList
|
|
236
|
+ console.log("prescription",prescription)
|
|
237
|
+ }
|
|
238
|
+ })
|
|
239
|
+ }
|
|
240
|
+ },
|
|
241
|
+ created(){
|
|
242
|
+ //统计患者列表
|
|
243
|
+ this.getPatientList()
|
|
244
|
+
|
236
|
245
|
}
|
237
|
246
|
}
|
238
|
247
|
</script>
|