Bläddra i källkod

Merge branch '20201109_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20201109_pc_vue_new_branch

see999 3 år sedan
förälder
incheckning
e01b809456

+ 239 - 351
src/api/his/his.js Visa fil

@@ -1,629 +1,517 @@
1
-import request from "@/utils/request";
2
-
3
-
1
+import request from '@/utils/request'
4 2
 
5 3
 export function getSchedulePatientList(params) {
6 4
   return request({
7
-    url: "/api/hispatient/list",
8
-    method: "get",
9
-    params:params
10
-  });
5
+    url: '/api/hispatient/list',
6
+    method: 'get',
7
+    params: params
8
+  })
11 9
 }
12 10
 
13
-
14 11
 export function getPatientInfo(params) {
15 12
   return request({
16
-    url: "/api/hispatient/get",
17
-    method: "get",
18
-    params:params
19
-  });
13
+    url: '/api/hispatient/get',
14
+    method: 'get',
15
+    params: params
16
+  })
20 17
 }
21 18
 
22
-
23 19
 export function createCaseHistory(params) {
24
-  console.log("params",params);
20
+  console.log('params', params)
25 21
   return request({
26
-    url: "/api/doctorworkstation/casehistory/create",
27
-    method: "get",
28
-    params:params
29
-  });
22
+    url: '/api/doctorworkstation/casehistory/create',
23
+    method: 'get',
24
+    params: params
25
+  })
30 26
 }
31 27
 
32
-
33
-
34
-
35
-
36
-
37
-
38 28
 export function getInitData(params) {
39 29
   return request({
40
-    url: "/api/hisprescription/config",
41
-    method: "get",
42
-    params:params
43
-  });
30
+    url: '/api/hisprescription/config',
31
+    method: 'get',
32
+    params: params
33
+  })
44 34
 }
45 35
 
46
-
47 36
 export function getDoctors() {
48 37
   return request({
49
-    url: "/api/admin/get",
50
-    method: "get",
51
-  });
38
+    url: '/api/admin/get',
39
+    method: 'get'
40
+  })
52 41
 }
53 42
 
54
-
55
-
56 43
 export function createHisPrescription(data, params) {
57 44
   return request({
58
-    url: "/api/hisprescription/create",
59
-    method: "post",
60
-    data:data,
61
-    params:params,
62
-  });
45
+    url: '/api/hisprescription/create',
46
+    method: 'post',
47
+    data: data,
48
+    params: params
49
+  })
63 50
 }
64 51
 
65
-
66
-
67 52
 export function register(params) {
68 53
   return request({
69
-    url: "/api/register/get",
70
-    method: "get",
71
-    params:params,
72
-  });
54
+    url: '/api/register/get',
55
+    method: 'get',
56
+    params: params
57
+  })
73 58
 }
74 59
 
75 60
 export function upload(params) {
76 61
   return request({
77
-    url: "/api/upload/get",
78
-    method: "get",
79
-    params:params,
80
-  });
62
+    url: '/api/upload/get',
63
+    method: 'get',
64
+    params: params
65
+  })
81 66
 }
82 67
 
83
-
84 68
 export function delHisPrescription(params) {
85 69
   return request({
86
-    url: "/api/hisprescription/delete",
87
-    method: "post",
88
-    params:params,
89
-  });
70
+    url: '/api/hisprescription/delete',
71
+    method: 'post',
72
+    params: params
73
+  })
90 74
 }
91 75
 
92 76
 export function delHisAdvice(params) {
93 77
   return request({
94
-    url: "/api/advice/delete",
95
-    method: "post",
96
-    params:params,
97
-  });
78
+    url: '/api/advice/delete',
79
+    method: 'post',
80
+    params: params
81
+  })
98 82
 }
99 83
 
100 84
 export function delHisProject(params) {
101 85
   return request({
102
-    url: "/api/project/delete",
103
-    method: "post",
104
-    params:params,
105
-  });
86
+    url: '/api/project/delete',
87
+    method: 'post',
88
+    params: params
89
+  })
106 90
 }
107 91
 
108
-
109 92
 export function getHisOrderList(params) {
110 93
   return request({
111
-    url: "/api/hisorder/list",
112
-    method: "get",
113
-    params:params,
114
-  });
94
+    url: '/api/hisorder/list',
95
+    method: 'get',
96
+    params: params
97
+  })
115 98
 }
116 99
 
117
-
118 100
 export function getHisOrder(params) {
119 101
   return request({
120
-    url: "/api/hisorder/get",
121
-    method: "get",
122
-    params:params,
123
-  });
102
+    url: '/api/hisorder/get',
103
+    method: 'get',
104
+    params: params
105
+  })
124 106
 }
125 107
 
126
-
127 108
 export function getHisPrescriptionList(params) {
128 109
   return request({
129
-    url: "/api/hisprescription/list",
130
-    method: "get",
131
-    params:params,
132
-  });
110
+    url: '/api/hisprescription/list',
111
+    method: 'get',
112
+    params: params
113
+  })
133 114
 }
134 115
 
135
-
136
-export function getHisPrescriptionInfo(params){
116
+export function getHisPrescriptionInfo(params) {
137 117
   return request({
138
-    url:"/api/hisprescription/info",
139
-    method:"get",
140
-    params:params
118
+    url: '/api/hisprescription/info',
119
+    method: 'get',
120
+    params: params
141 121
   })
142 122
 }
143 123
 
144
-
145
-
146
-
147 124
 export function Refund(params) {
148 125
   return request({
149
-    url: "/api/refund/post",
150
-    method: "post",
151
-    params:params,
152
-  });
126
+    url: '/api/refund/post',
127
+    method: 'post',
128
+    params: params
129
+  })
153 130
 }
154 131
 
155
-
156 132
 export function delHisAddition(params) {
157 133
   return request({
158
-    url: "/api/addition_charge/delete",
159
-    method: "post",
160
-    params:params,
161
-  });
134
+    url: '/api/addition_charge/delete',
135
+    method: 'post',
136
+    params: params
137
+  })
162 138
 }
163 139
 
164
-
165
-
166 140
 export function getDoctorList() {
167 141
   return request({
168
-    url: "/api/doctor/list",
169
-    method: "get",
170
-  });
142
+    url: '/api/doctor/list',
143
+    method: 'get'
144
+  })
171 145
 }
172 146
 
173
-
174 147
 export function getExportConsumeDetailList(params) {
175 148
   return request({
176
-    url: "/api/consumedetail/export",
177
-    method: "get",
178
-    params:params
179
-  });
149
+    url: '/api/consumedetail/export',
150
+    method: 'get',
151
+    params: params
152
+  })
180 153
 }
181 154
 
182
-
183
-
184 155
 export function CreateHisSingleAdviceTemplate(params) {
185 156
   return request({
186
-    url: "/api/hisadvicetemplate/add",
187
-    method: "post",
188
-    params:params
189
-  });
157
+    url: '/api/hisadvicetemplate/add',
158
+    method: 'post',
159
+    params: params
160
+  })
190 161
 }
191 162
 
192
-
193
-
194
-
195
-
196 163
 export function DeleteHisAdviceTemplate(id, template_id, parent_id) {
197 164
   return request({
198 165
     url:
199
-      "/api/hisadvicetemplate/delete?id=" +
166
+      '/api/hisadvicetemplate/delete?id=' +
200 167
       id +
201
-      "&template_id=" +
168
+      '&template_id=' +
202 169
       template_id +
203
-      "&parent_id=" +
170
+      '&parent_id=' +
204 171
       parent_id,
205
-    method: "delete"
206
-  });
172
+    method: 'delete'
173
+  })
207 174
 }
208 175
 
209
-
210 176
 export function postHisAdviceTemplate(params, name, advice_type) {
211 177
   return request({
212 178
     url:
213
-      "/api/hisadvicetemplate/create?template_name=" +
179
+      '/api/hisadvicetemplate/create?template_name=' +
214 180
       name +
215
-      "&advice_type=" +
181
+      '&advice_type=' +
216 182
       advice_type,
217
-    method: "post",
183
+    method: 'post',
218 184
     data: params
219
-  });
185
+  })
220 186
 }
221 187
 
222
-
223
-
224
-
225 188
 export function updateHisTemplateName(params) {
226 189
   return request({
227
-    url: "/api/histemplate/modify",
228
-    method: "post",
229
-    params:params
230
-  });
190
+    url: '/api/histemplate/modify',
191
+    method: 'post',
192
+    params: params
193
+  })
231 194
 }
232 195
 
233
-
234 196
 export function UpdateHisAdviceTemplate(params) {
235 197
   return request({
236
-    url: "/api/hisadvicetemplate/update",
237
-    method: "put",
238
-    params:params
239
-  });
198
+    url: '/api/hisadvicetemplate/update',
199
+    method: 'put',
200
+    params: params
201
+  })
240 202
 }
241 203
 
242
-
243 204
 export function DeleteHisParentAdviceTemplate(id) {
244 205
   return request({
245
-    url: "/api/hisadviceparenttemplate/delete?template_id=" + id,
246
-    method: "delete",
247
-  });
206
+    url: '/api/hisadviceparenttemplate/delete?template_id=' + id,
207
+    method: 'delete'
208
+  })
248 209
 }
249 210
 
250
-
251
-export function getAllHisAdviceTemplate () {
211
+export function getAllHisAdviceTemplate() {
252 212
   return request({
253 213
     url: '/api/getallhisadvicetemplate',
254
-    method: 'get',
214
+    method: 'get'
255 215
   })
256 216
 }
257 217
 
258
-
259
-
260
-
261
-export function getNextOrLastHisPrescription (params) {
218
+export function getNextOrLastHisPrescription(params) {
262 219
   return request({
263 220
     url: '/api/hisprescription/get',
264 221
     method: 'get',
265
-    params:params,
222
+    params: params
266 223
   })
267 224
 }
268 225
 
269
-
270
-
271
-
272
-export function getCallHisPrescription (params) {
226
+export function getCallHisPrescription(params) {
273 227
   return request({
274 228
     url: '/api/callhisprescription/get',
275 229
     method: 'get',
276
-    params:params,
230
+    params: params
277 231
   })
278 232
 }
279 233
 
280
-
281
-
282
-export function getDayOrMonthHisPrescription (params) {
234
+export function getDayOrMonthHisPrescription(params) {
283 235
   return request({
284 236
     url: '/api/dayprescription/get',
285 237
     method: 'get',
286
-    params:params,
238
+    params: params
287 239
   })
288 240
 }
289 241
 
290
-
291
-
292
-
293
-
294
-
295 242
 export function editHisPrescription(data, params) {
296 243
   return request({
297
-    url: "/api/hisprescription/edit",
298
-    method: "post",
299
-    data:data,
300
-    params:params,
301
-  });
244
+    url: '/api/hisprescription/edit',
245
+    method: 'post',
246
+    data: data,
247
+    params: params
248
+  })
302 249
 }
303 250
 
304
-
305
-
306
-export function getChargeHisPatientList (params) {
251
+export function getChargeHisPatientList(params) {
307 252
   return request({
308 253
     url: '/api/charge/list',
309 254
     method: 'get',
310
-    params:params,
255
+    params: params
311 256
   })
312 257
 }
313 258
 
314
-
315
-
316
-export function getChargeHisPatientInfo (params) {
259
+export function getChargeHisPatientInfo(params) {
317 260
   return request({
318 261
     url: '/api/charge/info',
319 262
     method: 'get',
320
-    params:params,
263
+    params: params
321 264
   })
322 265
 }
323 266
 
324
-
325
-export function getHisOrderDetail (params) {
267
+export function getHisOrderDetail(params) {
326 268
   return request({
327 269
     url: '/api/orderdetail/get',
328 270
     method: 'get',
329
-    params:params,
271
+    params: params
330 272
   })
331 273
 }
332 274
 
333
-
334
-
335
-
336
-
337
-
338
-export function getHisOrderDetailCollect (params) {
275
+export function getHisOrderDetailCollect(params) {
339 276
   return request({
340 277
     url: '/api/orderdetaicollect/get',
341 278
     method: 'get',
342
-    params:params,
279
+    params: params
343 280
   })
344 281
 }
345 282
 
346
-
347
-export function getList (params) {
283
+export function getList(params) {
348 284
   return request({
349 285
     url: '/api/cost/compare',
350 286
     method: 'get',
351
-    params:params,
287
+    params: params
352 288
   })
353 289
 }
354 290
 
355
-
356
-
357
-
358
-export function getRecordList (params) {
291
+export function getRecordList(params) {
359 292
   return request({
360 293
     url: '/api/record/list',
361 294
     method: 'get',
362
-    params:params,
295
+    params: params
363 296
   })
364 297
 }
365 298
 
366
-
367
-
368
-export function getCheckAccountFormData (params) {
299
+export function getCheckAccountFormData(params) {
369 300
   return request({
370 301
     url: '/api/comparedata/get',
371 302
     method: 'get',
372
-    params:params,
303
+    params: params
373 304
   })
374 305
 }
375 306
 
376
-
377
-
378
-
379
-export function getHospitalPatientList (params) {
307
+export function getHospitalPatientList(params) {
380 308
   return request({
381 309
     url: '/api/hishospitalpatient/list',
382 310
     method: 'get',
383
-    params:params,
311
+    params: params
384 312
   })
385 313
 }
386 314
 
387
-
388
-
389
-
390
-
391
-
392
-export function GetHisHospitalChargePatientList (params) {
315
+export function GetHisHospitalChargePatientList(params) {
393 316
   return request({
394 317
     url: '/api/hospitalcharge/list',
395 318
     method: 'get',
396
-    params:params,
319
+    params: params
397 320
   })
398 321
 }
399 322
 
400
-
401
-
402
-export function GetHisHospitalChargePatientInfo (params) {
323
+export function GetHisHospitalChargePatientInfo(params) {
403 324
   return request({
404 325
     url: '/api/hospotalcharge/info',
405 326
     method: 'get',
406
-    params:params,
327
+    params: params
407 328
   })
408 329
 }
409 330
 
410
-
411
-
412
-
413
-export function getHisHospitalPrescriptionList (params) {
331
+export function getHisHospitalPrescriptionList(params) {
414 332
   return request({
415 333
     url: '/api/hospitalprescription/list',
416 334
     method: 'get',
417
-    params:params,
335
+    params: params
418 336
   })
419 337
 }
420 338
 
421
-
422
-
423
-
424
-
425
-
426
-
427
-
428
-
429
-
430
-
431
-
432 339
 export function getIncomeStatisticsDataList(params) {
433 340
   return request({
434
-    url: "/api/incomestatistics/get",
435
-    method: "get",
436
-    params:params,
437
-  });
341
+    url: '/api/incomestatistics/get',
342
+    method: 'get',
343
+    params: params
344
+  })
438 345
 }
439 346
 
440
-
441
-
442
-
443
-
444
-
445 347
 export function saveTeam(data, params) {
446 348
   return request({
447
-    url: "/api/his/saveprojectteam",
448
-    method: "post",
449
-    data:data,
450
-    params:params,
451
-  });
349
+    url: '/api/his/saveprojectteam',
350
+    method: 'post',
351
+    data: data,
352
+    params: params
353
+  })
452 354
 }
453 355
 
454
-
455
-
456
-
457
-export function editTeam(params,data) {
356
+export function editTeam(params, data) {
458 357
   return request({
459
-    url: "/api/his/updateprojectteam",
460
-    method: "post",
461
-    data:data,
462
-    params:params,
463
-  });
358
+    url: '/api/his/updateprojectteam',
359
+    method: 'post',
360
+    data: data,
361
+    params: params
362
+  })
464 363
 }
465 364
 
466
-export function createdTemplate(params,data) {
365
+export function createdTemplate(params, data) {
467 366
   return request({
468
-    url: "/api/hisprescriptiontemplate/create",
469
-    method: "post",
470
-    data:data,
471
-    params:params,
472
-  });
367
+    url: '/api/hisprescriptiontemplate/create',
368
+    method: 'post',
369
+    data: data,
370
+    params: params
371
+  })
473 372
 }
474 373
 
475 374
 export function preSettle(params) {
476 375
   return request({
477
-    url: "/api/presettle/get",
478
-    method: "get",
479
-    params:params,
480
-  });
376
+    url: '/api/presettle/get',
377
+    method: 'get',
378
+    params: params
379
+  })
481 380
 }
482 381
 
483
-
484
-
485 382
 export function getPrivateExpenses(params) {
486 383
   return request({
487
-    url: "/api/privateexpenses/get",
488
-    method: "get",
489
-    params:params,
490
-  });
384
+    url: '/api/privateexpenses/get',
385
+    method: 'get',
386
+    params: params
387
+  })
491 388
 }
492 389
 
493 390
 export function refundNumber(params) {
494 391
   return request({
495
-    url: "/api/refundnumber/post",
496
-    method: "post",
497
-    params:params,
498
-  });
392
+    url: '/api/refundnumber/post',
393
+    method: 'post',
394
+    params: params
395
+  })
499 396
 }
500 397
 
501
-
502 398
 export function changeMedType(params) {
503 399
   return request({
504
-    url: "/api/changemedtype/post",
505
-    method: "post",
506
-    params:params,
507
-  });
400
+    url: '/api/changemedtype/post',
401
+    method: 'post',
402
+    params: params
403
+  })
508 404
 }
509 405
 
510
-
511 406
 export function refunddetail(params) {
512 407
   return request({
513
-    url: "/api/refunddetail/post",
514
-    method: "post",
515
-    params:params,
516
-  });
408
+    url: '/api/refunddetail/post',
409
+    method: 'post',
410
+    params: params
411
+  })
517 412
 }
518 413
 
519
-
520
-
521
-
522 414
 export function getPrivateExpensesOrder(params) {
523 415
   return request({
524
-    url: "/api/privateexpensesorder/get",
525
-    method: "get",
526
-    params:params,
527
-  });
416
+    url: '/api/privateexpensesorder/get',
417
+    method: 'get',
418
+    params: params
419
+  })
528 420
 }
529 421
 
530
-
531 422
 //
532 423
 export function getMonthCharge(params) {
533 424
   return request({
534
-    url: "/api/monthcharge/info",
535
-    method: "get",
536
-    params:params,
537
-  });
425
+    url: '/api/monthcharge/info',
426
+    method: 'get',
427
+    params: params
428
+  })
538 429
 }
539 430
 
540 431
 export function getMonthHisPateintInfo(params) {
541 432
   return request({
542
-    url: "/api/monthhispatient/get",
543
-    method: "get",
544
-    params:params,
545
-  });
433
+    url: '/api/monthhispatient/get',
434
+    method: 'get',
435
+    params: params
436
+  })
546 437
 }
547 438
 
548
-
549
-
550
-
551
-
552
-
553
-
554
-
555
-
556
-
557 439
 export function getAllOrders(params) {
558 440
   return request({
559
-    url: "/api/orders",
560
-    method: "get",
561
-    params:params,
562
-  });
441
+    url: '/api/orders',
442
+    method: 'get',
443
+    params: params
444
+  })
563 445
 }
564 446
 
565
-
566
-
567
-
568
-
569
-
570 447
 export function Inhopitalcheck(params) {
571 448
   return request({
572
-    url: "/api/hospital/inhopitalcheck/get",
573
-    method: "get",
574
-    params:params,
575
-  });
449
+    url: '/api/hospital/inhopitalcheck/get',
450
+    method: 'get',
451
+    params: params
452
+  })
576 453
 }
577 454
 
578
-
579
-
580 455
 export function Outhopitalcheck(params) {
581 456
   return request({
582
-    url: "/api/hospital/outhopitalcheck/get",
583
-    method: "get",
584
-    params:params,
585
-  });
457
+    url: '/api/hospital/outhopitalcheck/get',
458
+    method: 'get',
459
+    params: params
460
+  })
586 461
 }
587 462
 
588
-
589
-
590
-
591 463
 export function Settle(params) {
592 464
   return request({
593
-    url: "/api/hospital/settle/get",
594
-    method: "get",
595
-    params:params,
596
-  });
465
+    url: '/api/hospital/settle/get',
466
+    method: 'get',
467
+    params: params
468
+  })
597 469
 }
598 470
 
599
-
600
-
601
-
602
-
603 471
 export function Inthopitaluncheck(params) {
604 472
   return request({
605
-    url: "/api/hospital/inthopitaluncheck/get",
606
-    method: "get",
607
-    params:params,
608
-  });
473
+    url: '/api/hospital/inthopitaluncheck/get',
474
+    method: 'get',
475
+    params: params
476
+  })
609 477
 }
610 478
 
611
-
612 479
 export function Outhopitaluncheck(params) {
613 480
   return request({
614
-    url: "/api/hospital/outhopitaluncheck/get",
615
-    method: "get",
616
-    params:params,
617
-  });
481
+    url: '/api/hospital/outhopitaluncheck/get',
482
+    method: 'get',
483
+    params: params
484
+  })
618 485
 }
619 486
 
487
+export function HopitalunRefund(params) {
488
+  return request({
489
+    url: '/api/hospital/refund',
490
+    method: 'get',
491
+    params: params
492
+  })
493
+}
620 494
 
495
+export function GetSummaryDetail(params) {
496
+  return request({
497
+    url: '/api/his/chargestatistics/detail',
498
+    method: 'get',
499
+    params: params
500
+  })
501
+}
621 502
 
622
-export function  HopitalunRefund(params) {
503
+export function GetSummary(params) {
623 504
   return request({
624
-    url: "/api/hospital/refund",
625
-    method: "get",
626
-    params:params,
627
-  });
505
+    url: '/api/his/chargestatistics/summary',
506
+    method: 'get',
507
+    params: params
508
+  })
628 509
 }
629 510
 
511
+export function GetSummarySettle(params) {
512
+  return request({
513
+    url: '/api/his/chargestatistics/settle',
514
+    method: 'get',
515
+    params: params
516
+  })
517
+}

+ 2 - 0
src/lang/zh.js Visa fil

@@ -258,6 +258,8 @@ export default {
258 258
     hospitalRecord:"住院登记",
259 259
     hisTool:"HIS工具",
260 260
     hospitalCharges:'住院收费',
261
+
262
+    summary_tool:'项目消费明细汇总'
261 263
   },
262 264
   navbar: {
263 265
     logOut: '退出登录',

+ 5 - 0
src/router/modules/hisTool.js Visa fil

@@ -34,6 +34,11 @@ export default {
34 34
       component: () => import('@/xt_pages/outpatientRecord/outpatientRecord'),
35 35
       name: 'outpatientSickRecord',
36 36
       meta: { title: 'outpatientSickRecord', noCache: true }
37
+    },{
38
+      path: '/hisTool/summary',
39
+      component: () => import('@/xt_pages/outpatientTool/summary'),
40
+      name: 'outpatientSickRecord',
41
+      meta: { title: 'summary_tool', noCache: true }
37 42
     },
38 43
 
39 44
   ]

+ 393 - 238
src/xt_pages/hospitalStation/components/prescriptionTable.vue Visa fil

@@ -1,6 +1,7 @@
1 1
 <template>
2 2
   <div class="prescriptionTable">
3
-    <el-table v-if="activeType  == 1" :data="prescription.advices" border style="width: 99%;" :row-style="{ color: '#303133' }"
3
+    <el-table v-if="activeType  == 1" :data="prescription.advices" border style="width: 99%;"
4
+              :row-style="{ color: '#303133' }"
4 5
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
5 6
       <el-table-column align="center" prop="day" width="70" label="序号">
6 7
         <template slot-scope="scope">
@@ -9,15 +10,27 @@
9 10
           </div>
10 11
         </template>
11 12
       </el-table-column>
13
+
14
+
12 15
       <el-table-column align="center" prop="drug_name" label="名称">
13
-        <template slot-scope="scope"><span :title="scope.row.drug_name">{{ scope.row.drug_name }}</span></template>
16
+        <template slot-scope="scope"><span :title="scope.row.drug_name">{{ scope.row.drug_name }}</span>
17
+        </template>
14 18
       </el-table-column>
15 19
 
16
-      <el-table-column align="center" prop="single_dose" width="90" label="单次用量">
20
+
21
+      <el-table-column align="center" prop="single_dose" width="120" label="单次用量">
17 22
         <template slot-scope="scope">
18 23
           <div style="display:flex;align-items:center;">
19
-            <el-input v-model="scope.row.single_dose" @input="getSingleDose(scope)" style="width:65%;"></el-input>
20
-            <div>{{scope.row.single_dose_unit}}</div>
24
+            <el-input v-model="scope.row.single_dose" @input="getAllChange(scope)"
25
+                      style="width:50%;"></el-input>
26
+            <!-- <div>{{scope.row.single_dose_unit}}</div> -->
27
+            <el-select v-model="scope.row.single_dose_unit" placeholder="请选择" style="width:50%;"
28
+                       @change="getAllChange(scope)">
29
+              <el-option :label="scope.row.drug.min_unit" :value="scope.row.drug.min_unit"></el-option>
30
+              <el-option :label="scope.row.drug.dose_unit"
31
+                         v-if="scope.row.drug.dose_unit != scope.row.drug.min_unit"
32
+                         :value="scope.row.drug.dose_unit"></el-option>
33
+            </el-select>
21 34
           </div>
22 35
         </template>
23 36
       </el-table-column>
@@ -25,51 +38,71 @@
25 38
         <template slot-scope="scope">
26 39
           <el-select v-model="scope.row.delivery_way" placeholder="请选择">
27 40
             <el-option
28
-              v-for="(item,index) in drugways"
29
-              :key="index"
30
-              :label="item.name"
31
-              :value="item.name">
41
+                    v-for="(item,index) in drugways"
42
+                    :key="index"
43
+                    :label="item.name"
44
+                    :value="item.name">
32 45
             </el-option>
33 46
           </el-select>
34 47
         </template>
35 48
       </el-table-column>
36 49
       <el-table-column align="center" prop="execution_frequency" width="100" label="频率">
37 50
         <template slot-scope="scope">
38
-          <el-select v-model="scope.row.execution_frequency" placehold er="请选择">
51
+          <el-select v-model="scope.row.execution_frequency" placeholder="请选择" @change="getAllChange(scope)">
39 52
             <el-option
40
-              v-for="item,index in efs"
41
-              :key="index"
42
-              :label="item.name"
43
-              :value="item.name">
53
+                    v-for="item,index in efs"
54
+                    :key="index"
55
+                    :label="item.name"
56
+                    :value="item.name">
44 57
             </el-option>
45 58
           </el-select>
46 59
         </template>
47 60
       </el-table-column>
48 61
 
49 62
 
50
-      <el-table-column align="center" prop="day" width="50" label="天数">
63
+      <el-table-column align="center" prop="day" width="70" label="天数">
51 64
         <template slot-scope="scope">
52
-          <el-input v-model="scope.row.day" @input="getDay(scope)" placeholder=""></el-input>
53
-          <div>{{'天'}}</div>
54
-
65
+          <div style="display:flex;align-items:center;">
66
+            <el-input v-model="scope.row.day" @input="getAllChange(scope)" placeholder=""></el-input>
67
+            {{'天'}}
68
+          </div>
55 69
         </template>
56 70
       </el-table-column>
57 71
 
58
-      <el-table-column align="center" prop="prescribing_number" width="80" label="总量">
72
+      <el-table-column align="center" prop="prescribing_number" width="120" label="总量">
59 73
         <template slot-scope="scope">
60 74
           <div style="display:flex;align-items:center;">
61
-            <el-input v-model="scope.row.prescribing_number" style="width:60%" placeholder=""></el-input>
62
-            <div> {{scope.row.prescribing_number_unit}}</div>
75
+            <el-input v-model="scope.row.prescribing_number" @input="changePrescribingNumber(scope)"
76
+                      style="width:50%" placeholder=""></el-input>
77
+            <!-- <div> {{scope.row.prescribing_number_unit}}</div> -->
78
+            <el-select v-model="scope.row.prescribing_number_unit" placeholder="请选择" style="width:50%;"
79
+                       @change="getPrescribingNumberUnit(scope)">
80
+              <el-option :label="scope.row.drug.min_unit" :value="scope.row.drug.min_unit"></el-option>
81
+              <el-option :label="scope.row.drug.max_unit"
82
+                         v-if="scope.row.drug.min_unit != scope.row.drug.max_unit"
83
+                         :value="scope.row.drug.max_unit"></el-option>
84
+            </el-select>
63 85
           </div>
64 86
         </template>
65 87
       </el-table-column>
66
-      <el-table-column align="center" prop="retail_price" width="60" label="单价">
88
+      <el-table-column align="center" prop="retail_price" width="80" label="单价">
67 89
         <template slot-scope="scope">
68
-          <el-input v-model="scope.row.retail_price" placeholder="" readonly></el-input>
69
-          <div>{{'元'}}</div>
90
+          <div style="display:flex;align-items:center;">
91
+            <el-input v-model="scope.row.retail_price" placeholder="" readonly></el-input>
92
+            <div>{{'元'}}</div>
93
+          </div>
70 94
 
71 95
         </template>
72 96
       </el-table-column>
97
+      <el-table-column align="center" prop="hosp_appr_flag" width="100" label="医院审批标志">
98
+        <template slot-scope="scope">
99
+          <el-select v-model="scope.row.hosp_appr_flag" placeholder="请选择">
100
+            <el-option label="审批通过" value="1"></el-option>
101
+            <el-option label="无须审批" value="3"></el-option>
102
+            <el-option label="审批不通过" value="2"></el-option>
103
+          </el-select>
104
+        </template>
105
+      </el-table-column>
73 106
       <el-table-column align="center" prop="remark" width="50" label="备注">
74 107
         <template slot-scope="scope">
75 108
           <el-input v-model="scope.row.remark" :title="scope.row.remark" placeholder=""></el-input>
@@ -81,19 +114,27 @@
81 114
         </template>
82 115
       </el-table-column>
83 116
     </el-table>
84
-    <el-table v-if="activeType == 2" :data="prescription.project" border style="width: 99%;" :row-style="{ color: '#303133' }"
117
+
118
+    <el-table v-if="activeType == 2" :data="prescription.project" border style="width: 99%;"
119
+              :row-style="{ color: '#303133' }"
85 120
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
86 121
       <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
87 122
       <el-table-column align="center" prop="project_name" label="名称">
88
-        <template slot-scope="scope"><span :title="scope.row.project_name">{{ scope.row.project_name }}</span></template>
123
+        <template slot-scope="scope"><span :title="scope.row.project_name">{{ scope.row.project_name }}</span>
124
+        </template>
89 125
       </el-table-column>
90 126
       <el-table-column align="center" prop="statistical_classification" width="100" label="组">
91
-        <template slot-scope="scope">{{scope.row.type == 2?getGroup(scope.row.statistical_classification):"耗材"}}</template>
127
+        <template slot-scope="scope">{{scope.row.type ==
128
+          2?getGroup(scope.row.statistical_classification):'耗材'}}
129
+        </template>
92 130
       </el-table-column>
93 131
       <el-table-column align="center" prop="single_dose" width="80" label="单次用量">
94 132
         <template slot-scope="scope">
95
-          <el-input v-model="scope.row.single_dose" @input="getProjectSingleDose(scope)" placeholder=""></el-input>
96
-          <div>{{scope.row.unit}}</div>
133
+          <div style="display:flex;align-items:center;">
134
+            <el-input v-model="scope.row.single_dose" @input="getProjectSingleDose(scope)"
135
+                      placeholder=""></el-input>
136
+            <div>{{scope.row.unit}}</div>
137
+          </div>
97 138
 
98 139
         </template>
99 140
       </el-table-column>
@@ -110,13 +151,15 @@
110 151
       </el-table-column>
111 152
       <el-table-column align="center" prop="execution_frequency" width="80" label="频率">
112 153
         <template slot-scope="scope">
113
-          <el-input v-model="scope.row.execution_frequency" placeholder=""></el-input>
154
+          <el-input v-model="scope.row.execution_frequency" @input="getProjectSingleDose(scope)"
155
+                    placeholder=""></el-input>
114 156
         </template>
115 157
       </el-table-column>
116 158
       <el-table-column align="center" prop="number_days" width="70" label="天数">
117 159
         <template slot-scope="scope">
118 160
           <div style="display:flex;align-items:center;">
119
-            <el-input v-model="scope.row.number_days" @input="getProjectDay(scope)" placeholder=""></el-input>
161
+            <el-input v-model="scope.row.number_days" @input="getProjectSingleDose(scope)"
162
+                      placeholder=""></el-input>
120 163
             <div>{{'天'}}</div>
121 164
           </div>
122 165
         </template>
@@ -130,10 +173,12 @@
130 173
           </div>
131 174
         </template>
132 175
       </el-table-column>
133
-      <el-table-column align="center" prop="name" width="50" label="单价">
176
+      <el-table-column align="center" prop="name" width="70" label="单价">
134 177
         <template slot-scope="scope">
135
-          <el-input v-model="scope.row.price" placeholder="" readonly></el-input>
136
-          <div>{{'元'}}</div>
178
+          <div style="display:flex;align-items:center;">
179
+            <el-input v-model="scope.row.price" placeholder="" readonly></el-input>
180
+            <div>{{'元'}}</div>
181
+          </div>
137 182
 
138 183
         </template>
139 184
       </el-table-column>
@@ -161,35 +206,34 @@
161 206
     </div>
162 207
 
163 208
 
164
-
165 209
   </div>
166 210
 </template>
167 211
 
168 212
 <script>
169
-  import { getDictionaryDataConfig} from "@/utils/data";
170
-  import { getInitData,delHisAdvice,delHisProject,delHisAddition } from '@/api/his/his'
213
+  import { getDictionaryDataConfig } from '@/utils/data'
214
+  import { delHisAddition, delHisAdvice, delHisProject, getInitData } from '@/api/his/his'
171 215
 
172 216
   export default {
173 217
     props: {
174 218
       preDrugs: Array,
175 219
       activeType: Number,
176
-      addtions_charge:Array,
177
-      prescription:{
178
-        type:Object,
179
-        default: function () {
220
+      addtions_charge: Array,
221
+      prescription: {
222
+        type: Object,
223
+        default: function() {
180 224
           return {
181
-            name:"",
182
-            advices:[],
183
-            project:[],
184
-            drugways:[],
185
-            efs:[],
186
-          };
225
+            name: '',
226
+            advices: [],
227
+            project: [],
228
+            drugways: [],
229
+            efs: []
230
+          }
187 231
         }
188
-      },
232
+      }
189 233
     },
190 234
     data() {
191 235
       return {
192
-        advices:[],
236
+        advices: [],
193 237
         tableData: [],
194 238
         newoptions: [{
195 239
           value: '1',
@@ -209,128 +253,126 @@
209 253
         }],
210 254
         value: '1',
211 255
         input: 1,
256
+        efs: [],
257
+        drugways: []
212 258
       }
213 259
     },
214 260
 
215
-   methods:{
216
-     createFilter(queryString) {
217
-       return (restaurant) => {
218
-         return (restaurant.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0)
219
-       }
220
-     },
221
-     querySearch2(queryString, cb) {
222
-       var restaurants = this.getDictionaryDataConfig("system","project_use");
223
-       restaurants.map(item => {
224
-         item.value = item.name
225
-       });
226
-       var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
227
-       // 调用 callback 返回建议列表的数据
228
-       cb(results)
229
-     },
230
-     delAddition(index, addition){
231
-       if(this.prescription.order_status == 2){
232
-         this.$message.error('该处方已经结算,无法删除');
233
-         return
234
-       }
235
-       this.$confirm("附加费删除后不可恢复,是否确认删除", "删除", {
236
-         confirmButtonText: "确 定",
237
-         cancelButtonText: "取 消",
238
-         type: "warning"
239
-       }).then(() => {
240
-         this.$nextTick(function(){
241
-           if(addition.id == 0){
242
-             this.prescription.addition.splice(index, 1)
243
-           }else{
244
-             let params = {
245
-               'id': addition.id,
246
-             };
247
-             delHisAddition(params).then(response => {
248
-               if (response.data.state == 0) {
249
-                 this.$message.error(response.data.msg);
250
-                 return false
251
-               } else {
252
-                 var temp2 = this.deepClone(this.prescription.addition);
253
-                 temp2.splice(index, 1);
254
-                 this.prescription.addition = temp2;
255
-                 this.$message.success(response.data.data.msg)
256
-               }
257
-             })
258
-           }
259
-         });
260
-
261
-       })
262
-         .catch(() => {});
263
-
264
-     },
265
-      getInitData(){
261
+    methods: {
262
+      createFilter(queryString) {
263
+        return (restaurant) => {
264
+          return (restaurant.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0)
265
+        }
266
+      },
267
+      querySearch2(queryString, cb) {
268
+        var restaurants = this.getDictionaryDataConfig('system', 'project_use')
269
+        restaurants.map(item => {
270
+          item.value = item.name
271
+        })
272
+        var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants
273
+        // 调用 callback 返回建议列表的数据
274
+        cb(results)
275
+      },
276
+      delAddition(index, addition) {
277
+        if (this.prescription.order_status == 2) {
278
+          this.$message.error('该处方已经结算,无法删除')
279
+          return
280
+        }
281
+        this.$confirm('附加费删除后不可恢复,是否确认删除', '删除', {
282
+          confirmButtonText: '确 定',
283
+          cancelButtonText: '取 消',
284
+          type: 'warning'
285
+        }).then(() => {
286
+          this.$nextTick(function() {
287
+            if (addition.id == 0) {
288
+              this.prescription.addition.splice(index, 1)
289
+            } else {
290
+              let params = {
291
+                'id': addition.id
292
+              }
293
+              delHisAddition(params).then(response => {
294
+                if (response.data.state == 0) {
295
+                  this.$message.error(response.data.msg)
296
+                  return false
297
+                } else {
298
+                  var temp2 = this.deepClone(this.prescription.addition)
299
+                  temp2.splice(index, 1)
300
+                  this.prescription.addition = temp2
301
+                  this.$message.success(response.data.data.msg)
302
+                }
303
+              })
304
+            }
305
+          })
306
+
307
+        })
308
+                .catch(() => {
309
+                })
310
+
311
+      },
312
+      getInitData() {
266 313
         getInitData().then(response => {
267 314
           if (response.data.state == 0) {
268
-            this.$message.error(response.data.msg);
315
+            this.$message.error(response.data.msg)
269 316
             return false
270 317
           } else {
271
-            this.drugways = response.data.data.drugways;
318
+            this.drugways = response.data.data.drugways
272 319
             this.efs = response.data.data.efs
273 320
           }
274 321
         })
275 322
 
276
-      },deleteDrug:function(index, row){
277
-       if(this.prescription.order_status == 2){
278
-         this.$message.error('该处方已经结算,无法删除');
279
-         return
280
-       }
281
-       this.$confirm("药品删除后不可恢复,是否确认删除", "删除", {
282
-         confirmButtonText: "确 定",
283
-         cancelButtonText: "取 消",
284
-         type: "warning"
285
-       }).then(() => {
286
-         this.$nextTick(function(){
287
-           if(row.advice_id == 0){
288
-             this.prescription.advices.splice(index, 1)
289
-           }else{
290
-             let params = {
291
-               'id': row.advice_id,
292
-             };
293
-             delHisAdvice(params).then(response => {
294
-               if (response.data.state == 0) {
295
-                 this.$message.error(response.data.msg);
296
-                 return false
297
-               } else {
298
-                 var temp2 = this.deepClone(this.prescription.advices);
299
-                 temp2.splice(index, 1);
300
-                 this.prescription.advices = temp2;
301
-                 this.$message.success(response.data.data.msg)
302
-               }
303
-             })
304
-
305
-
306
-           }
307
-
308
-         });
309
-
310
-
311
-       })
312
-         .catch(() => {});
313
-
314
-
315
-
316
-
317
-
318
-      },deepClone(source) {
319
-       if (!source && typeof source !== 'object') {
320
-         throw new Error('error arguments', 'shallowClone')
321
-       }
322
-       const targetObj = source.constructor === Array ? [] : {};
323
-       Object.keys(source).forEach((keys) => {
324
-         if (source[keys] && typeof source[keys] === 'object') {
325
-           targetObj[keys] = this.deepClone(source[keys])
326
-         } else {
327
-           targetObj[keys] = source[keys]
328
-         }
329
-       });
330
-       return targetObj
331
-     },
332
-
333
-      setNewData:function(data){
323
+      }, deleteDrug: function(index, row) {
324
+        if (this.prescription.order_status == 2) {
325
+          this.$message.error('该处方已经结算,无法删除')
326
+          return
327
+        }
328
+        this.$confirm('药品删除后不可恢复,是否确认删除', '删除', {
329
+          confirmButtonText: '确 定',
330
+          cancelButtonText: '取 消',
331
+          type: 'warning'
332
+        }).then(() => {
333
+          this.$nextTick(function() {
334
+            if (row.advice_id == 0) {
335
+              this.prescription.advices.splice(index, 1)
336
+            } else {
337
+              let params = {
338
+                'id': row.advice_id
339
+              }
340
+              delHisAdvice(params).then(response => {
341
+                if (response.data.state == 0) {
342
+                  this.$message.error(response.data.msg)
343
+                  return false
344
+                } else {
345
+                  var temp2 = this.deepClone(this.prescription.advices)
346
+                  temp2.splice(index, 1)
347
+                  this.prescription.advices = temp2
348
+                  this.$message.success(response.data.data.msg)
349
+                }
350
+              })
351
+
352
+            }
353
+
354
+          })
355
+
356
+        })
357
+                .catch(() => {
358
+                })
359
+
360
+      }, deepClone(source) {
361
+        if (!source && typeof source !== 'object') {
362
+          throw new Error('error arguments', 'shallowClone')
363
+        }
364
+        const targetObj = source.constructor === Array ? [] : {}
365
+        Object.keys(source).forEach((keys) => {
366
+          if (source[keys] && typeof source[keys] === 'object') {
367
+            targetObj[keys] = this.deepClone(source[keys])
368
+          } else {
369
+            targetObj[keys] = source[keys]
370
+          }
371
+        })
372
+        return targetObj
373
+      },
374
+
375
+      setNewData: function(data) {
334 376
         this.prescription = data
335 377
 
336 378
         // this.prescription.advices = data.advices
@@ -338,41 +380,41 @@
338 380
       getDictionaryDataConfig(module, filed_name) {
339 381
         return getDictionaryDataConfig(module, filed_name)
340 382
       },
341
-      getGroup(id){
342
-         var name = "";
343
-          var statistics_category =  getDictionaryDataConfig('system','statistics_category');
344
-          console.log("2235",statistics_category);
345
-          for(let i=0;i<statistics_category.length;i++){
346
-             if(id == statistics_category[i].id){
347
-                 name = statistics_category[i].name
348
-             }
383
+      getGroup(id) {
384
+        var name = ''
385
+        var statistics_category = getDictionaryDataConfig('system', 'statistics_category')
386
+        console.log('2235', statistics_category)
387
+        for (let i = 0; i < statistics_category.length; i++) {
388
+          if (id == statistics_category[i].id) {
389
+            name = statistics_category[i].name
349 390
           }
350
-         return name
391
+        }
392
+        return name
351 393
       },
352
-      deleteProject(row,i){
353
-        if(this.prescription.order_status == 2){
354
-          this.$message.error('该处方已经结算,无法删除');
394
+      deleteProject(row, i) {
395
+        if (this.prescription.order_status == 2) {
396
+          this.$message.error('该处方已经结算,无法删除')
355 397
           return
356 398
         }
357
-        this.$confirm("项目删除后不可恢复,是否确认删除", "删除", {
358
-          confirmButtonText: "确 定",
359
-          cancelButtonText: "取 消",
360
-          type: "warning"
399
+        this.$confirm('项目删除后不可恢复,是否确认删除', '删除', {
400
+          confirmButtonText: '确 定',
401
+          cancelButtonText: '取 消',
402
+          type: 'warning'
361 403
         }).then(() => {
362
-          if(row.id == 0){
404
+          if (row.id == 0) {
363 405
             this.prescription.project.splice(i, 1)
364 406
 
365
-          }else{
407
+          } else {
366 408
             let params = {
367
-              'id': row.id,
368
-            };
409
+              'id': row.id
410
+            }
369 411
             delHisProject(params).then(response => {
370 412
               if (response.data.state == 0) {
371
-                this.$message.error(response.data.msg);
413
+                this.$message.error(response.data.msg)
372 414
                 return false
373 415
               } else {
374
-                for (let i = 0; i < this.prescription.project.length; i++){
375
-                  if(this.prescription.project[i].id == row.id){
416
+                for (let i = 0; i < this.prescription.project.length; i++) {
417
+                  if (this.prescription.project[i].id == row.id) {
376 418
                     this.prescription.project.splice(i, 1)
377 419
                   }
378 420
                 }
@@ -381,39 +423,146 @@
381 423
             })
382 424
           }
383 425
         })
384
-          .catch(() => {});
426
+                .catch(() => {
427
+                })
385 428
 
386 429
       },
387
-      getSingleDose(scope){
388
-        this.prescription.advices[scope.$index].prescribing_number = scope.row.single_dose * scope.row.day
430
+      getAllChange(scope) {
431
+        if (scope.row.drug.min_unit == scope.row.single_dose_unit) {
432
+          if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
433
+            console.log(1)
434
+            scope.row.prescribing_number = scope.row.single_dose * (scope.row.execution_frequency ? this.getNum(scope.row.execution_frequency) : 1) * (scope.row.day ? scope.row.day : 1)
435
+          } else {
436
+            console.log(12)
437
+            scope.row.prescribing_number = Math.ceil((scope.row.single_dose * (scope.row.execution_frequency ? this.getNum(scope.row.execution_frequency) : 1)) * (scope.row.day ? scope.row.day : 1) / scope.row.drug.min_number)
438
+          }
439
+        } else {
440
+          if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
441
+            console.log(123)
442
+            scope.row.prescribing_number = Math.ceil((scope.row.single_dose * (scope.row.execution_frequency ? this.getNum(scope.row.execution_frequency) : 1) * (scope.row.day ? scope.row.day : 1)) / scope.row.drug.dose)
443
+          } else {
444
+            console.log(1234)
445
+            scope.row.prescribing_number = Math.ceil((scope.row.single_dose * (scope.row.execution_frequency ? this.getNum(scope.row.execution_frequency) : 1) * (scope.row.day ? scope.row.day : 1)) / scope.row.drug.dose / scope.row.drug.min_number)
446
+          }
447
+        }
448
+        if (scope.row.prescribing_number == 0) {
449
+          scope.row.prescribing_number = 1
450
+        }
451
+        if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
452
+          // scope.row.retail_price = scope.row.drug.min_number / scope.row.retail_price
453
+          if (scope.row.prescribing_number > scope.row.drug.total) {
454
+            this.$message.error(scope.row.drug_name + '库存不足')
455
+          }
456
+        } else {
457
+          if ((parseInt(scope.row.prescribing_number) * scope.row.drug.min_number) > scope.row.drug.total) {
458
+            this.$message.error(scope.row.drug_name + '库存不足')
459
+          }
460
+          // scope.row.retail_price = scope.row.drug.retail_price * scope.row.prescribing_number
461
+        }
462
+
389 463
       },
390
-      getDay(scope){
391
-        this.prescription.advices[scope.$index].prescribing_number = scope.row.single_dose * scope.row.day
464
+      getPrescribingNumberUnit(scope) {
465
+
466
+        // console.log('scope',scope)
467
+        // if(scope.row.drug.min_unit == scope.row.single_dose_unit){
468
+        //   if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
469
+        //     scope.row.prescribing_number = scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day
470
+        //   }else{
471
+        //     scope.row.prescribing_number = Math.ceil((scope.row.single_dose * this.getNum(scope.row.execution_frequency)) * scope.row.day / scope.row.drug.min_number)
472
+        //   }
473
+        // }else{
474
+        //   if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
475
+        //     scope.row.prescribing_number = Math.ceil((scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day) / scope.row.drug.dose)
476
+        //   }else{
477
+        //     scope.row.prescribing_number = Math.ceil((scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day) / scope.row.drug.dose / scope.row.drug.min_number)
478
+        //   }
479
+        // }
480
+        // if(scope.row.prescribing_number == 0){
481
+        //   scope.row.prescribing_number = 1
482
+        // }
483
+        if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
484
+          scope.row.retail_price = scope.row.drug.min_price
485
+          if (scope.row.prescribing_number > scope.row.drug.total) {
486
+            this.$message.error(scope.row.drug_name + '库存不足')
487
+          }
488
+        } else {
489
+          if ((parseInt(scope.row.prescribing_number) * scope.row.drug.min_number) > scope.row.drug.total) {
490
+            this.$message.error(scope.row.drug_name + '库存不足')
491
+          }
492
+          scope.row.retail_price = scope.row.drug.retail_price
493
+        }
392 494
       },
393
-      getProjectSingleDose(scope){
394
-        this.prescription.project[scope.$index].total = scope.row.single_dose * scope.row.number_days
495
+      changePrescribingNumber(scope) {
496
+        if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
497
+          if (parseInt(scope.row.prescribing_number) > scope.row.drug.total) {
498
+            this.$message.error(scope.row.drug_name + '库存不足')
499
+          }
500
+        } else {
501
+          if ((parseInt(scope.row.prescribing_number) * scope.row.drug.min_number) > scope.row.drug.total) {
502
+            this.$message.error(scope.row.drug_name + '库存不足')
503
+          }
504
+        }
505
+      },
506
+      getProjectSingleDose(scope) {
507
+        this.prescription.project[scope.$index].total = scope.row.single_dose * (scope.row.execution_frequency ? this.getNum(scope.row.execution_frequency) : 1) * (scope.row.number_days ? scope.row.number_days : 1)
508
+        if (this.prescription.project[scope.$index].total == 0) {
509
+          this.prescription.project[scope.$index].total = 1
510
+        }
395 511
       },
396
-      getProjectDay(scope){
512
+      getProjectDay(scope) {
397 513
         this.prescription.project[scope.$index].total = scope.row.single_dose * scope.row.number_days
514
+        if (this.prescription.project[scope.$index].total == 0) {
515
+          this.prescription.project[scope.$index].total = 1
516
+        }
517
+
518
+      },
519
+      getNum(execution_frequency) {
520
+        let arr = [
521
+          { name: '立即执行', count: 1 },
522
+          { name: '透析时', count: 1 },
523
+          { name: '透析1h一次', count: 1 },
524
+          { name: '透析2h一次', count: 1 },
525
+          { name: '透析3h一次', count: 1 },
526
+          { name: '每日一次', count: 1 },
527
+          { name: '每日两次', count: 2 },
528
+          { name: '每日三次', count: 3 },
529
+          { name: '每晚一次', count: 1 },
530
+          { name: '每晚', count: 1 },
531
+          { name: '上机前', count: 1 },
532
+          { name: '下机前', count: 1 },
533
+          { name: '透析后立即', count: 1 },
534
+          { name: '持续使用', count: 1 },
535
+          { name: '临时开药', count: 1 },
536
+          { name: '临睡前', count: 1 },
537
+          { name: '隔日一次', count: 1 },
538
+          { name: '隔三日一次', count: 1 },
539
+          { name: '每二小时一次', count: 12 },
540
+          { name: '每四小时一次', count: 6 },
541
+          { name: '每六小时一次', count: 4 },
542
+          { name: '每八小时一次', count: 3 }
543
+        ]
544
+        let num = ''
545
+        arr.map(item => {
546
+          if (item.name == execution_frequency) {
547
+            num = item.count
548
+          }
549
+        })
550
+        if (num == '') {
551
+          num = 1
552
+        }
553
+        return num
398 554
       }
399
-    },mounted(){
555
+    }, mounted() {
400 556
       this.getInitData()
401 557
 
402 558
     },
403
-    watch:{
404
-      // "prescription.advices":{
405
-      //   handler(newVal,oldVal){
406
-      //     newVal.map(item => {
407
-      //       item.prescribing_number = item.single_dose * item.day
408
-      //       if(item.single_dose != oldVal[index].single_dose || item.number_days != oldVal[index].number_days){
409
-      //         item.total = item.single_dose * item.number_days
410
-      //       }
559
+    watch: {
560
+      'prescription.advices': {
561
+        handler(newVal, oldVal) {
411 562
 
412
-
413
-      //     })
414
-      //   },
415
-      //   deep:true
416
-      // },
563
+        },
564
+        deep: true
565
+      }
417 566
       // "prescription.project":{
418 567
       //   handler(newVal,oldVal){
419 568
       //     newVal.map((item,index) => {
@@ -432,40 +581,46 @@
432 581
 
433 582
 <style lang="scss">
434 583
   .prescriptionTable {
435
-    .el-input__inner{
436
-      padding: 0 5px;
437
-    }
438
-    .additionalBox{
439
-      margin-top: 20px;
440
-      display: flex;
441
-      flex-wrap: wrap;
442
-      .additionalOne{
443
-        margin-right:20px;
444
-        margin-bottom:10px;
445
-        display: flex;
446
-        align-items: center;
447
-        >span{
448
-          white-space: nowrap;
449
-          overflow: hidden;
450
-          text-overflow: ellipsis;
451
-          width:80px;
452
-          display: inline-block;
453
-          font-size: 14px;
454
-        }
455
-      }
456
-      .deleteIcon{
457
-        color:red;
458
-        margin-left:5px;
459
-      }
460
-    }
461
-    .el-table th .cell, .el-table td .cell {
462
-      padding: 0 2px;
463
-      white-space: pre-line;
464
-    }
465 584
 
466
-    .el-icon-delete {
467
-      color: red;
468
-    }
585
+  .el-input__inner {
586
+    padding: 0 5px;
587
+  }
588
+
589
+  .additionalBox {
590
+    margin-top: 20px;
591
+    display: flex;
592
+    flex-wrap: wrap;
593
+
594
+  .additionalOne {
595
+    margin-right: 20px;
596
+    margin-bottom: 10px;
597
+    display: flex;
598
+    align-items: center;
599
+
600
+  > span {
601
+    white-space: nowrap;
602
+    overflow: hidden;
603
+    text-overflow: ellipsis;
604
+    width: 80px;
605
+    display: inline-block;
606
+    font-size: 14px;
607
+  }
608
+
609
+  }
610
+  .deleteIcon {
611
+    color: red;
612
+    margin-left: 5px;
613
+  }
614
+
615
+  }
616
+  .el-table th .cell, .el-table td .cell {
617
+    padding: 0 2px;
618
+    white-space: pre-line;
619
+  }
620
+
621
+  .el-icon-delete {
622
+    color: red;
623
+  }
469 624
 
470 625
   }
471 626
 </style>

+ 12 - 10
src/xt_pages/hospitalStation/doctorDesk.vue Visa fil

@@ -26,14 +26,14 @@
26 26
                     <p style="font-size:14px;">未就诊:<span>{{cal_one}}</span>人</p>
27 27
                     <p style="font-size:14px;">已就诊:<span>{{cal_two}}</span>人</p>
28 28
                 </div>
29
-                <!--<div class="mainCell">-->
30
-                    <!--<el-radio-group v-model="schedule_type" @change="changeScheduleType">-->
31
-                        <!--<el-radio :label="1">上午</el-radio>-->
32
-                        <!--<el-radio :label="2">下午</el-radio>-->
33
-                        <!--<el-radio :label="3">晚上</el-radio>-->
34
-                        <!--<el-radio :label="0">全部</el-radio>-->
35
-                    <!--</el-radio-group>-->
36
-                <!--</div>-->
29
+                <div class="mainCell">
30
+                    <el-radio-group v-model="schedule_type" @change="changeScheduleType">
31
+                        <el-radio :label="1">上午</el-radio>
32
+                        <el-radio :label="2">下午</el-radio>
33
+                        <el-radio :label="3">晚上</el-radio>
34
+                        <el-radio :label="0">全部</el-radio>
35
+                    </el-radio-group>
36
+                </div>
37 37
                 <div class="mainCell">
38 38
                     <el-radio-group v-model="radio" @change="change">
39 39
                         <el-radio :label="1">未就诊</el-radio>
@@ -347,7 +347,7 @@
347 347
         schedule_type: 0,
348 348
         record_date: '',
349 349
         crumbs: [
350
-          { path: false, name: '门诊医生站' },
350
+          { path: false, name: '住院医生站' },
351 351
           { path: false, name: '医生工作台' }
352 352
         ],
353 353
         titleType: '电子处方',
@@ -1116,7 +1116,9 @@
1116 1116
                     id: prescription.advices[b].drug_id,
1117 1117
                     drug: prescription.advices[b].drug,
1118 1118
                     groupno: prescription.advices[b].groupno,
1119
-                    hosp_appr_flag: prescription.advices[b].hosp_appr_flag.toString()
1119
+                    hosp_appr_flag: prescription.advices[b].hosp_appr_flag.toString(),
1120
+
1121
+
1120 1122
 
1121 1123
                   }
1122 1124
                   tempAdvice.push(obj)

+ 3 - 18
src/xt_pages/outpatientCharges/components/registerDialog.vue Visa fil

@@ -309,26 +309,11 @@
309 309
           label: '港澳地区身份证'
310 310
         }],
311 311
         medicalCare: [{
312
-          value: 1,
313
-          label: '职工基本医疗保险'
314
-        }, {
315
-          value: 2,
316
-          label: '公务员医疗补助'
317
-        }, {
318
-          value: 3,
319
-          label: '大额医疗费用补助'
320
-        }, {
321
-          value: 4,
322
-          label: '离休人员医疗'
323
-        }, {
324
-          value: 5,
312
+          value: 390,
325 313
           label: '城乡居民基本医疗保险'
326 314
         }, {
327
-          value: 6,
328
-          label: '城乡居民大病医疗保险'
329
-        }, {
330
-          value: 7,
331
-          label: '生育保险'
315
+          value: 310,
316
+          label: '职工基本医疗保险'
332 317
         }],
333 318
         register: [{
334 319
           value: 1,

+ 1 - 1
src/xt_pages/outpatientCharges/listTemplate/printTwo.vue Visa fil

@@ -251,7 +251,7 @@ export default {
251 251
                     }else if(item.med_chrgitm_type == '11'){
252 252
                         obj.med_chrgitm_type11.push(item)
253 253
                         this.price11 += item.det_item_fee_sumamt
254
-                    }else if(item.med_chrgitm_type == '14'){
254
+                    }else if(item.med_chrgitm_type == '14' || item.med_chrgitm_type == '02' ){
255 255
                         obj.med_chrgitm_type14.push(item)
256 256
                         this.price14 += item.det_item_fee_sumamt
257 257
                     }

+ 4 - 20
src/xt_pages/outpatientRegistration/index.vue Visa fil

@@ -549,28 +549,12 @@
549 549
           label: '电子凭证'
550 550
         }],
551 551
         medicalCare: [{
552
-          value: 1,
553
-          label: '职工基本医疗保险'
554
-        }, {
555
-          value: 2,
556
-          label: '公务员医疗补助'
557
-        }, {
558
-          value: 3,
559
-          label: '大额医疗费用补助'
560
-        }, {
561
-          value: 4,
562
-          label: '离休人员医疗'
563
-        }, {
564
-          value: 5,
552
+          value: 390,
565 553
           label: '城乡居民基本医疗保险'
566 554
         }, {
567
-          value: 6,
568
-          label: '城乡居民大病医疗保险'
569
-        },
570
-          {
571
-            value: 7,
572
-            label: '生育保险'
573
-          }],
555
+          value: 310,
556
+          label: '职工基本医疗保险'
557
+        }],
574 558
         his_registers: [{
575 559
           value: 1,
576 560
           label: '普通'

+ 13 - 0
src/xt_pages/outpatientTool/components/detail.vue Visa fil

@@ -0,0 +1,13 @@
1
+<template>
2
+
3
+
4
+</template>
5
+<script>
6
+  export default {
7
+    name: 'summaryDetail'
8
+  }
9
+</script>
10
+
11
+<style scoped>
12
+
13
+</style>

+ 13 - 0
src/xt_pages/outpatientTool/components/gather.vue Visa fil

@@ -0,0 +1,13 @@
1
+<template>
2
+
3
+</template>
4
+
5
+<script>
6
+  export default {
7
+    name: 'gather'
8
+  }
9
+</script>
10
+
11
+<style scoped>
12
+
13
+</style>

+ 13 - 0
src/xt_pages/outpatientTool/components/settle.vue Visa fil

@@ -0,0 +1,13 @@
1
+<template>
2
+
3
+</template>
4
+
5
+<script>
6
+  export default {
7
+    name: 'settle'
8
+  }
9
+</script>
10
+
11
+<style scoped>
12
+
13
+</style>

+ 312 - 0
src/xt_pages/outpatientTool/summary.vue Visa fil

@@ -0,0 +1,312 @@
1
+<template>
2
+    <div class="main-contain new-main-contain">
3
+        <div class="position">
4
+            <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+        </div>
6
+        <div class="app-container" style="display:flex;flex: 1;padding: 10px 20px 0px 20px;">
7
+
8
+            <div class="mainRight">
9
+                <div class="mainHeader">
10
+                    <el-tabs v-model="titleType" @tab-click="handleClick"
11
+                             style="position: fixed;width: calc(100% - 490px);background:#fff;">
12
+                        <el-tab-pane label="明细" name="明细"></el-tab-pane>
13
+                        <el-tab-pane label="汇总" name="汇总"></el-tab-pane>
14
+                        <el-tab-pane label="结算" name="结算"></el-tab-pane>
15
+                    </el-tabs>
16
+
17
+                </div>
18
+                <detail v-if="titleType == '明细'"></detail>
19
+                <settle v-if="titleType == '汇总'"></settle>
20
+                <gather v-if="titleType == '结算'"></gather>
21
+            </div>
22
+        </div>
23
+    </div>
24
+</template>
25
+
26
+<script>
27
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
28
+  import { getDictionaryDataConfig } from '@/utils/data'
29
+  import { uParseTime } from '@/utils/tools'
30
+  import { getPrescriptionList } from '@/api/project/project'
31
+  import SummaryDetail from '../outpatientCharges/summaryDetail'
32
+  import Settle from './components/settle'
33
+  import Gather from './components/gather'
34
+  import Detail from './components/detail'
35
+
36
+
37
+  const moment = require('moment')
38
+
39
+  export default {
40
+    components: {
41
+      Gather,
42
+      Settle,
43
+      Detail,
44
+      SummaryDetail,
45
+      BreadCrumb
46
+
47
+    },
48
+    data() {
49
+      return {
50
+        titleType: '明细'
51
+      }
52
+    },
53
+    methods: {},
54
+    created() {
55
+
56
+    },
57
+
58
+    mounted() {
59
+
60
+    },
61
+    watch: {}
62
+  }
63
+</script>
64
+
65
+<style lang="scss" scoped>
66
+    .new-main-contain {
67
+        height: 100%;
68
+        display: flex;
69
+        flex-direction: column;
70
+    }
71
+
72
+    .app-container {
73
+        height: 100%;
74
+    }
75
+
76
+    .mainCell {
77
+        height: 36px;
78
+        display: flex;
79
+        align-items: center;
80
+    }
81
+
82
+    .mainLeft {
83
+        width: 200px;
84
+        height: 100%;
85
+        display: flex;
86
+        flex-direction: column;
87
+
88
+    .el-radio {
89
+        margin-right: 5px;
90
+    }
91
+
92
+    }
93
+    .mainRight {
94
+        margin-left: 10px;
95
+        flex: 1;
96
+        height: 100%;
97
+        display: flex;
98
+        flex-direction: column;
99
+        overflow-y: auto;
100
+
101
+    .cellSpan {
102
+        min-width: 80px;
103
+        display: inline-block;
104
+        margin-right: 10px;
105
+    }
106
+
107
+    }
108
+    .mainCenter {
109
+        display: flex;
110
+        flex: 1;
111
+    }
112
+
113
+    .centerLeft {
114
+        flex: 1;
115
+        display: flex;
116
+        flex-direction: column;
117
+        position: relative;
118
+
119
+    .el-form-item {
120
+        width: 32%;
121
+        margin-right: 1%;
122
+        float: left;
123
+    }
124
+
125
+    .el-form-item__label {
126
+        text-align: left;
127
+    }
128
+
129
+    }
130
+    .backColor {
131
+        background: #f6f8f9;
132
+        height: 5px;
133
+        margin-bottom: 5px;
134
+    }
135
+
136
+    .tabsBox {
137
+        position: relative;
138
+        height: 76%;
139
+        overflow-y: auto;
140
+        margin-bottom: 60px;
141
+
142
+    .el-tabs__item {
143
+        padding: 0 10px;
144
+    }
145
+
146
+    }
147
+    .preTabs {
148
+        height: 100%;
149
+        display: flex;
150
+        flex-direction: column;
151
+
152
+    .el-tabs__content {
153
+        flex: 1;
154
+        overflow-y: auto;
155
+    }
156
+
157
+    }
158
+
159
+    .costBox {
160
+        width: 100%;
161
+        height: 60px;
162
+        background: #fff;
163
+        position: absolute;
164
+        bottom: 0;
165
+        display: flex;
166
+        align-items: center;
167
+    }
168
+
169
+    .addTab {
170
+        position: absolute;
171
+        right: 0;
172
+        top: 14px;
173
+        z-index: 20;
174
+    }
175
+
176
+    .centerRight {
177
+        width: 300px;
178
+        margin-left: 10px;
179
+        display: flex;
180
+        flex-direction: column;
181
+        position: relative;
182
+    }
183
+
184
+    .rightTab {
185
+        height: 40px;
186
+        width: 100%;
187
+        border: 1px solid #d2d2d2;
188
+        box-sizing: border-box;
189
+
190
+    p {
191
+        width: 50%;
192
+        height: 40px;
193
+        line-height: 40px;
194
+        text-align: center;
195
+        background: #eee;
196
+        float: left;
197
+    }
198
+
199
+    > p:last-child {
200
+        border-left: 1px solid #d2d2d2;
201
+        float: right;
202
+    }
203
+
204
+    .activeP {
205
+        background: #409EFF;
206
+        color: #fff;
207
+    }
208
+
209
+    }
210
+    .comfirmBox {
211
+        width: 100%;
212
+        height: 60px;
213
+        background: #fff;
214
+        position: absolute;
215
+        bottom: 0;
216
+        display: flex;
217
+        align-items: center;
218
+        justify-content: space-between;
219
+    }
220
+
221
+    .mainHeader {
222
+        width: 100%;
223
+        background: #fff;
224
+        position: fixed;
225
+        z-index: 100;
226
+        height: 36px;
227
+    }
228
+
229
+    .titleBox {
230
+        position: fixed;
231
+        z-index: 99;
232
+        background: #fff;
233
+    }
234
+
235
+    .fixedCell {
236
+        position: fixed;
237
+        z-index: 99;
238
+        right: 30px;
239
+        background: #fff;
240
+        width: 300px;
241
+        display: flex;
242
+        justify-content: space-between;
243
+    }
244
+</style>
245
+
246
+<style lang="scss">
247
+    .centerLeft {
248
+
249
+    .el-form-item__label {
250
+        text-align: left;
251
+    }
252
+
253
+    }
254
+    .tabsBox {
255
+
256
+    .el-tabs__item {
257
+        padding: 0 10px;
258
+    }
259
+
260
+    .el-tabs--bottom .el-tabs--left > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--bottom .el-tabs--right > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--bottom.el-tabs--border-card > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--bottom.el-tabs--card > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--top .el-tabs--left > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--top .el-tabs--right > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--top.el-tabs--border-card > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--top.el-tabs--card > .el-tabs__header .el-tabs__item:nth-child(2) {
261
+        padding: 0 10px;
262
+    }
263
+
264
+    .el-tabs--bottom .el-tabs--left > .el-tabs__header .el-tabs__item:last-child, .el-tabs--bottom .el-tabs--right > .el-tabs__header .el-tabs__item:last-child, .el-tabs--bottom.el-tabs--border-card > .el-tabs__header .el-tabs__item:last-child, .el-tabs--bottom.el-tabs--card > .el-tabs__header .el-tabs__item:last-child, .el-tabs--top .el-tabs--left > .el-tabs__header .el-tabs__item:last-child, .el-tabs--top .el-tabs--right > .el-tabs__header .el-tabs__item:last-child, .el-tabs--top.el-tabs--border-card > .el-tabs__header .el-tabs__item:last-child, .el-tabs--top.el-tabs--card > .el-tabs__header .el-tabs__item:last-child {
265
+        padding: 0 10px;
266
+    }
267
+
268
+    .el-tabs--card > .el-tabs__header .el-tabs__item.is-active.is-closable {
269
+        padding: 0 10px;
270
+    }
271
+
272
+    }
273
+    .centerRight {
274
+
275
+    .el-tabs__nav-scroll {
276
+        display: flex;
277
+    }
278
+
279
+    .el-tabs__nav {
280
+        margin: 0 auto;
281
+    }
282
+
283
+    .el-table th .cell, .el-table td .cell {
284
+        padding: 0 2px;
285
+    }
286
+
287
+    }
288
+    .preTabs {
289
+
290
+    .el-tabs__content {
291
+
292
+    }
293
+
294
+    }
295
+    .rightTabs {
296
+        height: 100%;
297
+
298
+
299
+    .el-tabs__content {
300
+
301
+    }
302
+
303
+    }
304
+    .centerDialog {
305
+
306
+    .el-dialog__body {
307
+        max-height: calc(100vh - 100px) !important;
308
+        padding: 0 20px;
309
+    }
310
+
311
+    }
312
+</style>

+ 0 - 1
src/xt_pages/stock/drugs/drugStockOutOrder.vue Visa fil

@@ -630,7 +630,6 @@ export default {
630 630
       } else {
631 631
         this.GetWarehouseOut();
632 632
       }
633
-      this.GetWarehouseOut();
634 633
     },
635 634
     endTimeChange(val) {
636 635
       var time = this.getTimestamp(val) - this.getTimestamp(this.start_time);