|
@@ -5,54 +5,60 @@
|
5
|
5
|
</div>
|
6
|
6
|
<div class="app-container" style="display:flex;flex: 1;padding: 20px 20px 0px 20px;">
|
7
|
7
|
<div class="mainLeft">
|
8
|
|
- <div class="mainCell" style="justify-content: space-between;">
|
9
|
|
- <p>未就诊:<span>1</span>人</p>
|
10
|
|
- <p>已就诊:<span>0</span>人</p>
|
11
|
|
- </div>
|
12
|
|
- <div class="mainCell">
|
13
|
|
- <el-radio-group v-model="radio" @change="changeRadio">
|
14
|
|
- <el-radio :label=1>未就诊</el-radio>
|
15
|
|
- <el-radio :label=2>已就诊</el-radio>
|
16
|
|
- <el-radio :label=3>全部</el-radio>
|
17
|
|
- </el-radio-group>
|
18
|
|
- </div>
|
|
8
|
+ <!--<div class="mainCell" style="justify-content: space-between;">-->
|
|
9
|
+ <!--<p>未就诊:<span>1</span>人</p>-->
|
|
10
|
+ <!--<p>已就诊:<span>0</span>人</p>-->
|
|
11
|
+ <!--</div>-->
|
|
12
|
+ <!--<div class="mainCell">-->
|
|
13
|
+ <!--<el-radio-group v-model="radio" @change="changeRadio">-->
|
|
14
|
+ <!--<el-radio :label=1>未就诊</el-radio>-->
|
|
15
|
+ <!--<el-radio :label=2>已就诊</el-radio>-->
|
|
16
|
+ <!--<el-radio :label=3>全部</el-radio>-->
|
|
17
|
+ <!--</el-radio-group>-->
|
|
18
|
+ <!--</div>-->
|
19
|
19
|
<div class="mainCell" style="margin-bottom:10px;">
|
20
|
20
|
<el-input size="small" @keyup.enter.native='searchAction' 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
|
|
- <div style="flex:1;overflow-y:auto;">
|
24
|
|
- <el-table :data="tableData" border style="width: 100%;" :row-style="{ color: '#303133' }"
|
25
|
|
- :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
|
26
|
|
- highlight-current-row ref="tab"
|
27
|
|
- @current-change="handleCurrentChange">
|
28
|
|
- <el-table-column align="center" prop="name" label="患者姓名">
|
29
|
|
- <template slot-scope="scope">{{ scope.row.name }}</template>
|
30
|
|
- </el-table-column>
|
31
|
|
- <el-table-column align="center" prop="name" label="就诊号" width="90">
|
32
|
|
- <template slot-scope="scope">3222</template>
|
33
|
|
- </el-table-column>
|
34
|
|
- </el-table>
|
35
|
|
- </div>
|
|
23
|
+ <div style="flex:1;overflow-y:auto;">
|
|
24
|
+ <el-table :data="patientTableData" border style="width: 100%;" :row-style="{ color: '#303133' }"
|
|
25
|
+ :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
|
|
26
|
+ highlight-current-row ref="tab"
|
|
27
|
+ @current-change="handleCurrentChange">
|
|
28
|
+ <el-table-column align="center" prop="name" label="患者姓名">
|
|
29
|
+ <template slot-scope="scope">{{ scope.row.patients.name }}</template>
|
|
30
|
+ </el-table-column>
|
|
31
|
+ <el-table-column align="center" prop="name" label="就诊号" width="90">
|
|
32
|
+ <template slot-scope="scope">{{ scope.row.his_patient.number }}</template>
|
|
33
|
+ </el-table-column>
|
|
34
|
+ </el-table>
|
|
35
|
+ </div>
|
36
|
36
|
</div>
|
37
|
37
|
<div class="mainRight">
|
38
|
|
-
|
39
|
|
- <div class="mainCell" style="position: absolute;right: 30px;z-index:9;">
|
40
|
|
- <el-button size="small" @click="open(1)" type="primary" style="margin-left:10px;">打印处置单</el-button>
|
41
|
|
- <el-button size="small" @click="open(2)" type="primary">打印治疗单</el-button>
|
42
|
|
- <el-button size="small" @click="open(3)" type="primary">打印</el-button>
|
43
|
|
- <el-button size="small" @click="open(4)" type="primary">收费</el-button>
|
44
|
|
- <el-button size="small" v-if="state == '已收费'" @click="open(5)" type="primary">退费</el-button>
|
45
|
|
- </div>
|
|
38
|
+
|
|
39
|
+ <div class="mainCell" style="margin-bottom:10px;flex-direction: row-reverse;">
|
|
40
|
+ <el-button size="small" @click="open(1)" type="primary" style="margin-left:10px;">打印处置单</el-button>
|
|
41
|
+ <el-button size="small" @click="open(2)" type="primary">打印治疗单</el-button>
|
|
42
|
+ <el-button size="small" @click="open(3)" type="primary">打印</el-button>
|
|
43
|
+ <el-button v-loading="loadingone" v-if="hisPatientInfo == null || hisPatientInfo.id == 0 " size="small" @click="open(6)"
|
|
44
|
+ type="primary">挂号
|
|
45
|
+ </el-button>
|
|
46
|
+ <el-button v-loading="loadingtwo" v-if="hisPatientInfo != null && hisPatientInfo.id > 0 " size="small" @click="open(4)"
|
|
47
|
+ type="primary">收费
|
|
48
|
+ </el-button>
|
|
49
|
+ <el-button size="small" @click="open(5)" type="primary">退费</el-button>
|
|
50
|
+ </div>
|
|
51
|
+
|
46
|
52
|
<div class="mainCenter">
|
47
|
53
|
<el-tabs class="settlementTabs" v-model="activeName" @tab-click="handleClick">
|
48
|
54
|
<el-tab-pane label="日结" name="first">
|
49
|
55
|
<div style="display:flex;height:100%;">
|
50
|
56
|
<div class="centerLeft">
|
51
|
57
|
<div class="tabsBox">
|
52
|
|
- <el-button type="text" class="addTab" @click="addCharges" icon="el-icon-circle-plus">附加收费</el-button>
|
53
|
|
- <el-tabs class="preTabs" v-model="editableTabsValue" type="card" closable @tab-remove="removeTab" :before-leave="moreState">
|
|
58
|
+ <!--<el-button type="text" class="addTab" @click="addCharges" icon="el-icon-circle-plus">附加收费</el-button>-->
|
|
59
|
+ <el-tabs class="preTabs" v-model="editableTabsValue" type="card" closable >
|
54
|
60
|
<el-tab-pane
|
55
|
|
- v-for="(item, index) in editableTabs"
|
|
61
|
+ v-for="(item, index) in prescriptions"
|
56
|
62
|
:key="index"
|
57
|
63
|
:label="item.title"
|
58
|
64
|
:name="item.name"
|
|
@@ -65,32 +71,30 @@
|
65
|
71
|
placeholder="选择日期">
|
66
|
72
|
</el-date-picker>
|
67
|
73
|
</div>
|
68
|
|
- <prescription-table :preTableData='preTableData'></prescription-table>
|
69
|
74
|
</el-tab-pane>
|
70
|
|
- <el-tab-pane name="more" closable><span slot="label"><i class="el-icon-plus" @click="addTab"></i></span></el-tab-pane>
|
|
75
|
+ <prescription-table ref="prescription_tables" :prescription="curPrescriptions"></prescription-table>
|
71
|
76
|
</el-tabs>
|
72
|
|
-
|
|
77
|
+
|
73
|
78
|
</div>
|
74
|
79
|
<div class="costBox">
|
75
|
|
- <span>处方编号:2134348971237883</span>
|
76
|
|
- <span>当前处方总费用:<span style="color:red;">{{ total }}元</span></span>
|
77
|
|
- <span>{{ state }}</span>
|
|
80
|
+ <span>当前处方总费用:<span style="color:red;">{{ getTotal() }}元</span></span>
|
|
81
|
+ <span>{{ state }}</span>
|
78
|
82
|
</div>
|
79
|
83
|
</div>
|
80
|
84
|
<div class="centerRight">
|
81
|
85
|
<p class="centerRightTitle">人员信息</p>
|
82
|
86
|
<div style="display:flex;justify-content: space-between;line-height:30px;">
|
83
|
87
|
<span style="font-size:14px;">人员编码:</span>
|
84
|
|
- <span style="font-size:14px;">日期:{{start_time}}</span>
|
|
88
|
+ <span style="font-size:14px;">日期:{{record_date}}</span>
|
85
|
89
|
</div>
|
86
|
90
|
<ul class="basicUl">
|
87
|
|
- <li style="width:50%;">姓名:{{ patientInfo.name }}</li>
|
88
|
|
- <li style="width:50%;">性别:{{ patientInfo && patientInfo.gend == 1 ? '男' : "女" }}</li>
|
89
|
|
- <li style="width:50%;">年龄:{{ patientInfo.age }}</li>
|
90
|
|
- <li style="width:50%;">身高:</li>
|
91
|
|
- <li style="width:50%;">体重:</li>
|
92
|
|
- <li style="width:50%;">电话:</li>
|
93
|
|
- <li style="width:100%;">地址:</li>
|
|
91
|
+ <li style="width:50%;">姓名:{{patientInfo.name}}</li>
|
|
92
|
+ <li style="width:50%;">性别:{{patientInfo.gender == 1 ? '男' : '女' }}</li>
|
|
93
|
+ <li style="width:50%;">年龄:{{patientInfo.age }}</li>
|
|
94
|
+ <li style="width:50%;">身高:{{patientInfo.height}}</li>
|
|
95
|
+ <li style="width:50%;">体重:{{patientInfo.weight}}</li>
|
|
96
|
+ <li style="width:50%;">电话:{{patientInfo.phone}}</li>
|
|
97
|
+ <li style="width:100%;">地址:{{patientInfo.home_address}}</li>
|
94
|
98
|
<li style="width:100%;">过敏史:</li>
|
95
|
99
|
</ul>
|
96
|
100
|
<p class="centerRightTitle">诊断信息</p>
|
|
@@ -112,8 +116,8 @@
|
112
|
116
|
<div style="display:flex;height:100%;">
|
113
|
117
|
<div class="centerLeft">
|
114
|
118
|
<div class="tabsBox">
|
115
|
|
- <el-button type="text" class="addTab" @click="addCharges" icon="el-icon-circle-plus">附加收费</el-button>
|
116
|
|
- <el-tabs class="preTabs" v-model="editableTabsValue" type="card" closable @tab-remove="removeTab" :before-leave="moreState">
|
|
119
|
+ <!--<el-button type="text" class="addTab" @click="addCharges" icon="el-icon-circle-plus">附加收费</el-button>-->
|
|
120
|
+ <el-tabs class="preTabs" v-model="editableTabsValue" type="card" closable>
|
117
|
121
|
<el-tab-pane
|
118
|
122
|
v-for="(item, index) in editableTabs"
|
119
|
123
|
:key="index"
|
|
@@ -129,13 +133,13 @@
|
129
|
133
|
range-separator="至"
|
130
|
134
|
start-placeholder="开始日期"
|
131
|
135
|
end-placeholder="结束日期">
|
132
|
|
- </el-date-picker>
|
|
136
|
+ </el-date-picker>
|
133
|
137
|
</div>
|
134
|
138
|
<prescription-table :preTableData='preTableData'></prescription-table>
|
135
|
139
|
</el-tab-pane>
|
136
|
|
- <el-tab-pane name="more" closable><span slot="label"><i class="el-icon-plus" @click="addTab"></i></span></el-tab-pane>
|
|
140
|
+ <!--<el-tab-pane name="more" closable><span slot="label"><i class="el-icon-plus" @click="addTab"></i></span></el-tab-pane>-->
|
137
|
141
|
</el-tabs>
|
138
|
|
-
|
|
142
|
+
|
139
|
143
|
</div>
|
140
|
144
|
<div class="costBox">
|
141
|
145
|
<span>处方编号:2134348971237883</span>
|
|
@@ -175,12 +179,12 @@
|
175
|
179
|
</div>
|
176
|
180
|
</el-tab-pane>
|
177
|
181
|
</el-tabs>
|
178
|
|
-
|
179
|
|
-
|
|
182
|
+
|
|
183
|
+
|
180
|
184
|
</div>
|
181
|
185
|
</div>
|
182
|
186
|
</div>
|
183
|
|
- <additionalCharges ref='additionalCharges'></additionalCharges>
|
|
187
|
+ <!--<additionalCharges ref='additionalCharges'></additionalCharges>-->
|
184
|
188
|
</div>
|
185
|
189
|
</template>
|
186
|
190
|
|
|
@@ -193,6 +197,8 @@ import medicalInsuranceRefund from './components/medicalInsuranceRefund'
|
193
|
197
|
import prescriptionTable from './components/prescriptionTable'
|
194
|
198
|
import additionalCharges from './components/additionalCharges'
|
195
|
199
|
import { getPatientList,getPatientInformation } from "@/api/project/project"
|
|
200
|
+import { getPatientInfo, getSchedulePatientList, register,upload } from '@/api/his/his'
|
|
201
|
+
|
196
|
202
|
const moment = require('moment')
|
197
|
203
|
export default {
|
198
|
204
|
components:{
|
|
@@ -205,109 +211,170 @@ export default {
|
205
|
211
|
},
|
206
|
212
|
data(){
|
207
|
213
|
return{
|
208
|
|
- crumbs: [
|
209
|
|
- { path: false, name: '门诊收费' },
|
210
|
|
- { path: false, name: '门诊收费管理' }
|
211
|
|
- ],
|
212
|
|
- tableData: [],
|
213
|
|
- activeName:'first',
|
214
|
|
- editableTabsValue: '1',
|
215
|
|
- editableTabs: [{
|
|
214
|
+ crumbs: [
|
|
215
|
+ { path: false, name: '门诊收费' },
|
|
216
|
+ { path: false, name: '门诊收费管理' }
|
|
217
|
+ ],
|
|
218
|
+ activeName:"",
|
|
219
|
+ curPrescriptions: {},
|
|
220
|
+ prescriptions: [],
|
|
221
|
+ record_date: '',
|
|
222
|
+ tableData: [],
|
|
223
|
+ editableTabsValue: '1',
|
|
224
|
+ loadingone:false,
|
|
225
|
+ editableTabs: [{
|
216
|
226
|
title: '处方1',
|
217
|
|
- name: '1',
|
218
|
|
- }],
|
219
|
|
- tabIndex: 1,
|
220
|
|
-
|
221
|
|
- patientTableData:[{
|
222
|
|
- name:'杨美英',
|
223
|
|
- mdtrt_id:"1709946",
|
224
|
|
- }],
|
225
|
|
- patientInfo:{},
|
226
|
|
- doctor:{},
|
227
|
|
- total:0,
|
228
|
|
- state:'未收费',
|
229
|
|
- radio:1,
|
230
|
|
- radioStatus:1,
|
231
|
|
- search_input:"",
|
232
|
|
- start_time:moment().locale('zh-cn').format('YYYY-MM-DD')
|
|
227
|
+ name: '1'
|
|
228
|
+ }],
|
|
229
|
+ tabIndex: 1,
|
|
230
|
+ hisPatientInfo: {},
|
|
231
|
+ loadingtwo:false,
|
|
232
|
+ patientTableData: [{
|
|
233
|
+ name: '杨美英',
|
|
234
|
+ mdtrt_id: '1709946'
|
|
235
|
+ }],
|
|
236
|
+ patientInfo: { id: 0 },
|
|
237
|
+ doctor: {},
|
|
238
|
+ total: 0,
|
|
239
|
+ state: '未收费',
|
|
240
|
+ radio: 1,
|
|
241
|
+ radioStatus: 1,
|
|
242
|
+ search_input: '',
|
|
243
|
+ start_time: moment().locale('zh-cn').format('YYYY-MM-DD')
|
233
|
244
|
}
|
234
|
245
|
},
|
235
|
246
|
created(){
|
236
|
|
-
|
237
|
|
- //获取患者信息
|
238
|
|
- this.getPatientList()
|
|
247
|
+ var nowDate = new Date()
|
|
248
|
+ var nowYear = nowDate.getFullYear()
|
|
249
|
+ var nowMonth = nowDate.getMonth() + 1
|
|
250
|
+ var nowDay = nowDate.getDate()
|
|
251
|
+ this.record_date =
|
|
252
|
+ nowYear +
|
|
253
|
+ '-' +
|
|
254
|
+ (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
|
|
255
|
+ '-' +
|
|
256
|
+ (nowDay < 10 ? '0' + nowDay : nowDay)
|
|
257
|
+
|
|
258
|
+ //获取患者信息
|
|
259
|
+ this.getPatientList()
|
239
|
260
|
},
|
240
|
261
|
methods:{
|
|
262
|
+ handleClick(){
|
|
263
|
+
|
|
264
|
+ },
|
|
265
|
+ searchAction(){
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+ },
|
|
269
|
+ tabclickEvent(val) {
|
|
270
|
+ for (let i = 0; i < this.prescriptions.length; i++) {
|
|
271
|
+ if (this.prescriptions[i].name == val.name) {
|
|
272
|
+ this.curPrescriptions = {}
|
|
273
|
+ var temp = this.deepClone(this.prescriptions[i])
|
|
274
|
+ this.curPrescriptions = temp
|
|
275
|
+ console.log(this.curPrescriptions)
|
|
276
|
+ }
|
|
277
|
+ }
|
|
278
|
+ }, deepClone(source) {
|
|
279
|
+ if (!source && typeof source !== 'object') {
|
|
280
|
+ throw new Error('error arguments', 'shallowClone')
|
|
281
|
+ }
|
|
282
|
+ const targetObj = source.constructor === Array ? [] : {}
|
|
283
|
+ Object.keys(source).forEach((keys) => {
|
|
284
|
+ if (source[keys] && typeof source[keys] === 'object') {
|
|
285
|
+ targetObj[keys] = this.deepClone(source[keys])
|
|
286
|
+ } else {
|
|
287
|
+ targetObj[keys] = source[keys]
|
|
288
|
+ }
|
|
289
|
+ })
|
|
290
|
+ return targetObj
|
|
291
|
+ },
|
|
292
|
+ getTotal() {
|
|
293
|
+ var total = 0
|
|
294
|
+ console.log(this.prescriptions)
|
|
295
|
+ for (let i = 0; i < this.prescriptions.length; i++) {
|
|
296
|
+ if (this.prescriptions[i].advices != null) {
|
|
297
|
+ for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
|
|
298
|
+ total = total + this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number
|
|
299
|
+ }
|
|
300
|
+ }
|
|
301
|
+ if (this.prescriptions[i].project != null) {
|
|
302
|
+ for (let b = 0; b < this.prescriptions[i].project.length; b++) {
|
|
303
|
+ total = total + this.prescriptions[i].project[b].price * this.prescriptions[i].project[b].count
|
|
304
|
+ }
|
|
305
|
+ }
|
|
306
|
+ }
|
|
307
|
+ return total
|
|
308
|
+ },
|
241
|
309
|
moreState(tab, event){
|
242
|
310
|
if(tab == 'more'){
|
243
|
311
|
return false;
|
244
|
312
|
}
|
245
|
313
|
},
|
246
|
|
- open(index){
|
247
|
|
- if(index == 1){
|
248
|
|
- }else if(index == 2){
|
249
|
|
- this.$router.push('/outpatientCharges/print')
|
250
|
|
- }else if(index == 3){
|
251
|
|
- this.$router.push('/outpatientCharges/treatPrint')
|
252
|
|
- }else if(index == 4){
|
253
|
|
- this.state = '已收费'
|
254
|
|
- this.$message({message: '收费成功',type: 'success'});
|
255
|
|
- }else if(index == 5){
|
256
|
|
- this.$message({message: '退费成功',type: 'success'});
|
|
314
|
+ open(index) {
|
|
315
|
+ if (index == 1) {
|
|
316
|
+ } else if (index == 2) {
|
|
317
|
+
|
|
318
|
+ } else if (index == 4) {
|
|
319
|
+
|
|
320
|
+ let params = {
|
|
321
|
+ 'id': this.patientInfo.id,
|
|
322
|
+ 'record_time': this.record_date
|
|
323
|
+ }
|
|
324
|
+ this.loadingtwo = true
|
|
325
|
+ upload(params).then(response => {
|
|
326
|
+ if (response.data.state == 0) {
|
|
327
|
+ this.$message.error(response.data.msg)
|
|
328
|
+ this.loadingtwo = false
|
|
329
|
+
|
|
330
|
+ return false
|
|
331
|
+
|
|
332
|
+ } else {
|
|
333
|
+ this.loadingtwo = false
|
|
334
|
+
|
257
|
335
|
}
|
258
|
|
-
|
259
|
|
- },
|
260
|
|
- addTab(targetName) {
|
261
|
|
- let newTabName = ++this.tabIndex + '';
|
262
|
|
- this.editableTabs.push({
|
263
|
|
- title: '处方' + this.tabIndex,
|
264
|
|
- name: newTabName,
|
265
|
|
- });
|
266
|
|
- this.editableTabsValue = newTabName;
|
267
|
|
- },
|
268
|
|
- removeTab(targetName) {
|
269
|
|
- let tabs = this.editableTabs;
|
270
|
|
- let activeName = this.editableTabsValue;
|
271
|
|
- if (activeName === targetName) {
|
272
|
|
- tabs.forEach((tab, index) => {
|
273
|
|
- if (tab.name === targetName) {
|
274
|
|
- let nextTab = tabs[index + 1] || tabs[index - 1];
|
275
|
|
- if (nextTab) {
|
276
|
|
- activeName = nextTab.name;
|
277
|
|
- }
|
278
|
|
- }
|
279
|
|
- });
|
|
336
|
+ })
|
|
337
|
+
|
|
338
|
+ this.state = '已收费'
|
|
339
|
+ this.$message({ message: '收费成功', type: 'success' })
|
|
340
|
+ } else if (index == 5) {
|
|
341
|
+ this.$message({ message: '退费成功', type: 'success' })
|
|
342
|
+ } else if (index == 6) {
|
|
343
|
+
|
|
344
|
+ if (this.patientInfo.id == 0) {
|
|
345
|
+ this.$message.error('请先选择要挂号的病人')
|
|
346
|
+ return
|
|
347
|
+ }
|
|
348
|
+ let params = {
|
|
349
|
+ 'id': this.patientInfo.id,
|
|
350
|
+ 'record_time': this.record_date
|
|
351
|
+ }
|
|
352
|
+ this.loadingone = true
|
|
353
|
+ register(params).then(response => {
|
|
354
|
+ if (response.data.state == 0) {
|
|
355
|
+ this.$message.error(response.data.msg)
|
|
356
|
+ this.loadingone = false
|
|
357
|
+
|
|
358
|
+ return false
|
|
359
|
+
|
|
360
|
+ } else {
|
|
361
|
+ this.loadingone = false
|
|
362
|
+ var his_info = response.data.data.his_info
|
|
363
|
+ this.hisPatientInfo = his_info
|
280
|
364
|
}
|
281
|
|
-
|
282
|
|
- this.editableTabsValue = activeName;
|
283
|
|
- this.editableTabs = tabs.filter(tab => tab.name !== targetName);
|
284
|
|
- },
|
285
|
|
- addCharges(){
|
286
|
|
- this.$refs.additionalCharges.show()
|
287
|
|
- },
|
|
365
|
+ })
|
|
366
|
+ }
|
|
367
|
+ },
|
|
368
|
+
|
|
369
|
+ // addCharges(){
|
|
370
|
+ // this.$refs.additionalCharges.show()
|
|
371
|
+ // },
|
288
|
372
|
choosePatient(){
|
289
|
|
- let a = JSON.parse(localStorage.getItem("drugs"))
|
290
|
|
- this.preTableData = a
|
291
|
|
- this.preTableData.map(item => {
|
292
|
|
- this.total += item.unitPrice
|
293
|
|
- })
|
294
|
|
- // this.patientInfo = {
|
295
|
|
- // certno:"440221195903290027",
|
296
|
|
- // psn_no:"0221201972",
|
297
|
|
- // gend:"2",
|
298
|
|
- // brdy:"1960-03-29",
|
299
|
|
- // naty:"01",
|
300
|
|
- // psn_cert_type:"01",
|
301
|
|
- // psn_name:"杨美英",
|
302
|
|
- // age:60.7
|
303
|
|
- // }
|
304
|
|
- // this.doctor = {
|
305
|
|
- // name:'刘志刚',
|
306
|
|
- // department:'血透中心',
|
307
|
|
- // total:20,
|
308
|
|
- // }
|
|
373
|
+ console.log(id)
|
|
374
|
+ this.radioStatus = id
|
|
375
|
+ this.getPatientList()
|
309
|
376
|
},
|
310
|
|
- changeRadio(id){
|
|
377
|
+ changeRadio(id){
|
311
|
378
|
console.log(id)
|
312
|
379
|
this.radioStatus = id
|
313
|
380
|
this.getPatientList()
|
|
@@ -315,27 +382,23 @@ export default {
|
315
|
382
|
|
316
|
383
|
//患者列表
|
317
|
384
|
getPatientList(){
|
318
|
|
- getPatientList().then(response=>{
|
319
|
|
- if(response.data.state == 1){
|
320
|
|
- var hisPatient = response.data.data.hisPatient
|
321
|
|
- console.log("his",hisPatient)
|
322
|
|
- var scheduleList = response.data.data.scheduleList
|
323
|
|
- hisPatient.push(...scheduleList)
|
324
|
|
- console.log("arrr",hisPatient)
|
325
|
|
- var tabArr = this.unique(hisPatient)
|
326
|
|
- console.log("22222",tabArr)
|
327
|
|
- if(this.radioStatus == 1){
|
328
|
|
- this.tableData = tabArr
|
329
|
|
- this.$refs.tab.setCurrentRow(this.tableData[0])
|
330
|
|
- }
|
331
|
|
- if(this.radioStatus == 2){
|
332
|
|
- var prescription = response.data.data.prescription
|
333
|
|
- this.tableData = prescription
|
334
|
|
- this.$refs.tab.setCurrentRow(this.tableData[0])
|
335
|
|
- }
|
336
|
|
-
|
337
|
|
- }
|
338
|
|
- })
|
|
385
|
+ let params = {
|
|
386
|
+ 'record_date': this.record_date
|
|
387
|
+ }
|
|
388
|
+ getSchedulePatientList(params).then(response => {
|
|
389
|
+ if (response.data.state == 0) {
|
|
390
|
+ this.$message.error(response.data.msg)
|
|
391
|
+ return false
|
|
392
|
+ } else {
|
|
393
|
+ this.patientTableData = []
|
|
394
|
+ for (let i = 0; i < response.data.data.list.length; i++) {
|
|
395
|
+
|
|
396
|
+ if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
|
|
397
|
+ this.patientTableData.push(response.data.data.list[i])
|
|
398
|
+ }
|
|
399
|
+ }
|
|
400
|
+ }
|
|
401
|
+ })
|
339
|
402
|
},
|
340
|
403
|
|
341
|
404
|
unique(arr) {
|
|
@@ -344,20 +407,40 @@ export default {
|
344
|
407
|
},
|
345
|
408
|
handleCurrentChange(val){
|
346
|
409
|
console.log("val",val)
|
347
|
|
- this.getPatientInformation(val.id)
|
|
410
|
+ this.getPatientInformation(val.patients.id)
|
348
|
411
|
},
|
349
|
|
-
|
|
412
|
+
|
350
|
413
|
//获取患者的基本信息
|
351
|
|
- getPatientInformation(id){
|
352
|
|
- console.log(id)
|
353
|
|
- getPatientInformation(id).then(response=>{
|
354
|
|
- if(response.data.state == 1){
|
355
|
|
- var information = response.data.data.information
|
356
|
|
- console.log("information",information)
|
357
|
|
- this.patientInfo = information
|
358
|
|
- }
|
359
|
|
- })
|
|
414
|
+ getPatientInformation(id) {
|
|
415
|
+ let params = {
|
|
416
|
+ 'record_date': this.record_date,
|
|
417
|
+ 'patient_id': id
|
360
|
418
|
}
|
|
419
|
+ getPatientInfo(params).then(response => {
|
|
420
|
+ if (response.data.state == 0) {
|
|
421
|
+ this.$message.error(response.data.msg)
|
|
422
|
+ return false
|
|
423
|
+ } else {
|
|
424
|
+ this.patientInfo = response.data.data.xt_info
|
|
425
|
+ this.hisPatientInfo = response.data.data.his_info
|
|
426
|
+ this.prescriptions = []
|
|
427
|
+ for (let i = 0; i < response.data.data.prescription.length; i++) {
|
|
428
|
+ var prescription = response.data.data.prescription[i]
|
|
429
|
+ let index = i + 1
|
|
430
|
+ let obj = {
|
|
431
|
+ name: '处方' + index,
|
|
432
|
+ advices: prescription.advices,
|
|
433
|
+ project: prescription.project,
|
|
434
|
+ type: response.data.data.prescription[i].type
|
|
435
|
+ }
|
|
436
|
+ this.prescriptions.push(obj)
|
|
437
|
+ this.curPrescriptions = this.prescriptions[0]
|
|
438
|
+
|
|
439
|
+ }
|
|
440
|
+ // this.$refs.prescriptions.setData(this.prescriptions)
|
|
441
|
+ }
|
|
442
|
+ })
|
|
443
|
+ }
|
361
|
444
|
}
|
362
|
445
|
}
|
363
|
446
|
</script>
|
|
@@ -378,7 +461,7 @@ export default {
|
378
|
461
|
.el-radio{
|
379
|
462
|
margin-right:5px;
|
380
|
463
|
}
|
381
|
|
-
|
|
464
|
+
|
382
|
465
|
}
|
383
|
466
|
.mainCell{
|
384
|
467
|
height:36px;
|