|
@@ -1,4 +1,5 @@
|
1
|
|
-<template><!--药品发药页面-->
|
|
1
|
+<template>
|
|
2
|
+ <!--药品发药页面-->
|
2
|
3
|
<div class="main-contain new-main-contain">
|
3
|
4
|
<div class="position">
|
4
|
5
|
<!-- <bread-crumb :crumbs='crumbs'></bread-crumb>-->
|
|
@@ -46,7 +47,8 @@
|
46
|
47
|
</el-button>
|
47
|
48
|
</div>
|
48
|
49
|
|
49
|
|
- <el-table v-if="state == 1"
|
|
50
|
+ <el-table
|
|
51
|
+ v-if="state == 1"
|
50
|
52
|
:height="tableHeight"
|
51
|
53
|
:data="waiting_drug"
|
52
|
54
|
border
|
|
@@ -56,18 +58,18 @@
|
56
|
58
|
@current-change="handleCurrentChange"
|
57
|
59
|
>
|
58
|
60
|
<el-table-column prop="name" label="名称" width="100">
|
59
|
|
- <template slot-scope="scope">
|
60
|
|
- {{scope.row.name}}
|
|
61
|
+ <template slot-scope="scope">
|
|
62
|
+ {{ scope.row.name }}
|
61
|
63
|
</template>
|
62
|
64
|
</el-table-column>
|
63
|
65
|
<el-table-column prop="specifications" label="规格" width="100">
|
64
|
66
|
<template slot-scope="scope">
|
65
|
|
- {{scope.row.specifications}}
|
|
67
|
+ {{ scope.row.specifications }}
|
66
|
68
|
</template>
|
67
|
69
|
</el-table-column>
|
68
|
70
|
<el-table-column prop="stock" label="库存" width="100">
|
69
|
|
- <template slot-scope="scope">
|
70
|
|
- {{scope.row.stock}}
|
|
71
|
+ <template slot-scope="scope">
|
|
72
|
+ {{ scope.row.stock }}
|
71
|
73
|
</template>
|
72
|
74
|
</el-table-column>
|
73
|
75
|
</el-table>
|
|
@@ -83,18 +85,18 @@
|
83
|
85
|
ref="table02"
|
84
|
86
|
>
|
85
|
87
|
<el-table-column prop="name" label="名称" width="100">
|
86
|
|
- <template slot-scope="scope">
|
87
|
|
- {{scope.row.name}}
|
|
88
|
+ <template slot-scope="scope">
|
|
89
|
+ {{ scope.row.name }}
|
88
|
90
|
</template>
|
89
|
91
|
</el-table-column>
|
90
|
92
|
<el-table-column prop="specifications" label="规格" width="100">
|
91
|
93
|
<template slot-scope="scope">
|
92
|
|
- {{scope.row.specifications}}
|
|
94
|
+ {{ scope.row.specifications }}
|
93
|
95
|
</template>
|
94
|
96
|
</el-table-column>
|
95
|
97
|
<el-table-column prop="stock" label="库存" width="100">
|
96
|
|
- <template slot-scope="scope">
|
97
|
|
- {{scope.row.stock}}
|
|
98
|
+ <template slot-scope="scope">
|
|
99
|
+ {{ scope.row.stock }}
|
98
|
100
|
</template>
|
99
|
101
|
</el-table-column>
|
100
|
102
|
</el-table>
|
|
@@ -102,11 +104,13 @@
|
102
|
104
|
</div>
|
103
|
105
|
<div class="mainRight">
|
104
|
106
|
<div class="titlelist">
|
105
|
|
-<!-- <el-button type="primary" @click="tt">调试</el-button>-->
|
106
|
|
- <el-button type="primary" @click="dispense" v-if="state == 1">发药</el-button>
|
|
107
|
+ <!-- <el-button type="primary" @click="tt">调试</el-button>-->
|
|
108
|
+ <el-button type="primary" @click="dispense" v-if="state == 1"
|
|
109
|
+ >发药</el-button
|
|
110
|
+ >
|
107
|
111
|
<el-button type="primary" @click="toPrint">打印</el-button>
|
108
|
|
-<!-- <el-button @click="tt">调试</el-button>-->
|
109
|
|
-<!-- <el-button type="primary" @click="toSetting">设置</el-button>-->
|
|
112
|
+ <!-- <el-button @click="tt">调试</el-button>-->
|
|
113
|
+ <!-- <el-button type="primary" @click="toSetting">设置</el-button>-->
|
110
|
114
|
</div>
|
111
|
115
|
<el-divider></el-divider>
|
112
|
116
|
<div>
|
|
@@ -116,45 +120,86 @@
|
116
|
120
|
border
|
117
|
121
|
style="width: 1328px"
|
118
|
122
|
@selection-change="handleSelectionChange"
|
119
|
|
- v-if="state == 1"
|
|
123
|
+ v-if="state == 1"
|
120
|
124
|
>
|
121
|
|
- <el-table-column type="selection" width="55" align="center"> </el-table-column>
|
122
|
|
- <el-table-column type="index" label="序号" width="120" align="center">
|
|
125
|
+ <el-table-column type="selection" width="55" align="center">
|
123
|
126
|
</el-table-column>
|
124
|
|
- <el-table-column prop="name" label="患者名称" width="180" align="center">
|
125
|
|
- <template slot-scope="scope">
|
126
|
|
- {{scope.row.name}}
|
|
127
|
+ <el-table-column
|
|
128
|
+ type="index"
|
|
129
|
+ label="序号"
|
|
130
|
+ width="120"
|
|
131
|
+ align="center"
|
|
132
|
+ >
|
|
133
|
+ </el-table-column>
|
|
134
|
+ <el-table-column
|
|
135
|
+ prop="name"
|
|
136
|
+ label="患者名称"
|
|
137
|
+ width="180"
|
|
138
|
+ align="center"
|
|
139
|
+ >
|
|
140
|
+ <template slot-scope="scope">
|
|
141
|
+ {{ scope.row.name }}
|
127
|
142
|
</template>
|
128
|
143
|
</el-table-column>
|
129
|
|
- <el-table-column prop="name" label="单次用量" width="170" align="center">
|
130
|
|
- <template slot-scope="scope">
|
131
|
|
- {{scope.row.single_dosage}}
|
132
|
|
- </template>
|
|
144
|
+ <el-table-column
|
|
145
|
+ prop="name"
|
|
146
|
+ label="单次用量"
|
|
147
|
+ width="170"
|
|
148
|
+ align="center"
|
|
149
|
+ >
|
|
150
|
+ <template slot-scope="scope">
|
|
151
|
+ {{ scope.row.single_dosage }}
|
|
152
|
+ </template>
|
133
|
153
|
</el-table-column>
|
134
|
|
- <el-table-column prop="name" label="用法" width="160" align="center">
|
135
|
|
- <template slot-scope="scope">
|
136
|
|
- {{scope.row.usage}}
|
137
|
|
- </template>
|
|
154
|
+ <el-table-column
|
|
155
|
+ prop="name"
|
|
156
|
+ label="用法"
|
|
157
|
+ width="160"
|
|
158
|
+ align="center"
|
|
159
|
+ >
|
|
160
|
+ <template slot-scope="scope">
|
|
161
|
+ {{ scope.row.usage }}
|
|
162
|
+ </template>
|
138
|
163
|
</el-table-column>
|
139
|
|
- <el-table-column prop="name" label="频率" width="160" align="center">
|
140
|
|
- <template slot-scope="scope">
|
141
|
|
- {{scope.row.frequency}}
|
142
|
|
- </template>
|
|
164
|
+ <el-table-column
|
|
165
|
+ prop="name"
|
|
166
|
+ label="频率"
|
|
167
|
+ width="160"
|
|
168
|
+ align="center"
|
|
169
|
+ >
|
|
170
|
+ <template slot-scope="scope">
|
|
171
|
+ {{ scope.row.frequency }}
|
|
172
|
+ </template>
|
143
|
173
|
</el-table-column>
|
144
|
|
- <el-table-column prop="name" label="天数" width="160" align="center">
|
145
|
|
- <template slot-scope="scope">
|
146
|
|
- {{scope.row.days}}
|
147
|
|
- </template>
|
|
174
|
+ <el-table-column
|
|
175
|
+ prop="name"
|
|
176
|
+ label="天数"
|
|
177
|
+ width="160"
|
|
178
|
+ align="center"
|
|
179
|
+ >
|
|
180
|
+ <template slot-scope="scope">
|
|
181
|
+ {{ scope.row.days }}
|
|
182
|
+ </template>
|
148
|
183
|
</el-table-column>
|
149
|
|
- <el-table-column prop="name" label="总量" width="160" align="center">
|
150
|
|
- <template slot-scope="scope">
|
151
|
|
- {{scope.row.total}}
|
152
|
|
- </template>
|
|
184
|
+ <el-table-column
|
|
185
|
+ prop="name"
|
|
186
|
+ label="总量"
|
|
187
|
+ width="160"
|
|
188
|
+ align="center"
|
|
189
|
+ >
|
|
190
|
+ <template slot-scope="scope">
|
|
191
|
+ {{ scope.row.total }}
|
|
192
|
+ </template>
|
153
|
193
|
</el-table-column>
|
154
|
|
- <el-table-column prop="name" label="数据来源" width="162" align="center">
|
155
|
|
- <template slot-scope="scope">
|
156
|
|
- {{scope.row.data_sources}}
|
157
|
|
- </template>
|
|
194
|
+ <el-table-column
|
|
195
|
+ prop="name"
|
|
196
|
+ label="数据来源"
|
|
197
|
+ width="162"
|
|
198
|
+ align="center"
|
|
199
|
+ >
|
|
200
|
+ <template slot-scope="scope">
|
|
201
|
+ {{ scope.row.data_sources }}
|
|
202
|
+ </template>
|
158
|
203
|
</el-table-column>
|
159
|
204
|
</el-table>
|
160
|
205
|
</div>
|
|
@@ -166,60 +211,107 @@
|
166
|
211
|
style="width: 1328px"
|
167
|
212
|
v-if="state == 2"
|
168
|
213
|
>
|
169
|
|
-<!-- <el-table-column type="selection" width="55"> </el-table-column>-->
|
170
|
|
- <el-table-column type="index" label="序号" width="120" align="center">
|
|
214
|
+ <!-- <el-table-column type="selection" width="55"> </el-table-column>-->
|
|
215
|
+ <el-table-column
|
|
216
|
+ type="index"
|
|
217
|
+ label="序号"
|
|
218
|
+ width="120"
|
|
219
|
+ align="center"
|
|
220
|
+ >
|
|
221
|
+ </el-table-column>
|
|
222
|
+ <el-table-column
|
|
223
|
+ prop="name"
|
|
224
|
+ label="患者名称"
|
|
225
|
+ width="180"
|
|
226
|
+ align="center"
|
|
227
|
+ >
|
|
228
|
+ <template slot-scope="scope">
|
|
229
|
+ {{ scope.row.name }}
|
|
230
|
+ </template>
|
171
|
231
|
</el-table-column>
|
172
|
|
- <el-table-column prop="name" label="患者名称" width="180" align="center">
|
173
|
|
- <template slot-scope="scope">
|
174
|
|
- {{scope.row.name}}
|
|
232
|
+ <el-table-column
|
|
233
|
+ prop="name"
|
|
234
|
+ label="单次用量"
|
|
235
|
+ width="170"
|
|
236
|
+ align="center"
|
|
237
|
+ >
|
|
238
|
+ <template slot-scope="scope">
|
|
239
|
+ {{ scope.row.single_dosage }}
|
175
|
240
|
</template>
|
176
|
241
|
</el-table-column>
|
177
|
|
- <el-table-column prop="name" label="单次用量" width="170" align="center">
|
178
|
|
- <template slot-scope="scope">
|
179
|
|
- {{scope.row.single_dosage}}
|
180
|
|
- </template>
|
|
242
|
+ <el-table-column
|
|
243
|
+ prop="name"
|
|
244
|
+ label="用法"
|
|
245
|
+ width="160"
|
|
246
|
+ align="center"
|
|
247
|
+ >
|
|
248
|
+ <template slot-scope="scope">
|
|
249
|
+ {{ scope.row.usage }}
|
|
250
|
+ </template>
|
181
|
251
|
</el-table-column>
|
182
|
|
- <el-table-column prop="name" label="用法" width="160" align="center">
|
183
|
|
- <template slot-scope="scope">
|
184
|
|
- {{scope.row.usage}}
|
185
|
|
- </template>
|
|
252
|
+ <el-table-column
|
|
253
|
+ prop="name"
|
|
254
|
+ label="频率"
|
|
255
|
+ width="160"
|
|
256
|
+ align="center"
|
|
257
|
+ >
|
|
258
|
+ <template slot-scope="scope">
|
|
259
|
+ {{ scope.row.frequency }}
|
|
260
|
+ </template>
|
186
|
261
|
</el-table-column>
|
187
|
|
- <el-table-column prop="name" label="频率" width="160" align="center">
|
188
|
|
- <template slot-scope="scope">
|
189
|
|
- {{scope.row.frequency}}
|
190
|
|
- </template>
|
|
262
|
+ <el-table-column
|
|
263
|
+ prop="name"
|
|
264
|
+ label="天数"
|
|
265
|
+ width="160"
|
|
266
|
+ align="center"
|
|
267
|
+ >
|
|
268
|
+ <template slot-scope="scope">
|
|
269
|
+ {{ scope.row.days }}
|
|
270
|
+ </template>
|
191
|
271
|
</el-table-column>
|
192
|
|
- <el-table-column prop="name" label="天数" width="160" align="center">
|
193
|
|
- <template slot-scope="scope">
|
194
|
|
- {{scope.row.days}}
|
195
|
|
- </template>
|
|
272
|
+ <el-table-column
|
|
273
|
+ prop="name"
|
|
274
|
+ label="总量"
|
|
275
|
+ width="160"
|
|
276
|
+ align="center"
|
|
277
|
+ >
|
|
278
|
+ <template slot-scope="scope">
|
|
279
|
+ {{ scope.row.total }}
|
|
280
|
+ </template>
|
196
|
281
|
</el-table-column>
|
197
|
|
- <el-table-column prop="name" label="总量" width="160" align="center">
|
198
|
|
- <template slot-scope="scope">
|
199
|
|
- {{scope.row.total}}
|
200
|
|
- </template>
|
|
282
|
+ <el-table-column
|
|
283
|
+ prop="name"
|
|
284
|
+ label="数据来源"
|
|
285
|
+ width="162"
|
|
286
|
+ align="center"
|
|
287
|
+ >
|
|
288
|
+ <template slot-scope="scope">
|
|
289
|
+ {{ scope.row.data_sources }}
|
|
290
|
+ </template>
|
201
|
291
|
</el-table-column>
|
202
|
|
- <el-table-column prop="name" label="数据来源" width="162" align="center">
|
203
|
|
- <template slot-scope="scope">
|
204
|
|
- {{scope.row.data_sources}}
|
205
|
|
- </template>
|
|
292
|
+ <el-table-column
|
|
293
|
+ prop="name"
|
|
294
|
+ label="领药人"
|
|
295
|
+ width="160"
|
|
296
|
+ align="center"
|
|
297
|
+ >
|
|
298
|
+ <template slot-scope="scope">
|
|
299
|
+ {{ scope.row.people }}
|
|
300
|
+ </template>
|
206
|
301
|
</el-table-column>
|
207
|
|
- <el-table-column prop="name" label="领药人" width="160" align="center">
|
208
|
|
- <template slot-scope="scope">
|
209
|
|
- {{scope.row.people}}
|
210
|
|
- </template>
|
211
|
|
- </el-table-column>
|
212
|
302
|
</el-table>
|
213
|
303
|
</div>
|
214
|
|
- <div style="margin-top:12px;" v-if="state == 1">领药人:
|
|
304
|
+ <div style="margin-top: 12px" v-if="state == 1">
|
|
305
|
+ 领药人:
|
215
|
306
|
<el-select v-model="admin_user_id" placeholder="请选择">
|
216
|
307
|
<el-option
|
217
|
308
|
v-for="item in doctorList"
|
218
|
309
|
:key="item.admin_user_id"
|
219
|
310
|
:label="item.user_name"
|
220
|
|
- :value="item.admin_user_id">
|
|
311
|
+ :value="item.admin_user_id"
|
|
312
|
+ >
|
221
|
313
|
</el-option>
|
222
|
|
- </el-select>
|
|
314
|
+ </el-select>
|
223
|
315
|
</div>
|
224
|
316
|
</div>
|
225
|
317
|
|
|
@@ -229,8 +321,15 @@
|
229
|
321
|
<el-radio v-model="is_open" label="1">是</el-radio>
|
230
|
322
|
<el-radio v-model="is_open" label="2">否</el-radio>
|
231
|
323
|
</span>
|
232
|
|
- <div style="height: 50px; background: #c7ebfc; border-radius: 5px;padding: 7px;">
|
233
|
|
- <i class="el-icon-info" style="color: #3399ff;font-size: 17px;"></i>
|
|
324
|
+ <div
|
|
325
|
+ style="
|
|
326
|
+ height: 50px;
|
|
327
|
+ background: #c7ebfc;
|
|
328
|
+ border-radius: 5px;
|
|
329
|
+ padding: 7px;
|
|
330
|
+ "
|
|
331
|
+ >
|
|
332
|
+ <i class="el-icon-info" style="color: #3399ff; font-size: 17px"></i>
|
234
|
333
|
若选择为是,则通过药房发药的药品都会在发药之后进行出库,否则按原来的方式进行出库管理
|
235
|
334
|
</div>
|
236
|
335
|
<span slot="footer" class="dialog-footer">
|
|
@@ -253,15 +352,22 @@
|
253
|
352
|
<script>
|
254
|
353
|
import drugPrint from "./print/drugPrint.vue";
|
255
|
354
|
import BreadCrumb from "@/xt_pages/components/bread-crumb";
|
256
|
|
-import { getTodayAdviceList,getPharmacyBaseDrug,updatePharmacyBaseDrug,SaveSetting,getPharmacyConfig,getUserdDrugList } from "@/api/his/advice";
|
|
355
|
+import {
|
|
356
|
+ getTodayAdviceList,
|
|
357
|
+ getPharmacyBaseDrug,
|
|
358
|
+ updatePharmacyBaseDrug,
|
|
359
|
+ SaveSetting,
|
|
360
|
+ getPharmacyConfig,
|
|
361
|
+ getUserdDrugList,
|
|
362
|
+} from "@/api/his/advice";
|
257
|
363
|
import {
|
258
|
364
|
dispensemedicine,
|
259
|
365
|
waitingmedicine,
|
260
|
366
|
getpatientswithdrugs,
|
261
|
367
|
medicinedeparture,
|
262
|
|
- getcurrentname
|
263
|
|
-} from "@/api/pharmacy"
|
264
|
|
-const moment = require('moment')
|
|
368
|
+ getcurrentname,
|
|
369
|
+} from "@/api/pharmacy";
|
|
370
|
+const moment = require("moment");
|
265
|
371
|
export default {
|
266
|
372
|
components: {
|
267
|
373
|
BreadCrumb,
|
|
@@ -280,293 +386,298 @@ export default {
|
280
|
386
|
alreadmount: 0,
|
281
|
387
|
tableData: [],
|
282
|
388
|
tableData_list: [],
|
283
|
|
- tableList:[],
|
|
389
|
+ tableList: [],
|
284
|
390
|
multipleSelection: [],
|
285
|
|
- start_time:moment(new Date()).add('year',0).format("YYYY-MM-DD"),
|
286
|
|
- patientList:[],
|
287
|
|
- keywords:"",
|
288
|
|
- dialogVisible:false,
|
289
|
|
- is_open:"2",
|
290
|
|
- isVisibility:"",
|
291
|
|
- propsTable:"",
|
292
|
|
- doctorList:[],
|
293
|
|
- admin_user_id:0,
|
294
|
|
- waiting_drug:[],//待发药列表
|
295
|
|
- issued_drug:[],//已发药列表
|
296
|
|
- currentRow:null,
|
297
|
|
- tmp:0,
|
|
391
|
+ start_time: moment(new Date()).add("year", 0).format("YYYY-MM-DD"),
|
|
392
|
+ patientList: [],
|
|
393
|
+ keywords: "",
|
|
394
|
+ dialogVisible: false,
|
|
395
|
+ is_open: "2",
|
|
396
|
+ isVisibility: "",
|
|
397
|
+ propsTable: "",
|
|
398
|
+ doctorList: [],
|
|
399
|
+ admin_user_id: 0,
|
|
400
|
+ waiting_drug: [], //待发药列表
|
|
401
|
+ issued_drug: [], //已发药列表
|
|
402
|
+ currentRow: null,
|
|
403
|
+ tmp: 0,
|
298
|
404
|
};
|
299
|
405
|
},
|
300
|
406
|
|
301
|
407
|
methods: {
|
302
|
|
- tt(){
|
303
|
|
- console.log("this.currentRow",this.currentRow)
|
304
|
|
- this.$router.go(0)
|
|
408
|
+ tt() {
|
|
409
|
+ console.log("this.currentRow", this.currentRow);
|
|
410
|
+ this.$router.go(0);
|
305
|
411
|
},
|
306
|
|
- async fun3(){
|
307
|
|
- console.log("fun3")
|
308
|
|
- this.fun1().then(val => {
|
|
412
|
+ async fun3() {
|
|
413
|
+ console.log("fun3");
|
|
414
|
+ this.fun1().then((val) => {
|
309
|
415
|
this.fun2();
|
310
|
|
- })
|
|
416
|
+ });
|
311
|
417
|
},
|
312
|
|
- async fun4(tps){
|
313
|
|
- console.log("fun3",tps)
|
314
|
|
- this.fun1().then(val => {
|
315
|
|
- console.log("this.issued_drug",this.issued_drug)
|
316
|
|
- for(let i = 0;i < this.issued_drug.length;i++){
|
317
|
|
- if(tps == this.issued_drug[i].id){
|
|
418
|
+ async fun4(tps) {
|
|
419
|
+ console.log("fun3", tps);
|
|
420
|
+ this.fun1().then((val) => {
|
|
421
|
+ console.log("this.issued_drug", this.issued_drug);
|
|
422
|
+ for (let i = 0; i < this.issued_drug.length; i++) {
|
|
423
|
+ if (tps == this.issued_drug[i].id) {
|
318
|
424
|
this.$refs.table02.setCurrentRow(this.issued_drug[i]);
|
319
|
|
- this.handleCurrentChange(this.issued_drug[i])
|
|
425
|
+ this.handleCurrentChange(this.issued_drug[i]);
|
320
|
426
|
}
|
321
|
427
|
}
|
322
|
|
- })
|
|
428
|
+ });
|
323
|
429
|
},
|
324
|
|
- async fun5(tps){
|
325
|
|
- console.log("fun3",tps)
|
326
|
|
- this.fun1().then(val => {
|
327
|
|
- console.log("this.issued_drug",this.waiting_drug)
|
328
|
|
- for(let i = 0;i < this.waiting_drug.length;i++){
|
329
|
|
- if(tps == this.waiting_drug[i].id){
|
|
430
|
+ async fun5(tps) {
|
|
431
|
+ console.log("fun3", tps);
|
|
432
|
+ this.fun1().then((val) => {
|
|
433
|
+ console.log("this.issued_drug", this.waiting_drug);
|
|
434
|
+ for (let i = 0; i < this.waiting_drug.length; i++) {
|
|
435
|
+ if (tps == this.waiting_drug[i].id) {
|
330
|
436
|
this.$refs.table01.setCurrentRow(this.waiting_drug[i]);
|
331
|
|
- this.handleCurrentChange(this.waiting_drug[i])
|
|
437
|
+ this.handleCurrentChange(this.waiting_drug[i]);
|
332
|
438
|
}
|
333
|
439
|
}
|
334
|
|
- })
|
|
440
|
+ });
|
335
|
441
|
},
|
336
|
|
- changeTimes(){
|
|
442
|
+ changeTimes() {
|
337
|
443
|
// alert("aa")
|
338
|
444
|
// this.getdruglist();
|
339
|
445
|
this.fun3();
|
340
|
446
|
},
|
341
|
447
|
//初始化
|
342
|
|
- init(){
|
343
|
|
- this.state = 1
|
344
|
|
- this.tableData = null
|
345
|
|
- this.currentRow = null
|
|
448
|
+ init() {
|
|
449
|
+ this.state = 1;
|
|
450
|
+ this.tableData = null;
|
|
451
|
+ this.currentRow = null;
|
346
|
452
|
},
|
347
|
|
- lala(){
|
348
|
|
- this.currentRow = null
|
349
|
|
- this.tableData = null
|
350
|
|
- this.selectedbydefault()
|
|
453
|
+ lala() {
|
|
454
|
+ this.currentRow = null;
|
|
455
|
+ this.tableData = null;
|
|
456
|
+ this.selectedbydefault();
|
351
|
457
|
},
|
352
|
|
- searchAction() {
|
|
458
|
+ searchAction() {
|
353
|
459
|
// this.getlist();
|
354
|
|
- this.tableData = null
|
355
|
|
- this.currentRow = null
|
356
|
|
- this.getdruglist();
|
|
460
|
+ this.tableData = null;
|
|
461
|
+ this.currentRow = null;
|
|
462
|
+ this.getdruglist();
|
357
|
463
|
},
|
358
|
464
|
// 跳转打印页面
|
359
|
465
|
toPrint() {
|
360
|
|
-
|
361
|
|
- if (this.state == 1 && this.multipleSelection.length == 0){
|
|
466
|
+ if (this.state == 1 && this.multipleSelection.length == 0) {
|
362
|
467
|
this.$message.error("未选择任何数据");
|
363
|
|
- return
|
|
468
|
+ return;
|
364
|
469
|
}
|
365
|
|
- if (this.state == 2 && this.tableData == null){
|
366
|
|
- this.$message.error("未选择任何数据");
|
367
|
|
- return
|
|
470
|
+ if (this.state == 2 && this.tableData == null) {
|
|
471
|
+ this.$message.error("未选择任何数据");
|
|
472
|
+ return;
|
368
|
473
|
}
|
369
|
|
- this.$refs.drugprint.show(this.tableData,this.currentRow,this.state,this.multipleSelection,this.start_time);
|
|
474
|
+ this.$refs.drugprint.show(
|
|
475
|
+ this.tableData,
|
|
476
|
+ this.currentRow,
|
|
477
|
+ this.state,
|
|
478
|
+ this.multipleSelection,
|
|
479
|
+ this.start_time
|
|
480
|
+ );
|
370
|
481
|
},
|
371
|
482
|
//列表选择
|
372
|
483
|
handleSelectionChange(val) {
|
373
|
484
|
this.multipleSelection = val;
|
374
|
485
|
},
|
375
|
486
|
//默认选中
|
376
|
|
- selectedbydefault(){
|
377
|
|
- if(this.state == 1 && this.waiting_drug.length > 0){
|
|
487
|
+ selectedbydefault() {
|
|
488
|
+ if (this.state == 1 && this.waiting_drug.length > 0) {
|
378
|
489
|
this.$refs.table01.setCurrentRow(this.waiting_drug[0]);
|
379
|
|
- this.handleCurrentChange(this.waiting_drug[0])
|
|
490
|
+ this.handleCurrentChange(this.waiting_drug[0]);
|
380
|
491
|
}
|
381
|
|
- if(this.state == 2 && this.issued_drug.length >0){
|
|
492
|
+ if (this.state == 2 && this.issued_drug.length > 0) {
|
382
|
493
|
this.$refs.table02.setCurrentRow(this.issued_drug[0]);
|
383
|
|
- this.handleCurrentChange(this.issued_drug[0])
|
|
494
|
+ this.handleCurrentChange(this.issued_drug[0]);
|
384
|
495
|
}
|
385
|
496
|
},
|
386
|
497
|
//包装selectedbydefault
|
387
|
|
- fun2(){
|
388
|
|
- console.log("3333333this.waitmount_data",this.waiting_drug)
|
|
498
|
+ fun2() {
|
|
499
|
+ console.log("3333333this.waitmount_data", this.waiting_drug);
|
389
|
500
|
// return new Promise((resolve, reject) => {
|
390
|
|
- if(this.state == 1 && this.waiting_drug.length > 0){
|
|
501
|
+ if (this.state == 1 && this.waiting_drug.length > 0) {
|
391
|
502
|
this.$refs.table01.setCurrentRow(this.waiting_drug[0]);
|
392
|
|
- this.handleCurrentChange(this.waiting_drug[0])
|
|
503
|
+ this.handleCurrentChange(this.waiting_drug[0]);
|
393
|
504
|
}
|
394
|
|
- if(this.state == 2 && this.issued_drug.length >0){
|
|
505
|
+ if (this.state == 2 && this.issued_drug.length > 0) {
|
395
|
506
|
this.$refs.table02.setCurrentRow(this.issued_drug[0]);
|
396
|
|
- this.handleCurrentChange(this.issued_drug[0])
|
|
507
|
+ this.handleCurrentChange(this.issued_drug[0]);
|
397
|
508
|
}
|
398
|
509
|
// });
|
399
|
510
|
},
|
400
|
511
|
// 药品发药
|
401
|
512
|
dispense() {
|
402
|
513
|
var tps = this.currentRow.id;
|
403
|
|
- if(this.multipleSelection.length < 1){
|
404
|
|
- this.$message.error("未选择任何信息")
|
405
|
|
- return
|
|
514
|
+ if (this.multipleSelection.length < 1) {
|
|
515
|
+ this.$message.error("未选择任何信息");
|
|
516
|
+ return;
|
406
|
517
|
}
|
407
|
518
|
var tmp = "";
|
408
|
|
- console.log("初始值",tmp)
|
409
|
|
- for (var i=0;i < this.multipleSelection.length;i++){
|
410
|
|
- tmp = tmp + this.multipleSelection[i].id + ","
|
|
519
|
+ console.log("初始值", tmp);
|
|
520
|
+ for (var i = 0; i < this.multipleSelection.length; i++) {
|
|
521
|
+ tmp = tmp + this.multipleSelection[i].id + ",";
|
411
|
522
|
}
|
412
|
523
|
var params = {
|
413
|
524
|
creater: this.admin_user_id,
|
414
|
525
|
ids: tmp,
|
415
|
|
- }
|
|
526
|
+ };
|
416
|
527
|
medicinedeparture(params).then((res) => {
|
417
|
|
- if (res.data.state == 1){
|
418
|
|
- this.$message.success("操作成功")
|
|
528
|
+ if (res.data.state == 1) {
|
|
529
|
+ this.$message.success("操作成功");
|
419
|
530
|
this.getdruglist();
|
420
|
531
|
//刷新列表
|
421
|
532
|
this.handleCurrentChange(this.currentRow);
|
422
|
533
|
this.fun4(tps);
|
423
|
534
|
this.state = 2;
|
424
|
|
- this.multipleSelection = []
|
425
|
|
- }else{
|
426
|
|
- this.$message.error("操作失败:" + res.data.msg)
|
|
535
|
+ this.multipleSelection = [];
|
|
536
|
+ } else {
|
|
537
|
+ this.$message.error("操作失败:" + res.data.msg);
|
427
|
538
|
//刷新列表
|
428
|
539
|
this.handleCurrentChange(this.currentRow);
|
429
|
540
|
this.fun5(tps);
|
430
|
541
|
this.state = 1;
|
431
|
542
|
}
|
432
|
|
- })
|
|
543
|
+ });
|
433
|
544
|
},
|
434
|
545
|
//获取药品列表
|
435
|
|
- getdruglist(){
|
|
546
|
+ getdruglist() {
|
436
|
547
|
var params = {
|
437
|
548
|
keyword: this.keywords,
|
438
|
549
|
time: this.start_time,
|
439
|
|
- }
|
|
550
|
+ };
|
440
|
551
|
waitingmedicine(params).then((res) => {
|
441
|
|
- if (res.data.state == 1){
|
442
|
|
- this.waiting_drug = res.data.data.list
|
|
552
|
+ if (res.data.state == 1) {
|
|
553
|
+ this.waiting_drug = res.data.data.list;
|
443
|
554
|
}
|
444
|
|
- })
|
|
555
|
+ });
|
445
|
556
|
dispensemedicine(params).then((res) => {
|
446
|
|
- if (res.data.state == 1){
|
447
|
|
- this.issued_drug = res.data.data.list
|
|
557
|
+ if (res.data.state == 1) {
|
|
558
|
+ this.issued_drug = res.data.data.list;
|
448
|
559
|
}
|
449
|
|
- })
|
|
560
|
+ });
|
450
|
561
|
},
|
451
|
|
- async fun1(){
|
|
562
|
+ async fun1() {
|
452
|
563
|
var params = {
|
453
|
564
|
keyword: this.keywords,
|
454
|
565
|
time: this.start_time,
|
455
|
|
- }
|
|
566
|
+ };
|
456
|
567
|
await waitingmedicine(params).then((res) => {
|
457
|
|
- if (res.data.state == 1){
|
458
|
|
- this.waiting_drug = res.data.data.list
|
|
568
|
+ if (res.data.state == 1) {
|
|
569
|
+ this.waiting_drug = res.data.data.list;
|
459
|
570
|
}
|
460
|
|
- console.log("fun1lil1111i")
|
461
|
|
- })
|
|
571
|
+ console.log("fun1lil1111i");
|
|
572
|
+ });
|
462
|
573
|
await dispensemedicine(params).then((res) => {
|
463
|
|
- if (res.data.state == 1){
|
464
|
|
- this.issued_drug = res.data.data.list
|
|
574
|
+ if (res.data.state == 1) {
|
|
575
|
+ this.issued_drug = res.data.data.list;
|
465
|
576
|
}
|
466
|
|
- console.log("fun122222222")
|
467
|
|
- })
|
468
|
|
- console.log("fun1")
|
|
577
|
+ console.log("fun122222222");
|
|
578
|
+ });
|
|
579
|
+ console.log("fun1");
|
469
|
580
|
},
|
470
|
581
|
|
471
|
|
- morencreatename(){
|
472
|
|
- var param ={}
|
|
582
|
+ morencreatename() {
|
|
583
|
+ var param = {};
|
473
|
584
|
getcurrentname(param).then((res) => {
|
474
|
|
- console.log("res(药)",res)
|
475
|
|
- if (res.data.state == 1){
|
|
585
|
+ console.log("res(药)", res);
|
|
586
|
+ if (res.data.state == 1) {
|
476
|
587
|
this.admin_user_id = res.data.data.list;
|
477
|
|
- console.log("this.admin_user_id(药)",this.admin_user_id)
|
|
588
|
+ console.log("this.admin_user_id(药)", this.admin_user_id);
|
478
|
589
|
}
|
479
|
590
|
});
|
480
|
591
|
},
|
481
|
592
|
//获取领药人选项
|
482
|
|
- getlist(){
|
|
593
|
+ getlist() {
|
483
|
594
|
var params = {
|
484
|
|
- start_time:this.start_time,
|
485
|
|
- keywords:this.keywords,
|
486
|
|
- }
|
487
|
|
- getTodayAdviceList(params).then(response=>{
|
488
|
|
- if(response.data.state == 1){
|
489
|
|
- this.doctorList = response.data.data.doctorlist
|
490
|
|
- console.log("this.admin_user_id(药2)",this.admin_user_id)
|
491
|
|
- // this.admin_user_id = this.doctorList[0].admin_user_id
|
492
|
|
- // this.admin_user_id = this.tmp
|
493
|
|
- }
|
494
|
|
- })
|
|
595
|
+ start_time: this.start_time,
|
|
596
|
+ keywords: this.keywords,
|
|
597
|
+ };
|
|
598
|
+ getTodayAdviceList(params).then((response) => {
|
|
599
|
+ if (response.data.state == 1) {
|
|
600
|
+ this.doctorList = response.data.data.doctorlist;
|
|
601
|
+ console.log("this.admin_user_id(药2)", this.admin_user_id);
|
|
602
|
+ // this.admin_user_id = this.doctorList[0].admin_user_id
|
|
603
|
+ // this.admin_user_id = this.tmp
|
|
604
|
+ }
|
|
605
|
+ });
|
495
|
606
|
},
|
496
|
|
- // //获取药品的患者信息
|
497
|
|
- informationofdrugs(val){
|
|
607
|
+ // //获取药品的患者信息
|
|
608
|
+ informationofdrugs(val) {
|
498
|
609
|
var params = {
|
499
|
610
|
// patient_id: this.currentRow.
|
500
|
|
- }
|
|
611
|
+ };
|
501
|
612
|
},
|
502
|
613
|
handleCurrentChange(val) {
|
503
|
614
|
this.currentRow = val;
|
504
|
|
- if(this.state == 1){
|
505
|
|
- this.getdrugsdetails(0)
|
|
615
|
+ if (this.state == 1) {
|
|
616
|
+ this.getdrugsdetails(0);
|
506
|
617
|
}
|
507
|
|
- if (this.state == 2){
|
508
|
|
- this.getdrugsdetails(1)
|
|
618
|
+ if (this.state == 2) {
|
|
619
|
+ this.getdrugsdetails(1);
|
509
|
620
|
}
|
510
|
621
|
},
|
511
|
|
- getdrugsdetails(val){
|
|
622
|
+ getdrugsdetails(val) {
|
512
|
623
|
var params = {
|
513
|
|
- drug_id:this.currentRow.id,
|
514
|
|
- is_medicine:val,
|
515
|
|
- time:this.start_time,
|
516
|
|
- }
|
|
624
|
+ drug_id: this.currentRow.id,
|
|
625
|
+ is_medicine: val,
|
|
626
|
+ time: this.start_time,
|
|
627
|
+ };
|
517
|
628
|
getpatientswithdrugs(params).then((res) => {
|
518
|
|
- if (res.data.state == 1){
|
519
|
|
- this.tableData = res.data.data.list;//列表数据
|
520
|
|
- }else {
|
|
629
|
+ if (res.data.state == 1) {
|
|
630
|
+ this.tableData = res.data.data.list; //列表数据
|
|
631
|
+ } else {
|
521
|
632
|
this.$message.error(res.data.msg);
|
522
|
633
|
}
|
523
|
|
- })
|
|
634
|
+ });
|
524
|
635
|
},
|
525
|
636
|
|
526
|
|
- toSetting(){
|
527
|
|
- getPharmacyConfig().then(response=>{
|
528
|
|
- if(response.data.state == 1){
|
529
|
|
- this.dialogVisible = true
|
530
|
|
- var config = response.data.data.config
|
531
|
|
- this.is_open = config.is_open.toString()
|
|
637
|
+ toSetting() {
|
|
638
|
+ getPharmacyConfig().then((response) => {
|
|
639
|
+ if (response.data.state == 1) {
|
|
640
|
+ this.dialogVisible = true;
|
|
641
|
+ var config = response.data.data.config;
|
|
642
|
+ this.is_open = config.is_open.toString();
|
532
|
643
|
}
|
533
|
|
- })
|
|
644
|
+ });
|
534
|
645
|
},
|
535
|
|
- SaveSetting(){
|
|
646
|
+ SaveSetting() {
|
536
|
647
|
var params = {
|
537
|
|
- is_open:parseInt(this.is_open),
|
538
|
|
- }
|
539
|
|
- SaveSetting(params).then(response=>{
|
540
|
|
- if(response.data.state == 1){
|
541
|
|
- var config = response.data.data.config
|
542
|
|
- this.$message.success("保存成功!")
|
543
|
|
- this.dialogVisible = false
|
544
|
|
- }
|
545
|
|
- })
|
|
648
|
+ is_open: parseInt(this.is_open),
|
|
649
|
+ };
|
|
650
|
+ SaveSetting(params).then((response) => {
|
|
651
|
+ if (response.data.state == 1) {
|
|
652
|
+ var config = response.data.data.config;
|
|
653
|
+ this.$message.success("保存成功!");
|
|
654
|
+ this.dialogVisible = false;
|
|
655
|
+ }
|
|
656
|
+ });
|
546
|
657
|
},
|
547
|
|
- getUserlist(drug_id){
|
548
|
|
- var params = {
|
549
|
|
- start_time:this.start_time,
|
550
|
|
- drug_id:drug_id,
|
551
|
|
- }
|
552
|
|
- getUserdDrugList(params).then(response=>{
|
553
|
|
- if(response.data.state == 1){
|
554
|
|
- var advicelist = response.data.data.advicelist
|
555
|
|
- for(let i=0;i<advicelist.length;i++){
|
556
|
|
- advicelist[i].type = 1
|
557
|
|
- advicelist[i].day = " "
|
558
|
|
- this.tableList.push(advicelist[i])
|
559
|
|
- }
|
560
|
|
- var hisAdviceList = response.data.data.hisAdviceList
|
561
|
|
- for(let i=0;i<hisAdviceList.length;i++){
|
562
|
|
- hisAdviceList[i].type = 2
|
563
|
|
- this.tableList.push(hisAdviceList[i])
|
564
|
|
- }
|
565
|
|
- var patient = response.data.data.patient
|
566
|
|
- this.patientList = patient
|
|
658
|
+ getUserlist(drug_id) {
|
|
659
|
+ var params = {
|
|
660
|
+ start_time: this.start_time,
|
|
661
|
+ drug_id: drug_id,
|
|
662
|
+ };
|
|
663
|
+ getUserdDrugList(params).then((response) => {
|
|
664
|
+ if (response.data.state == 1) {
|
|
665
|
+ var advicelist = response.data.data.advicelist;
|
|
666
|
+ for (let i = 0; i < advicelist.length; i++) {
|
|
667
|
+ advicelist[i].type = 1;
|
|
668
|
+ advicelist[i].day = " ";
|
|
669
|
+ this.tableList.push(advicelist[i]);
|
|
670
|
+ }
|
|
671
|
+ var hisAdviceList = response.data.data.hisAdviceList;
|
|
672
|
+ for (let i = 0; i < hisAdviceList.length; i++) {
|
|
673
|
+ hisAdviceList[i].type = 2;
|
|
674
|
+ this.tableList.push(hisAdviceList[i]);
|
|
675
|
+ }
|
|
676
|
+ var patient = response.data.data.patient;
|
|
677
|
+ this.patientList = patient;
|
567
|
678
|
}
|
568
|
|
- })
|
569
|
|
- }
|
|
679
|
+ });
|
|
680
|
+ },
|
570
|
681
|
},
|
571
|
682
|
created() {
|
572
|
683
|
this.init();
|
|
@@ -613,6 +724,17 @@ export default {
|
613
|
724
|
display: flex;
|
614
|
725
|
justify-content: flex-end;
|
615
|
726
|
}
|
|
727
|
+ .el-button {
|
|
728
|
+ height: 34px;
|
|
729
|
+ width: 65px;
|
|
730
|
+ }
|
|
731
|
+ .el-table{
|
|
732
|
+ margin-top: -13px;
|
|
733
|
+ }
|
|
734
|
+ /deep/ .el-divider {
|
|
735
|
+ height: 2px;
|
|
736
|
+ margin-top: 10px;
|
|
737
|
+ }
|
616
|
738
|
}
|
617
|
739
|
|
618
|
740
|
/deep/ .el-table--scrollable-x .el-table__body-wrapper {
|