|
@@ -11,7 +11,7 @@
|
11
|
11
|
<div class="backColor"></div>
|
12
|
12
|
<div class="mainCenter">
|
13
|
13
|
<div class="centerLeft">
|
14
|
|
- <el-form :model="form" :rules="rules" ref="form" label-width="80px">
|
|
14
|
+ <el-form :model="form" ref="form" label-width="80px">
|
15
|
15
|
<el-form-item label="姓名:" prop="name">
|
16
|
16
|
<el-input v-model="patientInfo.name" placeholder=""></el-input>
|
17
|
17
|
</el-form-item>
|
|
@@ -28,7 +28,6 @@
|
28
|
28
|
v-model="state1"
|
29
|
29
|
:fetch-suggestions="querySearch"
|
30
|
30
|
placeholder="请输入内容"
|
31
|
|
- @select="handleSelect"
|
32
|
31
|
></el-autocomplete>
|
33
|
32
|
</el-form-item>
|
34
|
33
|
<el-form-item label="大病类别: " prop="name">
|
|
@@ -105,7 +104,7 @@
|
105
|
104
|
</el-option>
|
106
|
105
|
</el-select>
|
107
|
106
|
</div>
|
108
|
|
- <div style="height:84%;overflow-y: auto;margin-bottom: 60px;">
|
|
107
|
+ <div style="height:84%;overflow-y: auto;margin-bottom: 60px;" v-show="showOne">
|
109
|
108
|
<el-tabs class="rightTabs" v-model="activeName">
|
110
|
109
|
<el-tab-pane label="药品列表" name="1">
|
111
|
110
|
<el-table :data="drugs" border @select='selectDrugs' style="width: 100%;"
|
|
@@ -123,6 +122,7 @@
|
123
|
122
|
<template slot-scope="scope">{{ scope.row.retail_price }}</template>
|
124
|
123
|
</el-table-column>
|
125
|
124
|
</el-table>
|
|
125
|
+
|
126
|
126
|
</el-tab-pane>
|
127
|
127
|
<el-tab-pane label="医嘱模板" name="2">
|
128
|
128
|
<el-table :data="advices_template" border style="width: 100%;" :row-style="{ color: '#303133' }"
|
|
@@ -145,6 +145,40 @@
|
145
|
145
|
</el-tab-pane>
|
146
|
146
|
</el-tabs>
|
147
|
147
|
</div>
|
|
148
|
+
|
|
149
|
+ <div style="height:84%;overflow-y: auto;margin-bottom: 60px;" v-show="showTwo">
|
|
150
|
+ <el-tabs class="rightTabs" v-model="activeName">
|
|
151
|
+ <el-tab-pane label="项目列表" name="1">
|
|
152
|
+ <el-table :data="tabProject" border @select='selectChange' style="width: 100%;"
|
|
153
|
+ :row-style="{ color: '#303133' }"
|
|
154
|
+ :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
|
|
155
|
+ highlight-current-row >
|
|
156
|
+ <el-table-column align="center" type="selection" width="40"></el-table-column>
|
|
157
|
+ <el-table-column align="center" prop="name" label="名称">
|
|
158
|
+ <template slot-scope="scope">{{ scope.row.project_name }}</template>
|
|
159
|
+ </el-table-column>
|
|
160
|
+ <el-table-column align="center" label="规格" width="60">
|
|
161
|
+ <template slot-scope="scope">{{ scope.row.single_dose }}</template>
|
|
162
|
+ </el-table-column>
|
|
163
|
+ <el-table-column align="center" label="单价" width="40">
|
|
164
|
+ <template slot-scope="scope">{{ scope.row.price }}</template>
|
|
165
|
+ </el-table-column>
|
|
166
|
+ </el-table>
|
|
167
|
+ </el-tab-pane>
|
|
168
|
+ <el-tab-pane label="项目组套" name="2">
|
|
169
|
+ <el-table :data="tabPrjectTeam" border style="width: 100%;" :row-style="{ color: '#303133' }"
|
|
170
|
+ :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
|
|
171
|
+ highlight-current-row
|
|
172
|
+ @select='selectTeam'>
|
|
173
|
+ <el-table-column align="center" type="selection" width="40"></el-table-column>
|
|
174
|
+ <el-table-column align="center" prop="name" label="名称">
|
|
175
|
+ <template slot-scope="scope">{{scope.row.project_team}}</template>
|
|
176
|
+ </el-table-column>
|
|
177
|
+ </el-table>
|
|
178
|
+ </el-tab-pane>
|
|
179
|
+ </el-tabs>
|
|
180
|
+ </div>
|
|
181
|
+
|
148
|
182
|
<div class="comfirmBox">
|
149
|
183
|
<div>
|
150
|
184
|
<span>药品类型:</span>
|
|
@@ -154,7 +188,7 @@
|
154
|
188
|
value="0">
|
155
|
189
|
</el-option>
|
156
|
190
|
<el-option
|
157
|
|
- v-for="item,index in getDictionaryDataConfig('system','drug_type')"
|
|
191
|
+ v-for="(item,index) in getDictionaryDataConfig('system','drug_type')"
|
158
|
192
|
:key="index"
|
159
|
193
|
:label="item.name"
|
160
|
194
|
:value="item.id">
|
|
@@ -180,7 +214,7 @@
|
180
|
214
|
import selectTemplate from './selectTemplate'
|
181
|
215
|
import saveTemplate from './saveTemplate'
|
182
|
216
|
import additionalCharges from './additionalCharges'
|
183
|
|
- import { getHisProject,addProjectTeam } from '@/api/project/project'
|
|
217
|
+ import { getHisProject,addProjectTeam,getAllProjectTeam,getPojectListById } from '@/api/project/project'
|
184
|
218
|
// import { getPatientInfo, getSchedulePatientList } from '@/api/his/his'
|
185
|
219
|
|
186
|
220
|
export default {
|
|
@@ -229,7 +263,12 @@
|
229
|
263
|
customTabIndex:1,
|
230
|
264
|
options:[],
|
231
|
265
|
tabProject:[],
|
232
|
|
- strids:""
|
|
266
|
+ strids:"",
|
|
267
|
+ showOne:true,
|
|
268
|
+ showTwo:false,
|
|
269
|
+ tableData:[],
|
|
270
|
+ tabPrjectTeam:[],
|
|
271
|
+ teamList:[],
|
233
|
272
|
}
|
234
|
273
|
},
|
235
|
274
|
methods: {
|
|
@@ -274,6 +313,7 @@
|
274
|
313
|
this.customTabIndex = 1
|
275
|
314
|
}
|
276
|
315
|
if(this.curPrescriptions.advices.length == 0 && this.curPrescriptions.projects.length > 0){
|
|
316
|
+
|
277
|
317
|
this.customTabIndex = 2
|
278
|
318
|
}
|
279
|
319
|
|
|
@@ -349,19 +389,26 @@
|
349
|
389
|
this.$nextTick(() => {
|
350
|
390
|
this.$refs.prescription_tables.setNewData(this.prescriptions[this.prescriptions.length-1])
|
351
|
391
|
});
|
|
392
|
+ this.customTabIndex = 1
|
352
|
393
|
}
|
353
|
394
|
if(index == 2){
|
354
|
395
|
this.showTwo = true
|
355
|
396
|
this.showOne = false
|
|
397
|
+ this.$nextTick(() => {
|
|
398
|
+ this.$refs.prescription_tables.setNewData(this.prescriptions[this.prescriptions.length-1])
|
|
399
|
+ });
|
|
400
|
+ this.customTabIndex = 2
|
356
|
401
|
}
|
357
|
402
|
this.rightTab = index
|
358
|
403
|
|
359
|
404
|
|
360
|
405
|
//用来区分处方属于项目还是药品
|
361
|
406
|
if(this.curPrescriptions.advices.length > 0 && this.curPrescriptions.projects.length == 0){
|
|
407
|
+
|
362
|
408
|
this.customTabIndex = 1
|
363
|
409
|
}
|
364
|
410
|
if(this.curPrescriptions.advices.length == 0 && this.curPrescriptions.projects.length > 0){
|
|
411
|
+
|
365
|
412
|
this.customTabIndex = 2
|
366
|
413
|
}
|
367
|
414
|
if(this.curPrescriptions.advices.length == 0 && this.curPrescriptions.projects.length == 0){
|
|
@@ -381,39 +428,23 @@
|
381
|
428
|
},
|
382
|
429
|
comfirm() {
|
383
|
430
|
this.preDrugs = this.curDrugs
|
384
|
|
- console.log(this.editableTabsValue)
|
|
431
|
+
|
385
|
432
|
for (let i = 0; i < this.prescriptions.length; i++){
|
|
433
|
+ console.log("名称",this.prescriptions[i].name)
|
|
434
|
+ console.log("名称2",this.editableTabsValue)
|
386
|
435
|
if(this.prescriptions[i].name == this.editableTabsValue){
|
387
|
436
|
this.prescriptions[i].advices = this.preDrugs
|
|
437
|
+ this.prescriptions[i].project = this.teamList
|
388
|
438
|
this.curPrescriptions = this.prescriptions[i]
|
389
|
439
|
// this.$refs.prescription_tables.setNewData(this.prescriptions[i])
|
390
|
440
|
}
|
391
|
441
|
}
|
392
|
|
-
|
393
|
|
-
|
394
|
|
- // console.log(this.prescriptions)
|
|
442
|
+ console.log("222222",this.prescriptions)
|
395
|
443
|
},
|
396
|
444
|
selectChange(row){
|
397
|
|
- // console.log("row222",row)
|
398
|
|
- var ids = []
|
399
|
|
- for(let i=0;i<row.length;i++){
|
400
|
|
- ids.push(row[i].id)
|
401
|
|
- }
|
402
|
|
- console.log("ids",ids)
|
403
|
|
- var strids = ids.join(",")
|
404
|
|
- this.strids = strids
|
|
445
|
+ this.teamList = row
|
405
|
446
|
},
|
406
|
|
- addProjectTeam(){
|
407
|
|
- var params = {
|
408
|
|
- strids:this.strids
|
409
|
|
- }
|
410
|
|
- addProjectTeam(params).then(response=>{
|
411
|
|
- if(response.data.state == 1){
|
412
|
|
- var team = response.data.data.team
|
413
|
|
- console.log("team",team)
|
414
|
|
- }
|
415
|
|
- })
|
416
|
|
- }, getlist(){
|
|
447
|
+ getlist(){
|
417
|
448
|
getHisProject().then(response=>{
|
418
|
449
|
if(response.data.state == 1){
|
419
|
450
|
var project = response.data.data.project
|
|
@@ -422,10 +453,66 @@
|
422
|
453
|
}
|
423
|
454
|
})
|
424
|
455
|
},
|
425
|
|
- },created(){
|
|
456
|
+ querySearch(){
|
|
457
|
+
|
|
458
|
+ },
|
|
459
|
+ getAllProjectTeam(){
|
|
460
|
+ getAllProjectTeam().then(response=>{
|
|
461
|
+ if(response.data.state == 1){
|
|
462
|
+ var team = response.data.data.team
|
|
463
|
+ console.log("team",team)
|
|
464
|
+ this.tabPrjectTeam = team
|
|
465
|
+ }
|
|
466
|
+ })
|
|
467
|
+ },
|
|
468
|
+ selectTeam(row){
|
|
469
|
+ var arr = []
|
|
470
|
+ for(let i=0;i<row.length;i++){
|
|
471
|
+ arr.push(row[i].project_id)
|
|
472
|
+ }
|
|
473
|
+ var ids = arr.join(",")
|
|
474
|
+ console.log("ids",ids)
|
|
475
|
+ var strArr = ids.split(",")
|
|
476
|
+ var res = [];//接收不重复的数据
|
|
477
|
+
|
|
478
|
+ for (var i = 0; i<strArr.length; i++){
|
|
479
|
+ var flag = true;
|
|
480
|
+
|
|
481
|
+ for (var j = 0; j<i; j++){
|
|
482
|
+ if(strArr[i]===strArr[j]){
|
|
483
|
+ flag = false;
|
|
484
|
+ break;
|
|
485
|
+ }
|
|
486
|
+ }
|
|
487
|
+ if(flag){
|
|
488
|
+ res.push(strArr[i])
|
|
489
|
+ }
|
|
490
|
+ }
|
|
491
|
+ console.log("res",res)
|
|
492
|
+
|
|
493
|
+ var idstr = res.join(",")
|
|
494
|
+ console.log("idstr",idstr)
|
|
495
|
+ const params = {
|
|
496
|
+ project_id:idstr
|
|
497
|
+ }
|
|
498
|
+ getPojectListById(params).then(response=>{
|
|
499
|
+ if(response.data.state == 1){
|
|
500
|
+ var project = response.data.data.project
|
|
501
|
+ console.log("project222",project)
|
|
502
|
+ this.teamList = []
|
|
503
|
+ this.teamList = project
|
|
504
|
+ }
|
|
505
|
+ })
|
|
506
|
+ }
|
|
507
|
+ },
|
|
508
|
+ created(){
|
426
|
509
|
this.getInitData()
|
427
|
510
|
//获取所有项目
|
428
|
511
|
this.getlist()
|
|
512
|
+ //获取所以项目组套
|
|
513
|
+ this.getAllProjectTeam()
|
|
514
|
+
|
|
515
|
+
|
429
|
516
|
}
|
430
|
517
|
}
|
431
|
518
|
</script>
|