|
@@ -101,7 +101,7 @@
|
101
|
101
|
<el-button size="small" ref="button_three" @click="open_two()" type="primary">处方调用</el-button>
|
102
|
102
|
<el-button size="small" @click="open_three()" type="primary">存模板</el-button>
|
103
|
103
|
|
104
|
|
- <el-popover
|
|
104
|
+ <!-- <el-popover
|
105
|
105
|
placement="bottom"
|
106
|
106
|
width="300"
|
107
|
107
|
trigger="click">
|
|
@@ -111,8 +111,10 @@
|
111
|
111
|
<el-button slot="reference" style="margin:0 10px;" type="primary" size="small">打印
|
112
|
112
|
</el-button>
|
113
|
113
|
|
114
|
|
- </el-popover>
|
115
|
|
- <!--<el-button size="small" ref="button_four" @click="open(5)" type="primary" :disabled='prescriptions && prescriptions[0].advices && prescriptions[0].project ? prescriptions[0].advices.length == 0 && prescriptions[0].project.length == 0 : false'>存模板</el-button> -->
|
|
114
|
+ </el-popover> -->
|
|
115
|
+ <el-button size="small" @click="openPrint" type="primary">打印</el-button>
|
|
116
|
+
|
|
117
|
+ <!-- <el-button size="small" ref="button_four" @click="open(5)" type="primary" :disabled='prescriptions && prescriptions[0].advices && prescriptions[0].project ? prescriptions[0].advices.length == 0 && prescriptions[0].project.length == 0 : false'>存模板</el-button> -->
|
116
|
118
|
</div>
|
117
|
119
|
<div class="mainCell fixedCell" style="float:right" v-if="titleType == '电子病历'">
|
118
|
120
|
<el-button size="small" @click="opentwo(1)" type="primary">保存</el-button>
|
|
@@ -146,17 +148,18 @@
|
146
|
148
|
</div>
|
147
|
149
|
|
148
|
150
|
<el-dialog
|
149
|
|
- title="处方打印"
|
|
151
|
+ title="打印"
|
150
|
152
|
:visible.sync="centerDialogVisible"
|
151
|
153
|
width="600px"
|
152
|
154
|
center>
|
153
|
|
- <el-table
|
|
155
|
+ <div style="text-align:center;margin-top:10px;font-weight:bold;font-size:20px;">处方笺打印</div>
|
|
156
|
+ <el-table
|
154
|
157
|
ref="multipleTable"
|
155
|
|
- :data="tableData"
|
|
158
|
+ :data="tableData1"
|
156
|
159
|
tooltip-effect="dark"
|
157
|
160
|
style="width: 600px"
|
158
|
161
|
|
159
|
|
- @selection-change="handleSelectionChange">
|
|
162
|
+ @selection-change="handleSelectionChange1">
|
160
|
163
|
<el-table-column
|
161
|
164
|
align='center'
|
162
|
165
|
type="selection"
|
|
@@ -172,9 +175,67 @@
|
172
|
175
|
</el-table-column>
|
173
|
176
|
<el-table-column label="处方号">
|
174
|
177
|
<template slot-scope="scope">
|
175
|
|
- <span>
|
176
|
|
- <el-input v-model="scope.row.prescription_number" :disabled="true"></el-input>
|
177
|
|
- </span>
|
|
178
|
+ <span>
|
|
179
|
+ <el-input v-model="scope.row.prescription_number" :disabled="true"></el-input>
|
|
180
|
+ </span>
|
|
181
|
+ </template>
|
|
182
|
+ </el-table-column>
|
|
183
|
+ </el-table>
|
|
184
|
+ <div style="text-align:center;margin-top:10px;font-weight:bold;font-size:20px;">治疗单打印</div>
|
|
185
|
+ <el-table
|
|
186
|
+ ref="multipleTable"
|
|
187
|
+ :data="tableData2"
|
|
188
|
+ tooltip-effect="dark"
|
|
189
|
+ style="width: 600px"
|
|
190
|
+
|
|
191
|
+ @selection-change="handleSelectionChange2">
|
|
192
|
+ <el-table-column
|
|
193
|
+ align='center'
|
|
194
|
+ type="selection"
|
|
195
|
+ width="50">
|
|
196
|
+ </el-table-column>
|
|
197
|
+ <el-table-column
|
|
198
|
+ align='center'
|
|
199
|
+ label="治疗单编号"
|
|
200
|
+ width="120">
|
|
201
|
+ <template slot-scope="scope">
|
|
202
|
+ <span>治疗 {{scope.$index + 1}}</span>
|
|
203
|
+ </template>
|
|
204
|
+ </el-table-column>
|
|
205
|
+ <el-table-column label="治疗单号">
|
|
206
|
+ <template slot-scope="scope">
|
|
207
|
+ <span>
|
|
208
|
+ <el-input v-model="scope.row.prescription_number" :disabled="true"></el-input>
|
|
209
|
+ </span>
|
|
210
|
+ </template>
|
|
211
|
+ </el-table-column>
|
|
212
|
+ </el-table>
|
|
213
|
+ <div style="text-align:center;margin-top:10px;font-weight:bold;font-size:20px;">检验单打印</div>
|
|
214
|
+ <el-table
|
|
215
|
+ ref="multipleTable"
|
|
216
|
+ :data="tableData3"
|
|
217
|
+ tooltip-effect="dark"
|
|
218
|
+ style="width: 600px"
|
|
219
|
+
|
|
220
|
+ @selection-change="handleSelectionChange3">
|
|
221
|
+ <el-table-column
|
|
222
|
+ align='center'
|
|
223
|
+ type="selection"
|
|
224
|
+ width="50">
|
|
225
|
+ </el-table-column>
|
|
226
|
+ <el-table-column
|
|
227
|
+ align='center'
|
|
228
|
+ label="处方编号"
|
|
229
|
+ width="120">
|
|
230
|
+ <template slot-scope="scope">
|
|
231
|
+ <span>检验单1</span>
|
|
232
|
+ </template>
|
|
233
|
+ </el-table-column>
|
|
234
|
+ <el-table-column label="检验单号">
|
|
235
|
+ <template slot-scope="scope">
|
|
236
|
+ <span>
|
|
237
|
+ <el-input v-model="scope.row.prescription_number" :disabled="true"></el-input>
|
|
238
|
+ </span>
|
178
|
239
|
</template>
|
179
|
240
|
</el-table-column>
|
180
|
241
|
</el-table>
|
|
@@ -184,22 +245,22 @@
|
184
|
245
|
title="打印"
|
185
|
246
|
:visible.sync="innerVisible"
|
186
|
247
|
append-to-body>
|
187
|
|
-
|
188
|
|
- <print v-if="index == 2" :paramsObj='paramsObj'></print>
|
189
|
|
- <treatPrint v-if="index == 6" :paramsObj='paramsObj'></treatPrint>
|
|
248
|
+ <print ref="print" v-if="selecting_schs1.length > 0" :paramsObj='paramsObj'></print>
|
|
249
|
+ <treatPrint ref="treatPrint" v-if="selecting_schs2.length > 0" :paramsObj='paramsObj2'></treatPrint>
|
|
250
|
+ <checkPrint ref="checkPrint" v-if="selecting_schs3.length > 0" :paramsObj='paramsObj3'></checkPrint>
|
190
|
251
|
</el-dialog>
|
191
|
252
|
<span slot="footer" class="dialog-footer">
|
192
|
253
|
<el-button @click="centerDialogVisible = false">取 消</el-button>
|
193
|
254
|
<el-button type="primary" @click="savePrint">确 定</el-button>
|
194
|
255
|
</span>
|
195
|
256
|
</el-dialog>
|
196
|
|
- <el-dialog
|
|
257
|
+ <!-- <el-dialog
|
197
|
258
|
class="centerDialog"
|
198
|
259
|
width="600px"
|
199
|
260
|
title="打印"
|
200
|
261
|
:visible.sync="checkVisible">
|
201
|
262
|
<checkPrint v-if="index == 20" :paramsObj='paramsObj'></checkPrint>
|
202
|
|
- </el-dialog>
|
|
263
|
+ </el-dialog> -->
|
203
|
264
|
<el-dialog
|
204
|
265
|
class="centerDialog"
|
205
|
266
|
width="600px"
|
|
@@ -286,13 +347,20 @@
|
286
|
347
|
patientid: 0,
|
287
|
348
|
prescriptionList: [],
|
288
|
349
|
centerDialogVisible: false,
|
289
|
|
- tableData: [],
|
290
|
|
- selecting_schs: [],
|
|
350
|
+ tableData1: [],
|
|
351
|
+ tableData2: [],
|
|
352
|
+ tableData3: [],
|
|
353
|
+ tableData4: [],
|
|
354
|
+ selecting_schs1: [],
|
|
355
|
+ selecting_schs2: [],
|
|
356
|
+ selecting_schs3: [],
|
291
|
357
|
index: 0,
|
292
|
358
|
admin_info: {},
|
293
|
359
|
saveLoading: false,
|
294
|
360
|
innerVisible: false,
|
295
|
361
|
paramsObj: {},
|
|
362
|
+ paramsObj2: {},
|
|
363
|
+ paramsObj3: {},
|
296
|
364
|
recordVisible: false,
|
297
|
365
|
recordObj: {},
|
298
|
366
|
additions: [],
|
|
@@ -310,6 +378,17 @@
|
310
|
378
|
}
|
311
|
379
|
},
|
312
|
380
|
methods: {
|
|
381
|
+ openPrint(){
|
|
382
|
+ // this.centerDialogVisible = true
|
|
383
|
+ this.getPrescriptionList(this.patientInfo.id)
|
|
384
|
+ },
|
|
385
|
+ printThisPage(){
|
|
386
|
+ this.$nextTick(() => {
|
|
387
|
+ this.$refs.print.printThisPage()
|
|
388
|
+ this.$refs.treatPrint.printThisPage()
|
|
389
|
+ this.$refs.checkPrint.printThisPage()
|
|
390
|
+ })
|
|
391
|
+ },
|
313
|
392
|
changeOther(patient_id){
|
314
|
393
|
this.radio = 2;
|
315
|
394
|
let params = {
|
|
@@ -3716,15 +3795,44 @@
|
3716
|
3795
|
if(checkType != 3){
|
3717
|
3796
|
this.centerDialogVisible = true
|
3718
|
3797
|
var list = response.data.data.list
|
3719
|
|
- let arr = []
|
3720
|
|
- for (let i = 0; i < list.length; i++) {
|
3721
|
|
- if(list[i].type == type){
|
|
3798
|
+ let arr1 = []
|
|
3799
|
+ let arr2 = []
|
|
3800
|
+ let arr3 = []
|
|
3801
|
+ let arr4 = []
|
|
3802
|
+ for(var i=list.length-1;i>=0;i--){
|
|
3803
|
+ if(list[i].type == 1){
|
3722
|
3804
|
list[i].prescription_number = list[i].prescription_number + i
|
3723
|
|
- arr.push(list[i])
|
|
3805
|
+ arr1.push(list[i])
|
|
3806
|
+ }
|
|
3807
|
+ if(list[i].type == 2){
|
|
3808
|
+ list[i].prescription_number = list[i].prescription_number + i
|
|
3809
|
+ arr2.push(list[i])
|
|
3810
|
+ arr3.push(list[i])
|
|
3811
|
+ arr4.push(list[i])
|
|
3812
|
+ }
|
|
3813
|
+ if(list[i].type == 2){
|
|
3814
|
+ let count = 0
|
|
3815
|
+ list[i].project.map(item => {
|
|
3816
|
+ if(item.type == 2){
|
|
3817
|
+ if(item.project.cost_classify == 3){
|
|
3818
|
+ count++
|
|
3819
|
+ }
|
|
3820
|
+ }
|
|
3821
|
+ })
|
|
3822
|
+ if(count == list[i].project.length){
|
|
3823
|
+ arr2.map((items,index) => {
|
|
3824
|
+ if(items.id == list[i].id){
|
|
3825
|
+ arr2.splice(index,1);
|
|
3826
|
+ }
|
|
3827
|
+ })
|
|
3828
|
+ }
|
3724
|
3829
|
}
|
3725
|
|
-
|
3726
|
3830
|
}
|
3727
|
|
- this.tableData = arr
|
|
3831
|
+ this.tableData1 = arr1
|
|
3832
|
+ this.tableData2 = arr2
|
|
3833
|
+ this.tableData4 = arr4
|
|
3834
|
+ this.tableData3 = [arr3[0]]
|
|
3835
|
+
|
3728
|
3836
|
}else{
|
3729
|
3837
|
var list = response.data.data.list
|
3730
|
3838
|
let arr = []
|
|
@@ -3744,8 +3852,18 @@
|
3744
|
3852
|
}
|
3745
|
3853
|
})
|
3746
|
3854
|
},
|
3747
|
|
- handleSelectionChange(val) {
|
3748
|
|
- this.selecting_schs = val
|
|
3855
|
+ handleSelectionChange1(val) {
|
|
3856
|
+ this.selecting_schs1 = val
|
|
3857
|
+ },
|
|
3858
|
+ handleSelectionChange2(val) {
|
|
3859
|
+ this.selecting_schs2 = val
|
|
3860
|
+ },
|
|
3861
|
+ handleSelectionChange3(val) {
|
|
3862
|
+ if(val.length == 0){
|
|
3863
|
+ this.selecting_schs3 = []
|
|
3864
|
+ }else{
|
|
3865
|
+ this.selecting_schs3 = this.tableData4
|
|
3866
|
+ }
|
3749
|
3867
|
},
|
3750
|
3868
|
handleClick() {
|
3751
|
3869
|
if(this.titleType == "电子处方"){
|
|
@@ -3775,45 +3893,68 @@
|
3775
|
3893
|
|
3776
|
3894
|
},
|
3777
|
3895
|
savePrint() {
|
3778
|
|
- var arr = [];
|
3779
|
|
- for (let i = 0; i < this.selecting_schs.length; i++) {
|
3780
|
|
- arr.push(this.selecting_schs[i].id)
|
3781
|
|
- }
|
3782
|
|
- var ids = arr.join(',')
|
3783
|
|
- if (this.index == 2) {
|
3784
|
|
- let obj = {
|
|
3896
|
+ //处方
|
|
3897
|
+ var arr1 = [];
|
|
3898
|
+ if(this.selecting_schs1.length > 0){
|
|
3899
|
+ for (let i = 0; i < this.selecting_schs1.length; i++) {
|
|
3900
|
+ arr1.push(this.selecting_schs1[i].id)
|
|
3901
|
+ }
|
|
3902
|
+ var ids1 = arr1.join(',')
|
|
3903
|
+ let obj1 = {
|
3785
|
3904
|
record: this.record_date,
|
3786
|
3905
|
prescription_id: this.prescription_id,
|
3787
|
|
- ids: ids,
|
|
3906
|
+ ids: ids1,
|
3788
|
3907
|
patient_id: this.patientid
|
3789
|
3908
|
};
|
3790
|
|
- this.paramsObj = obj;
|
3791
|
|
- this.innerVisible = true
|
3792
|
|
-
|
3793
|
|
- // this.$router.push("/outpatientDoctorStation/print?record="+this.record_date+"&prescription_id="+this.prescription_id+"&ids="+ids+"&patient_id="+this.patientid)
|
|
3909
|
+ this.paramsObj = obj1;
|
3794
|
3910
|
}
|
3795
|
|
- if (this.index == 6) {
|
3796
|
|
- let obj = {
|
|
3911
|
+
|
|
3912
|
+ //治疗
|
|
3913
|
+ var arr2 = [];
|
|
3914
|
+ if(this.selecting_schs2.length > 0){
|
|
3915
|
+ for (let i = 0; i < this.selecting_schs2.length; i++) {
|
|
3916
|
+ arr2.push(this.selecting_schs2[i].id)
|
|
3917
|
+ }
|
|
3918
|
+ var ids2 = arr2.join(',')
|
|
3919
|
+ let obj2 = {
|
3797
|
3920
|
record: this.record_date,
|
3798
|
3921
|
prescription_id: this.prescription_id,
|
3799
|
|
- ids: ids,
|
|
3922
|
+ ids: ids2,
|
3800
|
3923
|
patient_id: this.patientid
|
3801
|
3924
|
};
|
3802
|
|
- this.paramsObj = obj;
|
3803
|
|
- this.innerVisible = true
|
3804
|
|
- // this.$router.push("/outpatientDoctorStation/treatPrint?record="+this.record_date+"&prescription_id="+this.prescription_id+"&ids="+ids+"&patient_id="+this.patientid)
|
|
3925
|
+ this.paramsObj2 = obj2;
|
3805
|
3926
|
}
|
3806
|
|
- if(this.index == 20){
|
3807
|
|
- console.log('ids',ids)
|
3808
|
|
- let obj = {
|
|
3927
|
+ var arr3 = []
|
|
3928
|
+ if(this.selecting_schs3.length > 0){
|
|
3929
|
+ for (let i = 0; i < this.selecting_schs3.length; i++) {
|
|
3930
|
+ arr3.push(this.selecting_schs3[i].id)
|
|
3931
|
+ }
|
|
3932
|
+ var ids2 = arr3.join(',')
|
|
3933
|
+ let obj3 = {
|
3809
|
3934
|
record: this.record_date,
|
3810
|
3935
|
prescription_id: this.prescription_id,
|
3811
|
|
- ids: ids,
|
|
3936
|
+ ids: ids2,
|
3812
|
3937
|
patient_id: this.patientid
|
3813
|
3938
|
};
|
3814
|
|
- this.paramsObj = obj;
|
3815
|
|
- this.checkVisible = true
|
|
3939
|
+ this.paramsObj3 = obj3;
|
3816
|
3940
|
}
|
|
3941
|
+
|
|
3942
|
+
|
|
3943
|
+
|
|
3944
|
+
|
|
3945
|
+ this.innerVisible = true
|
|
3946
|
+
|
|
3947
|
+ // if(this.index == 20){
|
|
3948
|
+ // console.log('ids',ids)
|
|
3949
|
+ // let obj = {
|
|
3950
|
+ // record: this.record_date,
|
|
3951
|
+ // prescription_id: this.prescription_id,
|
|
3952
|
+ // ids: ids,
|
|
3953
|
+ // patient_id: this.patientid
|
|
3954
|
+ // };
|
|
3955
|
+ // this.paramsObj = obj;
|
|
3956
|
+ // this.checkVisible = true
|
|
3957
|
+ // }
|
3817
|
3958
|
}, getTime(val, temp) {
|
3818
|
3959
|
if (val != 0) {
|
3819
|
3960
|
return uParseTime(val, temp)
|