Bladeren bron

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

csx 3 jaren geleden
bovenliggende
commit
340d8fea12

+ 239 - 351
src/api/his/his.js Bestand weergeven

@@ -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 Bestand weergeven

@@ -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 Bestand weergeven

@@ -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
   ]

+ 392 - 251
src/xt_pages/hospitalStation/components/prescriptionTable.vue Bestand weergeven

@@ -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,76 +10,99 @@
9 10
           </div>
10 11
         </template>
11 12
       </el-table-column>
12
-      <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>
14
-      </el-table-column>
15 13
 
16
-      <el-table-column align="center" prop="single_dose" width="90" label="单次用量">
17
-        <template slot-scope="scope">
18
-          <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>
21
-          </div>
14
+
15
+      <el-table-column align="center" prop="drug_name" label="名称">
16
+        <template slot-scope="scope"><span :title="scope.row.drug_name">{{ scope.row.drug_name }}</span>
22 17
         </template>
23 18
       </el-table-column>
24 19
 
25
-      <el-table-column align="center" prop="single_dose" width="90" label="规格">
20
+
21
+      <el-table-column align="center" prop="single_dose" width="120" label="单次用量">
26 22
         <template slot-scope="scope">
27 23
           <div style="display:flex;align-items:center;">
28
-                <span v-if="scope.row.drug.min_unit != scope.row.drug.dose_unit">{{scope.row.drug.dose}}{{scope.row.drug.dose_unit}}&nbsp;* &nbsp;</span>{{scope.row.drug.min_number}}{{scope.row.drug.min_unit}}/{{scope.row.drug.max_unit}}
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>
29 34
           </div>
30 35
         </template>
31 36
       </el-table-column>
32
-
33 37
       <el-table-column align="center" prop="delivery_way" width="100" label="用法">
34 38
         <template slot-scope="scope">
35 39
           <el-select v-model="scope.row.delivery_way" placeholder="请选择">
36 40
             <el-option
37
-              v-for="(item,index) in drugways"
38
-              :key="index"
39
-              :label="item.name"
40
-              :value="item.name">
41
+                    v-for="(item,index) in drugways"
42
+                    :key="index"
43
+                    :label="item.name"
44
+                    :value="item.name">
41 45
             </el-option>
42 46
           </el-select>
43 47
         </template>
44 48
       </el-table-column>
45 49
       <el-table-column align="center" prop="execution_frequency" width="100" label="频率">
46 50
         <template slot-scope="scope">
47
-          <el-select v-model="scope.row.execution_frequency" placehold er="请选择">
51
+          <el-select v-model="scope.row.execution_frequency" placeholder="请选择" @change="getAllChange(scope)">
48 52
             <el-option
49
-              v-for="item,index in efs"
50
-              :key="index"
51
-              :label="item.name"
52
-              :value="item.name">
53
+                    v-for="item,index in efs"
54
+                    :key="index"
55
+                    :label="item.name"
56
+                    :value="item.name">
53 57
             </el-option>
54 58
           </el-select>
55 59
         </template>
56 60
       </el-table-column>
57 61
 
58 62
 
59
-      <el-table-column align="center" prop="day" width="50" label="天数">
63
+      <el-table-column align="center" prop="day" width="70" label="天数">
60 64
         <template slot-scope="scope">
61
-          <el-input v-model="scope.row.day" @input="getDay(scope)" placeholder=""></el-input>
62
-          <div>{{'天'}}</div>
63
-
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>
64 69
         </template>
65 70
       </el-table-column>
66 71
 
67
-      <el-table-column align="center" prop="prescribing_number" width="80" label="总量">
72
+      <el-table-column align="center" prop="prescribing_number" width="120" label="总量">
68 73
         <template slot-scope="scope">
69 74
           <div style="display:flex;align-items:center;">
70
-            <el-input v-model="scope.row.prescribing_number" style="width:60%" placeholder=""></el-input>
71
-            <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>
72 85
           </div>
73 86
         </template>
74 87
       </el-table-column>
75
-      <el-table-column align="center" prop="retail_price" width="60" label="单价">
88
+      <el-table-column align="center" prop="retail_price" width="80" label="单价">
76 89
         <template slot-scope="scope">
77
-          <el-input v-model="scope.row.retail_price" placeholder="" readonly></el-input>
78
-          <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>
79 94
 
80 95
         </template>
81 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>
82 106
       <el-table-column align="center" prop="remark" width="50" label="备注">
83 107
         <template slot-scope="scope">
84 108
           <el-input v-model="scope.row.remark" :title="scope.row.remark" placeholder=""></el-input>
@@ -90,24 +114,27 @@
90 114
         </template>
91 115
       </el-table-column>
92 116
     </el-table>
93
-    <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' }"
94 120
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
95 121
       <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
96 122
       <el-table-column align="center" prop="project_name" label="名称">
97
-        <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>
98 125
       </el-table-column>
99 126
       <el-table-column align="center" prop="statistical_classification" width="100" label="组">
100
-        <template slot-scope="scope">{{scope.row.type == 2?getGroup(scope.row.statistical_classification):"耗材"}}</template>
101
-      </el-table-column>
102
-
103
-      <el-table-column align="center" prop="statistical_classification" width="100" label="规格">
104
-        <template slot-scope="scope">{{scope.row.type == 2?"":scope.row.good_info.specification_name}}</template>
127
+        <template slot-scope="scope">{{scope.row.type ==
128
+          2?getGroup(scope.row.statistical_classification):'耗材'}}
129
+        </template>
105 130
       </el-table-column>
106
-
107 131
       <el-table-column align="center" prop="single_dose" width="80" label="单次用量">
108 132
         <template slot-scope="scope">
109
-          <el-input v-model="scope.row.single_dose" @input="getProjectSingleDose(scope)" placeholder=""></el-input>
110
-          <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>
111 138
 
112 139
         </template>
113 140
       </el-table-column>
@@ -124,13 +151,15 @@
124 151
       </el-table-column>
125 152
       <el-table-column align="center" prop="execution_frequency" width="80" label="频率">
126 153
         <template slot-scope="scope">
127
-          <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>
128 156
         </template>
129 157
       </el-table-column>
130 158
       <el-table-column align="center" prop="number_days" width="70" label="天数">
131 159
         <template slot-scope="scope">
132 160
           <div style="display:flex;align-items:center;">
133
-            <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>
134 163
             <div>{{'天'}}</div>
135 164
           </div>
136 165
         </template>
@@ -144,10 +173,12 @@
144 173
           </div>
145 174
         </template>
146 175
       </el-table-column>
147
-      <el-table-column align="center" prop="name" width="50" label="单价">
176
+      <el-table-column align="center" prop="name" width="70" label="单价">
148 177
         <template slot-scope="scope">
149
-          <el-input v-model="scope.row.price" placeholder="" readonly></el-input>
150
-          <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>
151 182
 
152 183
         </template>
153 184
       </el-table-column>
@@ -175,35 +206,34 @@
175 206
     </div>
176 207
 
177 208
 
178
-
179 209
   </div>
180 210
 </template>
181 211
 
182 212
 <script>
183
-  import { getDictionaryDataConfig} from "@/utils/data";
184
-  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'
185 215
 
186 216
   export default {
187 217
     props: {
188 218
       preDrugs: Array,
189 219
       activeType: Number,
190
-      addtions_charge:Array,
191
-      prescription:{
192
-        type:Object,
193
-        default: function () {
220
+      addtions_charge: Array,
221
+      prescription: {
222
+        type: Object,
223
+        default: function() {
194 224
           return {
195
-            name:"",
196
-            advices:[],
197
-            project:[],
198
-            drugways:[],
199
-            efs:[],
200
-          };
225
+            name: '',
226
+            advices: [],
227
+            project: [],
228
+            drugways: [],
229
+            efs: []
230
+          }
201 231
         }
202
-      },
232
+      }
203 233
     },
204 234
     data() {
205 235
       return {
206
-        advices:[],
236
+        advices: [],
207 237
         tableData: [],
208 238
         newoptions: [{
209 239
           value: '1',
@@ -223,128 +253,126 @@
223 253
         }],
224 254
         value: '1',
225 255
         input: 1,
256
+        efs: [],
257
+        drugways: []
226 258
       }
227 259
     },
228 260
 
229
-   methods:{
230
-     createFilter(queryString) {
231
-       return (restaurant) => {
232
-         return (restaurant.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0)
233
-       }
234
-     },
235
-     querySearch2(queryString, cb) {
236
-       var restaurants = this.getDictionaryDataConfig("system","project_use");
237
-       restaurants.map(item => {
238
-         item.value = item.name
239
-       });
240
-       var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
241
-       // 调用 callback 返回建议列表的数据
242
-       cb(results)
243
-     },
244
-     delAddition(index, addition){
245
-       if(this.prescription.order_status == 2){
246
-         this.$message.error('该处方已经结算,无法删除');
247
-         return
248
-       }
249
-       this.$confirm("附加费删除后不可恢复,是否确认删除", "删除", {
250
-         confirmButtonText: "确 定",
251
-         cancelButtonText: "取 消",
252
-         type: "warning"
253
-       }).then(() => {
254
-         this.$nextTick(function(){
255
-           if(addition.id == 0){
256
-             this.prescription.addition.splice(index, 1)
257
-           }else{
258
-             let params = {
259
-               'id': addition.id,
260
-             };
261
-             delHisAddition(params).then(response => {
262
-               if (response.data.state == 0) {
263
-                 this.$message.error(response.data.msg);
264
-                 return false
265
-               } else {
266
-                 var temp2 = this.deepClone(this.prescription.addition);
267
-                 temp2.splice(index, 1);
268
-                 this.prescription.addition = temp2;
269
-                 this.$message.success(response.data.data.msg)
270
-               }
271
-             })
272
-           }
273
-         });
274
-
275
-       })
276
-         .catch(() => {});
277
-
278
-     },
279
-      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() {
280 313
         getInitData().then(response => {
281 314
           if (response.data.state == 0) {
282
-            this.$message.error(response.data.msg);
315
+            this.$message.error(response.data.msg)
283 316
             return false
284 317
           } else {
285
-            this.drugways = response.data.data.drugways;
318
+            this.drugways = response.data.data.drugways
286 319
             this.efs = response.data.data.efs
287 320
           }
288 321
         })
289 322
 
290
-      },deleteDrug:function(index, row){
291
-       if(this.prescription.order_status == 2){
292
-         this.$message.error('该处方已经结算,无法删除');
293
-         return
294
-       }
295
-       this.$confirm("药品删除后不可恢复,是否确认删除", "删除", {
296
-         confirmButtonText: "确 定",
297
-         cancelButtonText: "取 消",
298
-         type: "warning"
299
-       }).then(() => {
300
-         this.$nextTick(function(){
301
-           if(row.advice_id == 0){
302
-             this.prescription.advices.splice(index, 1)
303
-           }else{
304
-             let params = {
305
-               'id': row.advice_id,
306
-             };
307
-             delHisAdvice(params).then(response => {
308
-               if (response.data.state == 0) {
309
-                 this.$message.error(response.data.msg);
310
-                 return false
311
-               } else {
312
-                 var temp2 = this.deepClone(this.prescription.advices);
313
-                 temp2.splice(index, 1);
314
-                 this.prescription.advices = temp2;
315
-                 this.$message.success(response.data.data.msg)
316
-               }
317
-             })
318
-
319
-
320
-           }
321
-
322
-         });
323
-
324
-
325
-       })
326
-         .catch(() => {});
327
-
328
-
329
-
330
-
331
-
332
-      },deepClone(source) {
333
-       if (!source && typeof source !== 'object') {
334
-         throw new Error('error arguments', 'shallowClone')
335
-       }
336
-       const targetObj = source.constructor === Array ? [] : {};
337
-       Object.keys(source).forEach((keys) => {
338
-         if (source[keys] && typeof source[keys] === 'object') {
339
-           targetObj[keys] = this.deepClone(source[keys])
340
-         } else {
341
-           targetObj[keys] = source[keys]
342
-         }
343
-       });
344
-       return targetObj
345
-     },
346
-
347
-      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) {
348 376
         this.prescription = data
349 377
 
350 378
         // this.prescription.advices = data.advices
@@ -352,41 +380,41 @@
352 380
       getDictionaryDataConfig(module, filed_name) {
353 381
         return getDictionaryDataConfig(module, filed_name)
354 382
       },
355
-      getGroup(id){
356
-         var name = "";
357
-          var statistics_category =  getDictionaryDataConfig('system','statistics_category');
358
-          console.log("2235",statistics_category);
359
-          for(let i=0;i<statistics_category.length;i++){
360
-             if(id == statistics_category[i].id){
361
-                 name = statistics_category[i].name
362
-             }
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
363 390
           }
364
-         return name
391
+        }
392
+        return name
365 393
       },
366
-      deleteProject(row,i){
367
-        if(this.prescription.order_status == 2){
368
-          this.$message.error('该处方已经结算,无法删除');
394
+      deleteProject(row, i) {
395
+        if (this.prescription.order_status == 2) {
396
+          this.$message.error('该处方已经结算,无法删除')
369 397
           return
370 398
         }
371
-        this.$confirm("项目删除后不可恢复,是否确认删除", "删除", {
372
-          confirmButtonText: "确 定",
373
-          cancelButtonText: "取 消",
374
-          type: "warning"
399
+        this.$confirm('项目删除后不可恢复,是否确认删除', '删除', {
400
+          confirmButtonText: '确 定',
401
+          cancelButtonText: '取 消',
402
+          type: 'warning'
375 403
         }).then(() => {
376
-          if(row.id == 0){
404
+          if (row.id == 0) {
377 405
             this.prescription.project.splice(i, 1)
378 406
 
379
-          }else{
407
+          } else {
380 408
             let params = {
381
-              'id': row.id,
382
-            };
409
+              'id': row.id
410
+            }
383 411
             delHisProject(params).then(response => {
384 412
               if (response.data.state == 0) {
385
-                this.$message.error(response.data.msg);
413
+                this.$message.error(response.data.msg)
386 414
                 return false
387 415
               } else {
388
-                for (let i = 0; i < this.prescription.project.length; i++){
389
-                  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) {
390 418
                     this.prescription.project.splice(i, 1)
391 419
                   }
392 420
                 }
@@ -395,39 +423,146 @@
395 423
             })
396 424
           }
397 425
         })
398
-          .catch(() => {});
426
+                .catch(() => {
427
+                })
399 428
 
400 429
       },
401
-      getSingleDose(scope){
402
-        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
+
403 463
       },
404
-      getDay(scope){
405
-        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
+        }
406 494
       },
407
-      getProjectSingleDose(scope){
408
-        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
+        }
409 511
       },
410
-      getProjectDay(scope){
512
+      getProjectDay(scope) {
411 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
412 554
       }
413
-    },mounted(){
555
+    }, mounted() {
414 556
       this.getInitData()
415 557
 
416 558
     },
417
-    watch:{
418
-      // "prescription.advices":{
419
-      //   handler(newVal,oldVal){
420
-      //     newVal.map(item => {
421
-      //       item.prescribing_number = item.single_dose * item.day
422
-      //       if(item.single_dose != oldVal[index].single_dose || item.number_days != oldVal[index].number_days){
423
-      //         item.total = item.single_dose * item.number_days
424
-      //       }
559
+    watch: {
560
+      'prescription.advices': {
561
+        handler(newVal, oldVal) {
425 562
 
426
-
427
-      //     })
428
-      //   },
429
-      //   deep:true
430
-      // },
563
+        },
564
+        deep: true
565
+      }
431 566
       // "prescription.project":{
432 567
       //   handler(newVal,oldVal){
433 568
       //     newVal.map((item,index) => {
@@ -446,40 +581,46 @@
446 581
 
447 582
 <style lang="scss">
448 583
   .prescriptionTable {
449
-    .el-input__inner{
450
-      padding: 0 5px;
451
-    }
452
-    .additionalBox{
453
-      margin-top: 20px;
454
-      display: flex;
455
-      flex-wrap: wrap;
456
-      .additionalOne{
457
-        margin-right:20px;
458
-        margin-bottom:10px;
459
-        display: flex;
460
-        align-items: center;
461
-        >span{
462
-          white-space: nowrap;
463
-          overflow: hidden;
464
-          text-overflow: ellipsis;
465
-          width:80px;
466
-          display: inline-block;
467
-          font-size: 14px;
468
-        }
469
-      }
470
-      .deleteIcon{
471
-        color:red;
472
-        margin-left:5px;
473
-      }
474
-    }
475
-    .el-table th .cell, .el-table td .cell {
476
-      padding: 0 2px;
477
-      white-space: pre-line;
478
-    }
479 584
 
480
-    .el-icon-delete {
481
-      color: red;
482
-    }
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
+  }
483 624
 
484 625
   }
485 626
 </style>

+ 9 - 9
src/xt_pages/hospitalStation/doctorDesk.vue Bestand weergeven

@@ -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: '电子处方',

+ 1 - 1
src/xt_pages/outpatientCharges/listTemplate/printTwo.vue Bestand weergeven

@@ -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
                     }

+ 13 - 0
src/xt_pages/outpatientTool/components/detail.vue Bestand weergeven

@@ -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 Bestand weergeven

@@ -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 Bestand weergeven

@@ -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 Bestand weergeven

@@ -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>