|
@@ -78,6 +78,46 @@
|
78
|
78
|
</div>
|
79
|
79
|
|
80
|
80
|
</div>
|
|
81
|
+
|
|
82
|
+ <el-dialog
|
|
83
|
+ title="处方打印"
|
|
84
|
+ :visible.sync="centerDialogVisible"
|
|
85
|
+ width="600px"
|
|
86
|
+ center>
|
|
87
|
+ <el-table
|
|
88
|
+ ref="multipleTable"
|
|
89
|
+ :data="tableData"
|
|
90
|
+ tooltip-effect="dark"
|
|
91
|
+ style="width: 600px"
|
|
92
|
+
|
|
93
|
+ @selection-change="handleSelectionChange">
|
|
94
|
+ <el-table-column
|
|
95
|
+ type="selection"
|
|
96
|
+ width="50">
|
|
97
|
+ </el-table-column>
|
|
98
|
+ <el-table-column
|
|
99
|
+ label="处方编号"
|
|
100
|
+ width="120">
|
|
101
|
+ <template slot-scope="scope">
|
|
102
|
+ <span>处方编号</span>
|
|
103
|
+ </template>
|
|
104
|
+ </el-table-column>
|
|
105
|
+ <el-table-column
|
|
106
|
+ label="处方号"
|
|
107
|
+ width="200">
|
|
108
|
+ <template slot-scope="scope">
|
|
109
|
+ <span>
|
|
110
|
+ <el-input v-model="scope.row.id"></el-input>
|
|
111
|
+ </span>
|
|
112
|
+ </template>
|
|
113
|
+ </el-table-column>
|
|
114
|
+ </el-table>
|
|
115
|
+ <span slot="footer" class="dialog-footer">
|
|
116
|
+ <el-button @click="centerDialogVisible = false">取 消</el-button>
|
|
117
|
+ <el-button type="primary" @click="savePrint">确 定</el-button>
|
|
118
|
+ </span>
|
|
119
|
+ </el-dialog>
|
|
120
|
+
|
81
|
121
|
</div>
|
82
|
122
|
</template>
|
83
|
123
|
|
|
@@ -90,6 +130,7 @@
|
90
|
130
|
import medicalRecord from './components/medicalRecord'
|
91
|
131
|
import saveRecordTemplate from './components/saveRecordTemplate'
|
92
|
132
|
import { uParseTime } from '@/utils/tools'
|
|
133
|
+ import { getPrescriptionList } from "@/api/project/project"
|
93
|
134
|
export default {
|
94
|
135
|
components: {
|
95
|
136
|
BreadCrumb,
|
|
@@ -131,6 +172,12 @@
|
131
|
172
|
templatedetail:{},
|
132
|
173
|
detalid:0,
|
133
|
174
|
prescription_id:0,
|
|
175
|
+ patientid:0,
|
|
176
|
+ prescriptionList:[],
|
|
177
|
+ centerDialogVisible:false,
|
|
178
|
+ tableData:[],
|
|
179
|
+ selecting_schs: [],
|
|
180
|
+ index:0
|
134
|
181
|
}
|
135
|
182
|
},
|
136
|
183
|
methods: {
|
|
@@ -190,12 +237,16 @@
|
190
|
237
|
this.$refs.tab.setCurrentRow(this.patientTableData[0])
|
191
|
238
|
console.log(this.patientTableData[0])
|
192
|
239
|
this.choosePatient(this.patientTableData[0])
|
|
240
|
+ console.log("9999099999",this.patientTableData[0])
|
|
241
|
+ this.prescriptionList = response.data.data.list.prescription
|
|
242
|
+ this.patientid = this.patientTableData[0].patient_id
|
193
|
243
|
this.cal_one = cal_one
|
194
|
244
|
this.cal_two = cal_two
|
195
|
245
|
}
|
196
|
246
|
})
|
197
|
247
|
},
|
198
|
248
|
choosePatient(val) {
|
|
249
|
+ this.patientid = val.patients.id
|
199
|
250
|
let params = {
|
200
|
251
|
'record_date': this.record_date,
|
201
|
252
|
'patient_id': val.patients.id
|
|
@@ -246,6 +297,7 @@
|
246
|
297
|
} else {
|
247
|
298
|
this.case_history.is_infect = false
|
248
|
299
|
}
|
|
300
|
+ this.prescriptionList =response.data.data.prescription
|
249
|
301
|
if (response.data.data.prescription.length > 0) {
|
250
|
302
|
for (let i = 0; i < response.data.data.prescription.length; i++) {
|
251
|
303
|
var prescription = response.data.data.prescription[i]
|
|
@@ -321,17 +373,24 @@
|
321
|
373
|
})
|
322
|
374
|
},
|
323
|
375
|
open(index) {
|
324
|
|
- console.log("index",index)
|
|
376
|
+ if(this.prescriptionList.length == 0){
|
|
377
|
+ this.$message.error("请先开处方")
|
|
378
|
+ return
|
|
379
|
+ }
|
|
380
|
+ this.index = index
|
325
|
381
|
if (index == 1) {
|
326
|
382
|
this.$refs.prescriptions.open(1)
|
327
|
383
|
} else if (index == 2) {
|
328
|
|
- this.$router.push("/outpatientDoctorStation/print?record="+this.record_date+"&prescription_id="+this.prescription_id)
|
|
384
|
+
|
|
385
|
+ this.getPrescriptionList(this.patientid)
|
|
386
|
+ // this.$router.push("/outpatientDoctorStation/print?record="+this.record_date+"&prescription_id="+this.prescription_id)
|
329
|
387
|
} else if (index == 3) {
|
330
|
388
|
this.$refs.prescriptions.open(3)
|
331
|
389
|
} else if (index == 4) {
|
332
|
390
|
this.$refs.prescriptions.open(4)
|
333
|
391
|
}else if(index == 6){
|
334
|
|
- this.$router.push("/outpatientDoctorStation/treatPrint?record="+this.record_date+"&prescription_id="+this.prescription_id)
|
|
392
|
+ this.getPrescriptionList(this.patientid)
|
|
393
|
+ // this.$router.push("/outpatientDoctorStation/treatPrint?record="+this.record_date+"&prescription_id="+this.prescription_id)
|
335
|
394
|
|
336
|
395
|
}
|
337
|
396
|
|
|
@@ -361,13 +420,13 @@
|
361
|
420
|
// }
|
362
|
421
|
|
363
|
422
|
getMsgFormSon(id){
|
364
|
|
- console.log("id----------",id)
|
|
423
|
+
|
365
|
424
|
this.detalid = id
|
366
|
425
|
},
|
367
|
426
|
changetwo(data){
|
368
|
427
|
console.log("data000000",data)
|
369
|
428
|
this.prescription_id = data
|
370
|
|
- }
|
|
429
|
+ },
|
371
|
430
|
// getTemplateDetail(id){
|
372
|
431
|
// getTemplateDetail(id).then(response=>{
|
373
|
432
|
// if(response.data.state == 1){
|
|
@@ -379,6 +438,38 @@
|
379
|
438
|
// }
|
380
|
439
|
// })
|
381
|
440
|
// },
|
|
441
|
+ getPrescriptionList(id){
|
|
442
|
+ getPrescriptionList(id).then(response=>{
|
|
443
|
+ if(response.data.state == 1){
|
|
444
|
+ this.centerDialogVisible = true
|
|
445
|
+ var list = response.data.data.list
|
|
446
|
+ console.log("list9999999",list)
|
|
447
|
+ this.tableData = list
|
|
448
|
+ }
|
|
449
|
+ })
|
|
450
|
+ },
|
|
451
|
+ handleSelectionChange(val){
|
|
452
|
+ this.selecting_schs = val
|
|
453
|
+ console.log("99999",this.selecting_schs)
|
|
454
|
+ },
|
|
455
|
+ handleClick(){
|
|
456
|
+
|
|
457
|
+ },
|
|
458
|
+ savePrint(){
|
|
459
|
+ var arr = []
|
|
460
|
+ for(let i=0;i<this.selecting_schs.length;i++){
|
|
461
|
+ arr.push(this.selecting_schs[i].id)
|
|
462
|
+ }
|
|
463
|
+ console.log("arr",arr)
|
|
464
|
+ var ids = arr.join(",")
|
|
465
|
+ console.log("ids",ids)
|
|
466
|
+ if(this.index == 2){
|
|
467
|
+ this.$router.push("/outpatientDoctorStation/print?record="+this.record_date+"&prescription_id="+this.prescription_id+"&ids="+ids+"&patient_id="+this.patientid)
|
|
468
|
+ }
|
|
469
|
+ if(this.index == 6){
|
|
470
|
+ this.$router.push("/outpatientDoctorStation/treatPrint?record="+this.record_date+"&prescription_id="+this.prescription_id+"&ids="+ids+"&patient_id="+this.patientid)
|
|
471
|
+ }
|
|
472
|
+ }
|
382
|
473
|
},
|
383
|
474
|
created() {
|
384
|
475
|
var nowDate = new Date()
|
|
@@ -401,6 +492,7 @@
|
401
|
492
|
this.tableHeight = tableHeight
|
402
|
493
|
|
403
|
494
|
},
|
|
495
|
+
|
404
|
496
|
mounted(){
|
405
|
497
|
const that = this
|
406
|
498
|
window.onresize = () => {
|