|
@@ -1,4 +1,5 @@
|
1
|
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>-->
|
|
@@ -19,9 +20,10 @@
|
19
|
20
|
>
|
20
|
21
|
</el-date-picker>
|
21
|
22
|
</div>
|
22
|
|
-
|
|
23
|
+ <!-- <el-button @click="testsss">调试1</el-button>-->
|
|
24
|
+ <!-- <el-button @click="testsss2">调试2</el-button>-->
|
23
|
25
|
<div class="list">
|
24
|
|
- <el-radio-group v-model="state">
|
|
26
|
+ <el-radio-group v-model="state" @change="lala()">
|
25
|
27
|
<el-radio :label="1">待发药{{ waitmount }}人</el-radio>
|
26
|
28
|
<el-radio :label="2">已发药{{ alreadmount }}人</el-radio>
|
27
|
29
|
</el-radio-group>
|
|
@@ -48,13 +50,48 @@
|
48
|
50
|
|
49
|
51
|
<el-table
|
50
|
52
|
:height="tableHeight"
|
51
|
|
- :data="tableData"
|
|
53
|
+ ref="table01"
|
|
54
|
+ :data="waitmount_data"
|
|
55
|
+ highlight-current-row
|
|
56
|
+ @current-change="handleCurrentChange"
|
|
57
|
+ border
|
|
58
|
+ style="width: 100%"
|
|
59
|
+ v-if="state == 1"
|
|
60
|
+ >
|
|
61
|
+ <el-table-column prop="date" label="患者姓名" width="100">
|
|
62
|
+ <template slot-scope="scope">
|
|
63
|
+ <span>{{ scope.row.Name ? scope.row.Name : "" }}</span>
|
|
64
|
+ </template>
|
|
65
|
+ </el-table-column>
|
|
66
|
+ <el-table-column prop="name" label="透析号" width="100">
|
|
67
|
+ <template slot-scope="scope">
|
|
68
|
+ <span>{{
|
|
69
|
+ scope.row.DialysisNo ? scope.row.DialysisNo : ""
|
|
70
|
+ }}</span>
|
|
71
|
+ </template>
|
|
72
|
+ </el-table-column>
|
|
73
|
+ </el-table>
|
|
74
|
+ <el-table
|
|
75
|
+ :height="tableHeight"
|
|
76
|
+ ref="table02"
|
|
77
|
+ :data="alreadmount_data"
|
|
78
|
+ highlight-current-row
|
|
79
|
+ @current-change="handleCurrentChange"
|
52
|
80
|
border
|
53
|
81
|
style="width: 100%"
|
|
82
|
+ v-if="state == 2"
|
54
|
83
|
>
|
55
|
84
|
<el-table-column prop="date" label="患者姓名" width="100">
|
|
85
|
+ <template slot-scope="scope">
|
|
86
|
+ <span>{{ scope.row.Name ? scope.row.Name : "" }}</span>
|
|
87
|
+ </template>
|
56
|
88
|
</el-table-column>
|
57
|
|
- <el-table-column prop="name" label="单据编号" width="100">
|
|
89
|
+ <el-table-column prop="name" label="透析号" width="100">
|
|
90
|
+ <template slot-scope="scope">
|
|
91
|
+ <span>{{
|
|
92
|
+ scope.row.DialysisNo ? scope.row.DialysisNo : ""
|
|
93
|
+ }}</span>
|
|
94
|
+ </template>
|
58
|
95
|
</el-table-column>
|
59
|
96
|
</el-table>
|
60
|
97
|
</div>
|
|
@@ -68,7 +105,10 @@
|
68
|
105
|
>退药</el-button
|
69
|
106
|
>
|
70
|
107
|
<el-button type="primary" @click="toPrint">打印</el-button>
|
71
|
|
- <el-button type="primary" v-if="state == 1">设置</el-button>
|
|
108
|
+ <!-- <el-button @click="tiaoshi">调试</el-button>-->
|
|
109
|
+ <el-button type="primary" v-if="state == 1" @click="toSetting"
|
|
110
|
+ >设置</el-button
|
|
111
|
+ >
|
72
|
112
|
</div>
|
73
|
113
|
<el-divider></el-divider>
|
74
|
114
|
<div>
|
|
@@ -85,73 +125,76 @@
|
85
|
125
|
align="center"
|
86
|
126
|
>
|
87
|
127
|
</el-table-column>
|
88
|
|
- <el-table-column
|
89
|
|
- prop="name"
|
90
|
|
- label="名称"
|
91
|
|
- width="220"
|
92
|
|
- align="center"
|
93
|
|
- >
|
|
128
|
+ <el-table-column label="名称" width="200" align="center">
|
|
129
|
+ <template slot-scope="scope">
|
|
130
|
+ <span>{{ scope.row.Name ? scope.row.Name : "" }}</span>
|
|
131
|
+ </template>
|
94
|
132
|
</el-table-column>
|
95
|
|
- <el-table-column
|
96
|
|
- prop="name"
|
97
|
|
- label="单次用量"
|
98
|
|
- width="170"
|
99
|
|
- align="center"
|
100
|
|
- >
|
|
133
|
+ <el-table-column label="单次用量" width="150" align="center">
|
|
134
|
+ <template slot-scope="scope">
|
|
135
|
+ <span>{{
|
|
136
|
+ scope.row.SingleDosage ? scope.row.SingleDosage : ""
|
|
137
|
+ }}</span>
|
|
138
|
+ </template>
|
101
|
139
|
</el-table-column>
|
102
|
|
- <el-table-column
|
103
|
|
- prop="name"
|
104
|
|
- label="用法"
|
105
|
|
- width="160"
|
106
|
|
- align="center"
|
107
|
|
- >
|
|
140
|
+ <el-table-column label="用法" width="160" align="center">
|
|
141
|
+ <template slot-scope="scope">
|
|
142
|
+ <span>{{ scope.row.Usage ? scope.row.Usage : "" }}</span>
|
|
143
|
+ </template>
|
108
|
144
|
</el-table-column>
|
109
|
|
- <el-table-column
|
110
|
|
- prop="name"
|
111
|
|
- label="频率"
|
112
|
|
- width="160"
|
113
|
|
- align="center"
|
114
|
|
- >
|
|
145
|
+ <el-table-column label="频率" width="160" align="center">
|
|
146
|
+ <template slot-scope="scope">
|
|
147
|
+ <span>{{
|
|
148
|
+ scope.row.Frequency ? scope.row.Frequency : ""
|
|
149
|
+ }}</span>
|
|
150
|
+ </template>
|
115
|
151
|
</el-table-column>
|
116
|
|
- <el-table-column
|
117
|
|
- prop="name"
|
118
|
|
- label="天数"
|
119
|
|
- width="160"
|
120
|
|
- align="center"
|
121
|
|
- >
|
|
152
|
+ <el-table-column label="天数" width="140" align="center">
|
|
153
|
+ <template slot-scope="scope">
|
|
154
|
+ <span>{{ scope.row.Days ? scope.row.Days : "" }}</span>
|
|
155
|
+ </template>
|
122
|
156
|
</el-table-column>
|
123
|
|
- <el-table-column
|
124
|
|
- prop="name"
|
125
|
|
- label="总量"
|
126
|
|
- width="160"
|
127
|
|
- align="center"
|
128
|
|
- >
|
|
157
|
+ <el-table-column label="总量" width="140" align="center">
|
|
158
|
+ <template slot-scope="scope">
|
|
159
|
+ <span>{{ scope.row.Total ? scope.row.Total : "" }}</span>
|
|
160
|
+ </template>
|
129
|
161
|
</el-table-column>
|
130
|
|
- <el-table-column
|
131
|
|
- prop="name"
|
132
|
|
- label="开立医生"
|
133
|
|
- width="160"
|
134
|
|
- align="center"
|
135
|
|
- >
|
|
162
|
+ <el-table-column label="开立医生" width="150" align="center">
|
|
163
|
+ <template slot-scope="scope">
|
|
164
|
+ <span>{{ scope.row.Doctor ? scope.row.Doctor : "" }}</span>
|
|
165
|
+ </template>
|
136
|
166
|
</el-table-column>
|
137
|
|
- <el-table-column
|
138
|
|
- prop="name"
|
139
|
|
- label="数据来源"
|
140
|
|
- width="162"
|
141
|
|
- align="center"
|
142
|
|
- >
|
|
167
|
+ <el-table-column label="数据来源" width="162" align="center">
|
|
168
|
+ <template slot-scope="scope">
|
|
169
|
+ <span>{{
|
|
170
|
+ scope.row.DataSources ? scope.row.DataSources : ""
|
|
171
|
+ }}</span>
|
|
172
|
+ </template>
|
143
|
173
|
</el-table-column>
|
144
|
|
- <el-table-column
|
145
|
|
- prop="name"
|
146
|
|
- label="备注"
|
147
|
|
- width="170"
|
148
|
|
- align="center"
|
149
|
|
- >
|
|
174
|
+ <el-table-column label="备注" width="170" align="center">
|
|
175
|
+ <template slot-scope="scope">
|
|
176
|
+ <span>{{ scope.row.Remarks ? scope.row.Remarks : "" }}</span>
|
|
177
|
+ </template>
|
150
|
178
|
</el-table-column>
|
151
|
179
|
</el-table>
|
152
|
180
|
</div>
|
153
|
|
- <!-- <div style="margin-top: 25px">诊断时间:2022-05-07 19:22:16</div> -->
|
|
181
|
+ <!-- <div v-if="state == 2" style="margin-top: 25px">诊断时间:{{ timedate }}</div>-->
|
154
|
182
|
</div>
|
|
183
|
+ <el-dialog title="设置" :visible.sync="dialogVisible" width="30%">
|
|
184
|
+ <span style="font-size: 17px">请选择药品是否要通过药房管理出库</span>
|
|
185
|
+ <span style="display: block; padding: 18px 25px">
|
|
186
|
+ <el-radio v-model="is_open" label="1">是</el-radio>
|
|
187
|
+ <el-radio v-model="is_open" label="2">否</el-radio>
|
|
188
|
+ </span>
|
|
189
|
+ <div style="height: 50px; background: #c7ebfc; border-radius: 5px;padding: 7px;">
|
|
190
|
+ <i class="el-icon-info" style="color: #3399ff;font-size: 17px;"></i>
|
|
191
|
+ 若选择为是,则通过药房发药的药品都会在发药之后进行出库,否则按原来的方式进行出库管理
|
|
192
|
+ </div>
|
|
193
|
+ <span slot="footer" class="dialog-footer">
|
|
194
|
+ <el-button @click="dialogVisible = false">取 消</el-button>
|
|
195
|
+ <el-button type="primary" @click="SaveSetting">保 存</el-button>
|
|
196
|
+ </span>
|
|
197
|
+ </el-dialog>
|
155
|
198
|
</div>
|
156
|
199
|
|
157
|
200
|
<patient-print
|
|
@@ -166,6 +209,16 @@
|
166
|
209
|
<script>
|
167
|
210
|
import BreadCrumb from "@/xt_pages/components/bread-crumb";
|
168
|
211
|
import patientPrint from "./print/patientPrint.vue";
|
|
212
|
+import { getPharmacyConfig, SaveSetting } from "@/api/his/advice";
|
|
213
|
+import {
|
|
214
|
+ waitingdrug,
|
|
215
|
+ issueddrugs,
|
|
216
|
+ todaynumber,
|
|
217
|
+ getpharmacycontent,
|
|
218
|
+ dispensingmedicine,
|
|
219
|
+ drugwithdrawal,
|
|
220
|
+} from "@/api/pharmacy";
|
|
221
|
+const moment = require("moment");
|
169
|
222
|
export default {
|
170
|
223
|
components: {
|
171
|
224
|
BreadCrumb,
|
|
@@ -173,29 +226,208 @@ export default {
|
173
|
226
|
},
|
174
|
227
|
data() {
|
175
|
228
|
return {
|
|
229
|
+ patient_id: 0,
|
176
|
230
|
crumbs: [
|
177
|
231
|
{ path: false, name: "患者发药" },
|
178
|
232
|
{ path: "/Pharmacy/patiantDispensing", name: "患者发药" },
|
179
|
233
|
],
|
180
|
234
|
tableHeight: 400,
|
181
|
|
- datepick: "",
|
182
|
|
- state: 1,
|
183
|
|
- waitmount: 0,
|
184
|
|
- alreadmount: 0,
|
|
235
|
+ start_time: moment(new Date()).add("year", 0).format("YYYY-MM-DD"),
|
|
236
|
+ state: 1, //1待发药,2已发药
|
|
237
|
+ waitmount: 0, //待发药人数
|
|
238
|
+ waitmount_data: [],
|
|
239
|
+ alreadmount: 0, //已发药人数
|
|
240
|
+ alreadmount_data: [],
|
185
|
241
|
keywords: "",
|
186
|
242
|
tableData: [],
|
187
|
243
|
propsTable: [],
|
188
|
244
|
tableData_list: [],
|
189
|
245
|
isVisibility: false,
|
|
246
|
+ currentRow: null,
|
|
247
|
+ dialogVisible: false,
|
|
248
|
+ is_open: "2",
|
190
|
249
|
};
|
191
|
250
|
},
|
192
|
251
|
watch: {},
|
193
|
|
-
|
|
252
|
+ created() {
|
|
253
|
+ this.init();
|
|
254
|
+ this.gettodaynumber();
|
|
255
|
+ this.fun3();
|
|
256
|
+ // this.getwaitmount();//fun3
|
|
257
|
+ // this.selectedbydefault();
|
|
258
|
+ },
|
194
|
259
|
methods: {
|
|
260
|
+ tiaoshi() {
|
|
261
|
+ console.log("this.tableData", this.tableData);
|
|
262
|
+ },
|
|
263
|
+ async fun3() {
|
|
264
|
+ console.log("fun3");
|
|
265
|
+ this.fun1().then((val) => {
|
|
266
|
+ this.fun2();
|
|
267
|
+ });
|
|
268
|
+ },
|
|
269
|
+ async fun4(tmp) {
|
|
270
|
+ console.log("fun3");
|
|
271
|
+ this.fun1().then((val) => {
|
|
272
|
+ console.log("this.alreadmount_data", this.alreadmount_data);
|
|
273
|
+ for (let i = 0; i < this.alreadmount_data.length; i++) {
|
|
274
|
+ console.log("tmp = ", tmp);
|
|
275
|
+ if (this.alreadmount_data[i].PatientID == tmp) {
|
|
276
|
+ console.log("i = ", i);
|
|
277
|
+ this.$refs.table02.setCurrentRow(this.alreadmount_data[i]);
|
|
278
|
+ this.handleCurrentChange(this.alreadmount_data[i]);
|
|
279
|
+ }
|
|
280
|
+ }
|
|
281
|
+ });
|
|
282
|
+ },
|
|
283
|
+ async fun5(tmp) {
|
|
284
|
+ console.log("fun3");
|
|
285
|
+ this.fun1().then((val) => {
|
|
286
|
+ console.log("this.alreadmount_data", this.waitmount_data);
|
|
287
|
+ for (let i = 0; i < this.waitmount_data.length; i++) {
|
|
288
|
+ console.log("tmp = ", tmp);
|
|
289
|
+ if (this.waitmount_data[i].PatientID == tmp) {
|
|
290
|
+ console.log("i = ", i);
|
|
291
|
+ this.$refs.table02.setCurrentRow(this.waitmount_data[i]);
|
|
292
|
+ this.handleCurrentChange(this.waitmount_data[i]);
|
|
293
|
+ }
|
|
294
|
+ }
|
|
295
|
+ });
|
|
296
|
+ },
|
|
297
|
+
|
|
298
|
+ lala() {
|
|
299
|
+ console.log("this.state!!!!!!", this.state);
|
|
300
|
+ //初始化状态
|
|
301
|
+ this.tableData = null;
|
|
302
|
+ this.currentRow = null;
|
|
303
|
+ this.selectedbydefault();
|
|
304
|
+ },
|
|
305
|
+ //选中行数
|
|
306
|
+ handleCurrentChange(val) {
|
|
307
|
+ this.currentRow = val;
|
|
308
|
+ console.log("this.currentRow", this.currentRow);
|
|
309
|
+ if (this.state == 1) {
|
|
310
|
+ this.getpatientdetails(0);
|
|
311
|
+ }
|
|
312
|
+ if (this.state == 2) {
|
|
313
|
+ this.getpatientdetails(1);
|
|
314
|
+ }
|
|
315
|
+ },
|
|
316
|
+ init() {
|
|
317
|
+ // console.log("初始化了")
|
|
318
|
+ this.state = 1;
|
|
319
|
+ this.tableData = null;
|
|
320
|
+ this.currentRow = null;
|
|
321
|
+ },
|
|
322
|
+ testsss() {
|
|
323
|
+ this.state = 1;
|
|
324
|
+ },
|
|
325
|
+ //默认选中的
|
|
326
|
+ selectedbydefault() {
|
|
327
|
+ if (this.state == 1 && this.waitmount_data.length > 0) {
|
|
328
|
+ this.$refs.table01.setCurrentRow(this.waitmount_data[0]);
|
|
329
|
+ this.handleCurrentChange(this.waitmount_data[0]);
|
|
330
|
+ }
|
|
331
|
+ if (this.state == 2 && this.alreadmount_data.length > 0) {
|
|
332
|
+ this.$refs.table02.setCurrentRow(this.alreadmount_data[0]);
|
|
333
|
+ this.handleCurrentChange(this.alreadmount_data[0]);
|
|
334
|
+ }
|
|
335
|
+ },
|
|
336
|
+ //包装selectedbydefault
|
|
337
|
+ fun2() {
|
|
338
|
+ console.log("3333333this.waitmount_data", this.waitmount_data);
|
|
339
|
+ // return new Promise((resolve, reject) => {
|
|
340
|
+ if (this.state == 1 && this.waitmount_data.length > 0) {
|
|
341
|
+ this.$refs.table01.setCurrentRow(this.waitmount_data[0]);
|
|
342
|
+ this.handleCurrentChange(this.waitmount_data[0]);
|
|
343
|
+ }
|
|
344
|
+ if (this.state == 2 && this.alreadmount_data.length > 0) {
|
|
345
|
+ this.$refs.table02.setCurrentRow(this.alreadmount_data[0]);
|
|
346
|
+ this.handleCurrentChange(this.alreadmount_data[0]);
|
|
347
|
+ }
|
|
348
|
+ // });
|
|
349
|
+ },
|
|
350
|
+ changeTimes() {
|
|
351
|
+ this.gettodaynumber();
|
|
352
|
+ this.getwaitmount();
|
|
353
|
+ this.fun3();
|
|
354
|
+ },
|
|
355
|
+ //获取当天发药的人数
|
|
356
|
+ gettodaynumber() {
|
|
357
|
+ console.log("aaa");
|
|
358
|
+ var params = {
|
|
359
|
+ time: this.start_time,
|
|
360
|
+ };
|
|
361
|
+ todaynumber(params).then((res) => {
|
|
362
|
+ if (res.data.state == 1) {
|
|
363
|
+ this.waitmount = res.data.data.itotal;
|
|
364
|
+ this.alreadmount = res.data.data.wtotal;
|
|
365
|
+ }
|
|
366
|
+ });
|
|
367
|
+ // console.log("2222222")
|
|
368
|
+ },
|
|
369
|
+ //获取发药人列表
|
|
370
|
+ getwaitmount() {
|
|
371
|
+ var params = {
|
|
372
|
+ keyword: this.keywords,
|
|
373
|
+ time: this.start_time,
|
|
374
|
+ };
|
|
375
|
+ waitingdrug(params).then((res) => {
|
|
376
|
+ if (res.data.state == 1) {
|
|
377
|
+ this.waitmount_data = res.data.data.list;
|
|
378
|
+ }
|
|
379
|
+ });
|
|
380
|
+ issueddrugs(params).then((res) => {
|
|
381
|
+ if (res.data.state == 1) {
|
|
382
|
+ this.alreadmount_data = res.data.data.list;
|
|
383
|
+ }
|
|
384
|
+ });
|
|
385
|
+ },
|
|
386
|
+ //包装getwaitmount
|
|
387
|
+ async fun1() {
|
|
388
|
+ // return new Promise((resolve, reject) => {
|
|
389
|
+ var params = {
|
|
390
|
+ keyword: this.keywords,
|
|
391
|
+ time: this.start_time,
|
|
392
|
+ };
|
|
393
|
+ await waitingdrug(params).then((res) => {
|
|
394
|
+ if (res.data.state == 1) {
|
|
395
|
+ this.waitmount_data = res.data.data.list;
|
|
396
|
+ console.log("1111111");
|
|
397
|
+ }
|
|
398
|
+ });
|
|
399
|
+ await issueddrugs(params).then((res) => {
|
|
400
|
+ if (res.data.state == 1) {
|
|
401
|
+ this.alreadmount_data = res.data.data.list;
|
|
402
|
+ console.log("1111111s");
|
|
403
|
+ }
|
|
404
|
+ });
|
|
405
|
+ console.log("222222222");
|
|
406
|
+
|
|
407
|
+ // })
|
|
408
|
+ },
|
|
409
|
+ //获取患者信息详情
|
|
410
|
+ getpatientdetails(val) {
|
|
411
|
+ var params = {
|
|
412
|
+ patient_id: this.currentRow.PatientID,
|
|
413
|
+ is_medicine: val,
|
|
414
|
+ time: this.start_time,
|
|
415
|
+ };
|
|
416
|
+ getpharmacycontent(params).then((res) => {
|
|
417
|
+ if (res.data.state == 1) {
|
|
418
|
+ this.tableData = res.data.data.list;
|
|
419
|
+ } else {
|
|
420
|
+ this.$message.error(res.data.msg);
|
|
421
|
+ }
|
|
422
|
+ });
|
|
423
|
+ },
|
195
|
424
|
// 跳转打印页面
|
196
|
425
|
toPrint() {
|
197
|
|
- // this.$router.push({ path: "/Pharmacy/print/patientPrint" });
|
198
|
|
- this.$refs.patientprint.show();
|
|
426
|
+ // if (this.tableData == null) {
|
|
427
|
+ // this.$message.error("未选择任何数据");
|
|
428
|
+ // return;
|
|
429
|
+ // }
|
|
430
|
+ this.$refs.patientprint.show(this.tableData, this.currentRow, this.state);
|
199
|
431
|
},
|
200
|
432
|
|
201
|
433
|
// 搜索患者
|
|
@@ -203,29 +435,93 @@ export default {
|
203
|
435
|
|
204
|
436
|
// 药品发药
|
205
|
437
|
dispense() {
|
206
|
|
- var params = {};
|
|
438
|
+ var tmp = this.currentRow.PatientID;
|
|
439
|
+ var params = {
|
|
440
|
+ patient_id: this.currentRow.PatientID,
|
|
441
|
+ time: this.start_time,
|
|
442
|
+ };
|
207
|
443
|
this.$confirm("确定是否对该药品进行发药?", "患者发药", {
|
208
|
444
|
confirmButtonText: "确 定",
|
209
|
445
|
cancelButtonText: "取 消",
|
210
|
446
|
type: "warning",
|
211
|
447
|
})
|
212
|
|
- .then(() => {})
|
|
448
|
+ .then(() => {
|
|
449
|
+ dispensingmedicine(params).then((res) => {
|
|
450
|
+ if (res.data.state == 1) {
|
|
451
|
+ this.$message.success("操作成功");
|
|
452
|
+ this.gettodaynumber();
|
|
453
|
+ this.searchAction();
|
|
454
|
+ this.tableData = null;
|
|
455
|
+ this.fun4(tmp);
|
|
456
|
+ this.state = 2;
|
|
457
|
+ // console.log("this.alreadmount_data",this.alreadmount_data)
|
|
458
|
+ // for (let i = 0;i < this.alreadmount_data.length;i++){
|
|
459
|
+ // console.log("tmp = ",tmp)
|
|
460
|
+ // if (this.alreadmount_data[i].PatientID == tmp){
|
|
461
|
+ // console.log("i = ",i)
|
|
462
|
+ // this.$refs.table02.setCurrentRow(this.alreadmount_data[i]);
|
|
463
|
+ // this.handleCurrentChange(this.alreadmount_data[i])
|
|
464
|
+ // }
|
|
465
|
+ // }
|
|
466
|
+ } else {
|
|
467
|
+ this.$message.error(res.data.msg);
|
|
468
|
+ }
|
|
469
|
+ });
|
|
470
|
+ })
|
213
|
471
|
.catch(() => {});
|
214
|
472
|
},
|
215
|
473
|
|
|
474
|
+ toSetting() {
|
|
475
|
+ getPharmacyConfig().then((response) => {
|
|
476
|
+ if (response.data.state == 1) {
|
|
477
|
+ this.dialogVisible = true;
|
|
478
|
+ var config = response.data.data.config;
|
|
479
|
+ this.is_open = config.is_open.toString();
|
|
480
|
+ }
|
|
481
|
+ });
|
|
482
|
+ },
|
|
483
|
+ SaveSetting() {
|
|
484
|
+ var params = {
|
|
485
|
+ is_open: parseInt(this.is_open),
|
|
486
|
+ };
|
|
487
|
+ SaveSetting(params).then((response) => {
|
|
488
|
+ if (response.data.state == 1) {
|
|
489
|
+ var config = response.data.data.config;
|
|
490
|
+ this.$message.success("保存成功!");
|
|
491
|
+ this.dialogVisible = false;
|
|
492
|
+ }
|
|
493
|
+ });
|
|
494
|
+ },
|
|
495
|
+
|
216
|
496
|
// 药品退药
|
217
|
497
|
endispense() {
|
218
|
|
- var params = {};
|
|
498
|
+ var tmp = this.currentRow.PatientID;
|
|
499
|
+ var params = {
|
|
500
|
+ patient_id: this.currentRow.PatientID,
|
|
501
|
+ time: this.start_time,
|
|
502
|
+ };
|
219
|
503
|
this.$confirm("确定是否对该药品进行退药?", "患者退药", {
|
220
|
504
|
confirmButtonText: "确 定",
|
221
|
505
|
cancelButtonText: "取 消",
|
222
|
506
|
type: "warning",
|
223
|
507
|
})
|
224
|
|
- .then(() => {})
|
|
508
|
+ .then(() => {
|
|
509
|
+ drugwithdrawal(params).then((res) => {
|
|
510
|
+ if (res.data.state == 1) {
|
|
511
|
+ this.$message.success("操作成功");
|
|
512
|
+ this.gettodaynumber();
|
|
513
|
+ this.searchAction();
|
|
514
|
+ this.tableData = null;
|
|
515
|
+ this.fun4(tmp);
|
|
516
|
+ this.state = 1;
|
|
517
|
+ } else {
|
|
518
|
+ this.$message.error(res.data.msg);
|
|
519
|
+ }
|
|
520
|
+ });
|
|
521
|
+ })
|
225
|
522
|
.catch(() => {});
|
226
|
523
|
},
|
227
|
524
|
},
|
228
|
|
- created() {},
|
229
|
525
|
};
|
230
|
526
|
</script>
|
231
|
527
|
|