Browse Source

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

XMLWAN 3 years ago
parent
commit
e74c26c195

+ 18 - 0
src/api/his/his.js View File

@@ -528,6 +528,24 @@ export function getPrivateExpensesOrder(params) {
528 528
 }
529 529
 
530 530
 
531
+//
532
+export function getMonthCharge(params) {
533
+  return request({
534
+    url: "/api/monthcharge/info",
535
+    method: "get",
536
+    params:params,
537
+  });
538
+}
539
+
540
+export function getMonthHisPateintInfo(params) {
541
+  return request({
542
+    url: "/api/monthhispatient/get",
543
+    method: "get",
544
+    params:params,
545
+  });
546
+}
547
+
548
+
531 549
 
532 550
 
533 551
 

+ 7 - 1
src/xt_pages/dialysis/bloodPresssWatch.vue View File

@@ -385,6 +385,12 @@
385 385
           align="center"
386 386
           width="120"
387 387
         ></el-table-column>
388
+        <el-table-column
389
+          prop="start_time"
390
+          label="上机时间"
391
+          align="center"
392
+          width="80"
393
+        ></el-table-column>
388 394
         <el-table-column
389 395
           prop="dialysis_no"
390 396
           label="透析号"
@@ -691,7 +697,7 @@ export default {
691 697
               const SchedualPatientsTable = {
692 698
                 bp: []
693 699
               };
694
-
700
+              SchedualPatientsTable["start_time"] = response.data.data.schedule[i].dialysis_order.start_time ? parseTime(response.data.data.schedule[i].dialysis_order.start_time,"{h}:{i}") : '';
695 701
               SchedualPatientsTable["sch_id"] = response.data.data.schedule[i].id;
696 702
               SchedualPatientsTable["sch_time_int"] = response.data.data.schedule[i].schedule_date;
697 703
               SchedualPatientsTable["sch_time"] = parseTime(response.data.data.schedule[i].schedule_date,"{y}-{m}-{d}");

+ 1 - 1
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue View File

@@ -1981,7 +1981,7 @@
1981 1981
         if (minites < 10) {
1982 1982
           minites = '0' + minites
1983 1983
         }
1984
-        if (this.$store.getters.xt_user.org.id == 10016) {
1984
+        if (this.$store.getters.xt_user.org.id == 10016 || this.$store.getters.xt_user.org.id == 10101) {
1985 1985
           this.start_time = year + '-' + month + '-' + day + ' ' + hours + ':' + minites
1986 1986
         } else {
1987 1987
           if (schedual.schedule_type == 1) {

+ 3 - 2
src/xt_pages/dialysis/dialysisPrintOrder.vue View File

@@ -1139,7 +1139,8 @@ export default {
1139 1139
         '@media print {.dialysis-print-order {width: 960px; margin: 0 auto;}.dialysis-print-order .order-yy-name {margin: auto;text-align: center;font-size: 20px;letter-spacing: 5px;}.dialysis-print-order .order-title {  margin: auto;  font-weight: 600;  text-align: center;  font-size: 22px;  padding: 10px 20px 0px 20px;}.dialysis-print-order .table-box {  width: 100%;  line-height: 18px;  font-size: 18px;}.dialysis-print-order .print-table {  width: 100%;  text-align: center;  border-collapse: collapse;  line-height: 28px;  font-size: 18px;}.dialysis-print-order .print-table-no {  width: 100%;  text-align: center;  border-collapse: collapse;  font-size: 14px;}.dialysis-print-order .under-line {  border-bottom: 1px solid #999;  width: 95%;  text-align: center;  margin-left: 2px;}.dialysis-print-order .title-box {  text-align: center;  font-size: 16px;}.dialysis-print-order .radio-lebel-box {  font-weight: 400;  cursor: pointer;}.dialysis-print-order .radio-no {  opacity: 0;  outline: none;  position: absolute;  margin: 0;  width: 0;  height: 0;  z-index: -1;}.dialysis-print-order .radio-inner {  white-space: nowrap;  cursor: pointer;  outline: none;  display: inline-block;  line-height: 1;  position: relative;  vertical-align: middle;}.dialysis-print-order .radio-fang {  display: inline-block;  position: relative;  border: 1px solid #000;  box-sizing: border-box;  width: 18px;  height: 18px;  background-color: #fff;  z-index: 1;  transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),    background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);}.dialysis-print-order .is-checked-radio::after {  content: "√";  font-size: 19px;}.dialysis-print-order .print-table-no tr td {  padding: 8px 5px;  line-height: 25px;}.dialysis-print-order .print-table tr td {  padding: 1px 1px;  /*line-height: 25px;*/}.es-img {  height: 25px;}.advice-name {  text-align: left;}.advice-children {  display: flex;}.title-box-pro {  border: 0 #fff;  line-height: 25px;  height: 25px;  text-align: left;  padding-left: 10px !important;}.title-box-pro-tr {  border: 0 #fff;}.text-align-left {  text-align: left !important;  padding-left: 10px !important;  font-size: 14px !important;  line-height: 25px;}.print-table-tr-new td {line-height: 20px !important;}.border-top-solid {border: solid 1px #000;}.print-template-two tr {line-height: 30px;}}';
1140 1140
       const style8 =
1141 1141
         '@media print {.dialysis-print-order{width:960px;margin:0 auto;font-size:10px;}.dialysis-print-order .order-yy-name{margin:auto;text-align:center;font-size:20px;letter-spacing:5px}.dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px 20px 20px 20px}.dialysis-print-order .table-box{width:100%;line-height:23px;font-size:10px}.dialysis-print-order .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:14px}.dialysis-print-order .print-table-no{width:100%;text-align:center;border-collapse:collapse;font-size:14px}.dialysis-print-order .under-line{border-bottom:1px solid #999;width:95%;text-align:center;margin-left:2px}.dialysis-print-order .title-box{text-align:center;font-size:16px;border:1px solid #666}.dialysis-print-order .radio-lebel-box{font-weight:400;cursor:pointer}.dialysis-print-order .radio-no{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.dialysis-print-order .radio-inner{white-space:nowrap;cursor:pointer;outline:0;display:inline-block;line-height:1;position:relative;vertical-align:middle}.dialysis-print-order .radio-fang{display:inline-block;position:relative;border:1px solid #000;box-sizing:border-box;width:14px;height:14px;background-color:#fff;z-index:1;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.dialysis-print-order .is-checked-radio::after{content:"√";font-size:15px}}.dialysis-print-order .print-table-no tr td { padding: 8px 5px; line-height: 25px; }.es-img{height: 20px; }.advice-name{text-align: left;}.advice-children{display:flex;} .dialysis-print-order .print-table tr td{padding: 0px 0px;} .print-template-two tr {line-height: 30px;}   .title-box-pro{border: 0 #fff;line-height: 40px;height: 40px;text-align: left;padding-left: 10px !important;}  .text-align-left{text-align: left !important;padding-left:10px !important;font-size: 14px !important;line-height: 25px;}.widthLength25{width: 25%;}.lineHeight{line-height: 20px;display: flex;justify-content: space-between;}';
1142
-
1142
+      const style9 =
1143
+        '@media print {.dialysis-print-order{width:920px;margin:0 10px;font-size:10px;}.option_panel { margin: 0 5px 0 0; } .option_panel .check_box_panel { white-space: nowrap; outline: none; display: inline-block; line-height: 1; position: relative; vertical-align: middle; } .dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px}.option_panel .check_box_panel .check_box { display: inline-block; position: relative; border: 1px solid #000; box-sizing: border-box; width: 14px; height: 12px; background-color: #fff; } .check_box_panel .did_checked::after { content: "√"; font-size: 15px; } .print_page_main_content {background-color: white;width: 940px;margin: 0 auto 50px;padding: 0 0 0 0; page-break-after: always;}.print_page_main_content .order-yy-name {margin: auto;text-align: center;font-size: 20px;letter-spacing: 5px;}.print_page_main_content .order_title {text-align: center;font-size: 23px; line-height: 50px;font-weight: 500;} .row {font-size: 14px;line-height: 20px;padding: 5px 0;}.inline_block { display: inline-block;}.under_line_two {display: inline-block;border-bottom: 1px solid #999;text-align: left;white-space: nowrap;width: 50%;}.under_line {display: inline-block;border-bottom: 1px solid #999;text-align: center;white-space: nowrap; width: 50%;}.flex {display: -webkit-box;display: -moz-box; display: -ms-flexbox; display: -webkit-flex;display: flex;align-items: center;-webkit-align-items: center;box-align: center;-moz-box-align: center;-webkit-box-align: center;text-align: center;-webkit-justify-content: space-between;justify-content: space-between;-moz-box-pack: space-between;-webkit--moz-box-pack: space-between;box-pack: space-between;}.print_page_main_content .proj_table {width: 100%;border: 1px solid;border-collapse: collapse;padding: 2px;}.print_page_main_content .proj_table tbody tr td {border: 1px solid;font-size: 16px;padding: 3px 8px;line-height: 30px;}.print_page_main_content .proj_table .inside_table {width: 100%;border: hidden; border-collapse: collapse;}.print_page_main_content .proj_table .inside_table tr td {border: 1px solid; text-align: center;font-size: 14px;padding: 6px 5px;line-height: 16px;}.print-table-no {width: 100%;text-align: center;border-collapse: collapse;font-size: 14px;}.es-img {height: 30px;}.advice-name {text-align: left !important;line-height: 16px !important;}.advice-children {display: flex;}}.margin-bottom-50{margin-bottom:50px;}.margin-bottom-300 {margin-bottom:450px;}.margin-bottom-600 {margin-bottom:600px;}.margin-bottom-900 {margin-bottom:900px;}.print-yema{ position: absolute;top: 920px;left: 50%;} .print-yema2{ position: absolute;top: 400px;left: 50%;}.print-yema3{position: absolute;top: 1230px;left: 50%;}.print-yema4{position: absolute;top: 1050px;left: 50%;}.check_box{width:15px !important;height:15px !important;}.did_checke::after {font-size: 8px;margin-left: 2px;margin-top: 12px !important;position: absolute;}.table-box1 {border: 1px solid #000;width: 100%;line-height: 30px;font-size: 14px;border-collapse: collapse;}.table-box1 tr {border-bottom: 1px solid #000;}';
1143 1144
 
1144 1145
       if (this.org_template_info.template_id == 1) {
1145 1146
         printJS({
@@ -1411,7 +1412,7 @@ export default {
1411 1412
         printJS({
1412 1413
           printable: "dialysis-print-box-1",
1413 1414
           type: "html",
1414
-          style: style2,
1415
+          style: style9,
1415 1416
           scanStyles: false
1416 1417
         });
1417 1418
       }

+ 43 - 29
src/xt_pages/dialysis/template/DialysisPrintOrderFortyOne.vue View File

@@ -1,5 +1,5 @@
1 1
 <template>
2
-  <div id="dialysis-print-box-1">
2
+  <div id="dialysis-print-box-1" style="width:920px">
3 3
     <div
4 4
       id="dialysis-print-box-1-1"
5 5
       class="dialysis-print-order print-template-two print_page_main_content"
@@ -44,22 +44,26 @@
44 44
             <check-box :checked="receiverTreatmentAccess.condition == 2 ? true : false"></check-box>
45 45
           </div>
46 46
         </div>
47
+        
48
+
49
+      </div>
50
+      <div class="row">
47 51
         <div class="inline_block">
48 52
           病区:
49
-          <div class="under_line" style="width: 50px;text-align: center;">
53
+          <div class="under_line" style="width: 120px;text-align: center;">
50 54
             {{ patientInfo.DialysisSchedule.device_zone.name ? patientInfo.DialysisSchedule.device_zone.name : '' }}
51 55
           </div>
52 56
         </div>
53 57
         <div class="inline_block">
54 58
           床号:
55
-          <div class="under_line" style="width: 50px;text-align: center;">
59
+          <div class="under_line" style="width: 120px;text-align: center;">
56 60
             {{ dialysisOrder && dialysisOrder.DeviceNumber && dialysisOrder.DeviceNumber.number.length > 0 ? dialysisOrder.DeviceNumber.number : patientInfo.DialysisSchedule.device_number.number }}
57 61
           </div>
58 62
         </div>
59 63
         
60 64
         <div class="inline_block">
61 65
           透析次数:
62
-          <div class="under_line" style="width: 40px;text-align: left">
66
+          <div class="under_line" style="width: 60px;text-align: left">
63 67
             {{ patientInfo.total_dialysis + patientInfo.user_sys_before_count }} 次
64 68
           </div>
65 69
         </div>
@@ -69,7 +73,6 @@
69 73
             {{ queryParams.xtdate }}
70 74
           </div>
71 75
         </div>
72
-
73 76
       </div>
74 77
 
75 78
       <div class="row">
@@ -120,7 +123,7 @@
120 123
                   </div>
121 124
                   <div class="inline_block" style="margin-left:10px;">
122 125
                     透前症状:
123
-                    <div class="under_line" style="width: 140px;text-align: center">
126
+                    <div class="under_line" style="width: 130px;text-align: center">
124 127
                       {{ predialysis.symptom_before_dialysis ? predialysis.symptom_before_dialysis : "" }}
125 128
                     </div>
126 129
                   </div>
@@ -162,7 +165,14 @@
162 165
                     </div>
163 166
                     kg
164 167
                   </div>
165
-                  <div class="inline_block" style="margin-left:90px;">
168
+                  <div class="inline_block" style="margin-left:10px;">
169
+                    衣物重:
170
+                    <div class="under_line" style="width: 50px;text-align: center">
171
+                      {{ predialysis.additional_weight ? predialysis.additional_weight: "/" }}
172
+                    </div>
173
+                    kg
174
+                  </div>
175
+                  <div class="inline_block" style="margin-left:10px;">
166 176
                     体重增加:
167 177
                     <div class="under_line" style="width: 50px;text-align: center">
168 178
                       {{ predialysis.weight_before > 0 && lastafterdialysis.weight_after > 0 ? parseFloat(predialysis.weight_before - lastafterdialysis.weight_after).toFixed(2): "/" }}
@@ -186,7 +196,7 @@
186 196
                 </div>
187 197
               </td>
188 198
               <td colspan="1" style="width:50%;padding:0px 0px 5px">
189
-                <div style="letter-spacing:5px;text-align:center;font-weight:520;font-size:16px;padding: 6px 8px;line-height: 30px;border-bottom:1px solid #000;">
199
+                <div style="letter-spacing:5px;text-align:center;font-weight:520;font-size:16px;padding: 0px 8px;line-height: 30px;border-bottom:1px solid #000;">
190 200
                   透析后评估
191 201
                 </div>
192 202
                 <div class="row" style="padding:5px 8px;">
@@ -327,64 +337,64 @@
327 337
                   </div>
328 338
                   <div class="inline_block" style="flex:1;">
329 339
                     透析方式:
330
-                    <div class="under_line" style="width: 80px;text-align: center;font-weight:600;" v-if="!prescription.mode_id">
340
+                    <div class="under_line" style="width: 70px;text-align: center;font-weight:600;" v-if="!prescription.mode_id">
331 341
                       /
332 342
                     </div>
333
-                    <div class="under_line" style="width: 80px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 1">
343
+                    <div class="under_line" style="width: 70px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 1">
334 344
                       HD
335 345
                     </div>
336
-                    <div class="under_line" style="width: 80px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 2">
346
+                    <div class="under_line" style="width: 70px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 2">
337 347
                       HDF
338 348
                     </div>
339
-                    <div class="under_line" style="width: 80px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 3">
349
+                    <div class="under_line" style="width: 70px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 3">
340 350
                       HD+HP
341 351
                     </div>
342
-                    <div class="under_line" style="width: 80px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 4">
352
+                    <div class="under_line" style="width: 70px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 4">
343 353
                       HP
344 354
                     </div>
345
-                    <div class="under_line" style="width: 80px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 5">
355
+                    <div class="under_line" style="width: 70px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 5">
346 356
                       HF
347 357
                     </div>
348
-                    <div class="under_line" style="width: 80px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 6">
358
+                    <div class="under_line" style="width: 70px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 6">
349 359
                       SCUF
350 360
                     </div>
351
-                    <div class="under_line" style="width: 80px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 7">
361
+                    <div class="under_line" style="width: 70px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 7">
352 362
                       IUF
353 363
                     </div>
354
-                    <div class="under_line" style="width: 80px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 8">
364
+                    <div class="under_line" style="width: 70px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 8">
355 365
                       HFHD
356 366
                     </div>
357
-                    <div class="under_line" style="width: 80px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 9">
367
+                    <div class="under_line" style="width: 70px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 9">
358 368
                       HFHD+HP
359 369
                     </div>
360
-                    <div class="under_line" style="width: 80px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 10">
370
+                    <div class="under_line" style="width: 70px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 10">
361 371
                       PHF
362 372
                     </div>
363
-                    <div class="under_line" style="width: 80px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 11">
373
+                    <div class="under_line" style="width: 70px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 11">
364 374
                       HFR
365 375
                     </div>
366
-                    <div class="under_line" style="width: 80px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 12">
376
+                    <div class="under_line" style="width: 70px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 12">
367 377
                       HDF+HP
368 378
                     </div>
369
-                    <div class="under_line" style="width: 80px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 13">
379
+                    <div class="under_line" style="width: 70px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 13">
370 380
                       CRRT
371 381
                     </div>
372
-                    <div class="under_line" style="width: 80px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 14">
382
+                    <div class="under_line" style="width: 70px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 14">
373 383
                       腹水回输
374 384
                     </div>
375
-                    <div class="under_line" style="width: 80px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 15">
385
+                    <div class="under_line" style="width: 70px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 15">
376 386
                       HD前置换
377 387
                     </div>
378
-                    <div class="under_line" style="width: 80px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 16">
388
+                    <div class="under_line" style="width: 70px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 16">
379 389
                       HD后置换
380 390
                     </div>
381
-                    <div class="under_line" style="width: 80px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 17">
391
+                    <div class="under_line" style="width: 70px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 17">
382 392
                       HDF前置换
383 393
                     </div>
384
-                    <div class="under_line" style="width: 80px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 18">
394
+                    <div class="under_line" style="width: 70px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 18">
385 395
                       HDF后置换
386 396
                     </div>
387
-                    <div class="under_line" style="width: 80px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 19">
397
+                    <div class="under_line" style="width: 70px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 19">
388 398
                       IUF+HD
389 399
                     </div>
390 400
                     <div class="under_line" style="width: 150px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 22">
@@ -579,18 +589,21 @@
579 589
                     </tr>
580 590
                     <tr>
581 591
                       <td width="60">时间</td>
592
+                      <td width="40">体温<br />°C</td>
582 593
                       <td width="50">血流量<br />(ml/min)</td>
583 594
                       <td width="90">静脉压(mmHg)/<br />跨膜压(mmHg)</td>
584 595
                       <td width="80">超滤率(ml/h)/<br />超滤量(ml)</td>
585 596
                       <td width="80">钠浓度(ml/h)/<br />温度(°C)</td>
586 597
                       <td width="50">脉搏<br />(次/分)</td>
587 598
                       <td width="60">血压<br />(mmHg)</td>
599
+                      <td width="50">血容量</td>
588 600
                       <td width="50">签名</td>
589 601
                       <td width="200">病情变化及处理</td>
590 602
                     </tr>
591 603
 
592 604
                     <tr v-for="(monitor, monindex) in monitors" :key="monindex">
593 605
                       <td style="padding:1px 5px;" height="30px">{{ getTime(monitor.operate_time, "{h}:{i}") }}</td>
606
+                      <td style="padding:1px 5px;">{{ monitor.temperature ? monitor.temperature : '' }}</td>
594 607
                       <td style="padding:1px 5px;">{{ monitor.blood_flow_volume ? monitor.blood_flow_volume : "" }}
595 608
                       <td style="padding:1px 5px;"><span v-if="getTime(monitor.operate_time, '{h}:{i}')">{{ monitor.venous_pressure ? monitor.venous_pressure : "" }}/{{ monitor.transmembrane_pressure ? monitor.transmembrane_pressure : "" }}</span></td>
596 609
                       <td style="padding:1px 5px;"><span v-if="getTime(monitor.operate_time, '{h}:{i}')">{{ monitor.ultrafiltration_rate ? monitor.ultrafiltration_rate : "" }}/{{ monitor.ultrafiltration_volume ? monitor.ultrafiltration_volume : "" }}</span></td>
@@ -608,6 +621,7 @@
608 621
                           <img style="height:30px;" :src="setAdminUserES(monitor.monitoring_nurse)" alt srcset />
609 622
                         </span>
610 623
                       </td>
624
+                      <td style="padding:1px 5px;">{{ monitor.accumulated_blood_volume ? monitor.accumulated_blood_volume : '' }}</td>
611 625
                       <td style="line-height:16px;padding:0px;">
612 626
                         <div style="min-height:20px;line-height:20px; overflow:hidden;">
613 627
                           <span v-if="getTime(monitor.operate_time, '{h}:{i}')" style="word-break: break-all;margin:0;line-height:16px;-webkit-line-clamp:3;overflow:visible;display:inline-block;vertical-align:middle;height:auto;">
@@ -648,7 +662,7 @@
648 662
                   </div>
649 663
                   <div class="inline_block" style="flex:1;margin-left:50px;">
650 664
                     透后宣教:
651
-                    <div class="under_line" style="width: 600px;text-align: left;">
665
+                    <div class="under_line" style="width: 550px;text-align: left;">
652 666
                       {{ summary.mission ? summary.mission : '' }}
653 667
                     </div>
654 668
                   </div>

+ 318 - 192
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue View File

@@ -510,7 +510,8 @@
510 510
     refunddetail,
511 511
     refundNumber,
512 512
     register,
513
-    upload
513
+    upload,
514
+    getMonthCharge
514 515
   } from '@/api/his/his'
515 516
   import RegisterDialog from './components/registerDialog'
516 517
   import treatPrint from './treatPrint'
@@ -537,7 +538,7 @@
537 538
       prescriptionTable,
538 539
       additionalCharges,
539 540
       treatPrint,
540
-      statementPrint
541
+      statementPrint,
541 542
 
542 543
     },
543 544
     data() {
@@ -1637,7 +1638,79 @@
1637 1638
         if (this.activeName == 'first') {
1638 1639
           this.getPatientList()
1639 1640
         } else if (this.activeName == 'second') {
1640
-          this.getMonthPatientList()
1641
+          // this.getMonthPatientList()
1642
+          const params = {
1643
+            'record_date': this.record_date,
1644
+            'patient_id': this.patientInfo.id,
1645
+            'his_patient_id': this.hisPatientInfo.id,
1646
+            'start_time': this.other_start_time,
1647
+            'end_time': this.other_end_time,
1648
+            'type': this.radio,
1649
+            'p_type': 2,
1650
+            'order_id': this.order.id
1651
+          }
1652
+
1653
+          getMonthCharge(params).then(response => {
1654
+            if (response.data.state == 0) {
1655
+              this.loading = false
1656
+
1657
+              this.$message.error(response.data.msg)
1658
+              return false
1659
+            } else {
1660
+              this.prescriptions = []
1661
+              this.month_prescriptions = []
1662
+              this.big_month_prescriptions = []
1663
+              this.big_prescriptions = []
1664
+              this.curPrescriptions = {}
1665
+              this.curMonthPrescriptions = {}
1666
+              this.loading = false
1667
+              this.patientInfo = response.data.data.xt_info
1668
+              this.hisPatientInfo = response.data.data.his_info
1669
+              this.info = response.data.data.info
1670
+              this.order = response.data.data.order
1671
+              this.p_type = ''
1672
+              this.sick_type = ''
1673
+              this.diagnosis = []
1674
+              this.sick_history = ''
1675
+              this.form.diagnosis = []
1676
+              if (this.info.id > 0) {
1677
+                this.form.p_type = response.data.data.info.register_type
1678
+                this.form.sick_type = response.data.data.info.sick_type
1679
+                if (response.data.data.info.diagnosis.length == 0) {
1680
+                  this.form.diagnosis = []
1681
+                } else {
1682
+                  for (let i = 0; i < response.data.data.info.diagnosis.split(',').length; i++) {
1683
+                    this.form.diagnosis.push(parseInt(response.data.data.info.diagnosis.split(',')[i]))
1684
+                  }
1685
+                }
1686
+                this.sick_history = this.info.sick_history
1687
+                if (this.info.register_type == 0) {
1688
+                  this.form.p_type = ''
1689
+                }
1690
+
1691
+                if (this.info.sick_type == 0) {
1692
+                  this.form.sick_type = ''
1693
+                }
1694
+              } else {
1695
+                this.form.p_type = 14
1696
+                this.form.sick_type = this.sick[0].id
1697
+                if (response.data.data.last_info.diagnoses.length == 0) {
1698
+                  this.form.diagnosis = []
1699
+                } else {
1700
+                  for (let i = 0; i < response.data.data.last_info.diagnosis.split(',').length; i++) {
1701
+                    this.form.diagnosis.push(parseInt(response.data.data.last_info.diagnosis.split(',')[i]))
1702
+                  }
1703
+                }
1704
+
1705
+                this.sick_history = ''
1706
+              }
1707
+              this.addtions_charge = response.data.data.addtions_charge
1708
+              this.setMonthPrescription(response.data.data.month_prescriptions)
1709
+
1710
+            }
1711
+          })
1712
+
1713
+
1641 1714
         }
1642 1715
       },
1643 1716
       searchAction() {
@@ -3258,237 +3331,290 @@
3258 3331
 
3259 3332
         }
3260 3333
         this.loading = true
3261
-        getChargeHisPatientInfo(params).then(response => {
3262
-          if (response.data.state == 0) {
3263
-            this.loading = false
3334
+        if(this.activeName == 'first'){
3264 3335
 
3265
-            this.$message.error(response.data.msg)
3266
-            return false
3267
-          } else {
3268
-            this.prescriptions = []
3269
-            this.month_prescriptions = []
3270
-            this.big_month_prescriptions = []
3271
-            this.big_prescriptions = []
3272
-            this.curPrescriptions = {}
3273
-            this.curMonthPrescriptions = {}
3274
-            this.loading = false
3275
-            this.patientInfo = response.data.data.xt_info
3276
-            this.hisPatientInfo = response.data.data.his_info
3277
-            this.info = response.data.data.info
3278
-            this.order = response.data.data.order
3279
-            this.p_type = ''
3280
-            this.sick_type = ''
3281
-            this.diagnosis = []
3282
-            this.sick_history = ''
3283
-            this.form.diagnosis = []
3284
-            if (this.info.id > 0) {
3285
-              this.form.p_type = response.data.data.info.register_type
3286
-              this.form.sick_type = response.data.data.info.sick_type
3287
-              if (response.data.data.info.diagnosis.length == 0) {
3288
-                this.form.diagnosis = []
3336
+          getChargeHisPatientInfo(params).then(response => {
3337
+            if (response.data.state == 0) {
3338
+              this.loading = false
3339
+
3340
+              this.$message.error(response.data.msg)
3341
+              return false
3342
+            } else {
3343
+              this.prescriptions = []
3344
+              this.month_prescriptions = []
3345
+              this.big_month_prescriptions = []
3346
+              this.big_prescriptions = []
3347
+              this.curPrescriptions = {}
3348
+              this.curMonthPrescriptions = {}
3349
+              this.loading = false
3350
+              this.patientInfo = response.data.data.xt_info
3351
+              this.hisPatientInfo = response.data.data.his_info
3352
+              this.info = response.data.data.info
3353
+              this.order = response.data.data.order
3354
+              this.p_type = ''
3355
+              this.sick_type = ''
3356
+              this.diagnosis = []
3357
+              this.sick_history = ''
3358
+              this.form.diagnosis = []
3359
+              if (this.info.id > 0) {
3360
+                this.form.p_type = response.data.data.info.register_type
3361
+                this.form.sick_type = response.data.data.info.sick_type
3362
+                if (response.data.data.info.diagnosis.length == 0) {
3363
+                  this.form.diagnosis = []
3364
+                } else {
3365
+                  for (let i = 0; i < response.data.data.info.diagnosis.split(',').length; i++) {
3366
+                    this.form.diagnosis.push(parseInt(response.data.data.info.diagnosis.split(',')[i]))
3367
+                  }
3368
+                }
3369
+                this.sick_history = this.info.sick_history
3370
+                if (this.info.register_type == 0) {
3371
+                  this.form.p_type = ''
3372
+                }
3373
+
3374
+                if (this.info.sick_type == 0) {
3375
+                  this.form.sick_type = ''
3376
+                }
3289 3377
               } else {
3290
-                for (let i = 0; i < response.data.data.info.diagnosis.split(',').length; i++) {
3291
-                  this.form.diagnosis.push(parseInt(response.data.data.info.diagnosis.split(',')[i]))
3378
+                this.form.p_type = 14
3379
+                this.form.sick_type = this.sick[0].id
3380
+                if (response.data.data.last_info.diagnoses.length == 0) {
3381
+                  this.form.diagnosis = []
3382
+                } else {
3383
+                  for (let i = 0; i < response.data.data.last_info.diagnosis.split(',').length; i++) {
3384
+                    this.form.diagnosis.push(parseInt(response.data.data.last_info.diagnosis.split(',')[i]))
3385
+                  }
3292 3386
                 }
3293
-              }
3294
-              this.sick_history = this.info.sick_history
3295
-              if (this.info.register_type == 0) {
3296
-                this.form.p_type = ''
3297
-              }
3298 3387
 
3299
-              if (this.info.sick_type == 0) {
3300
-                this.form.sick_type = ''
3388
+                this.sick_history = ''
3301 3389
               }
3302
-            } else {
3303
-              this.form.p_type = 14
3304
-              this.form.sick_type = this.sick[0].id
3305
-              if (response.data.data.last_info.diagnoses.length == 0) {
3306
-                this.form.diagnosis = []
3390
+              this.addtions_charge = response.data.data.addtions_charge
3391
+              // this.setMonthPrescription(response.data.data.month_prescriptions)
3392
+
3393
+              if (response.data.data.prescription.length > 0 && response.data.data.prescription[0].advices.length > 0) {
3394
+                this.prescription_id = response.data.data.prescription[0].advices[0].prescription_id
3307 3395
               } else {
3308
-                for (let i = 0; i < response.data.data.last_info.diagnosis.split(',').length; i++) {
3309
-                  this.form.diagnosis.push(parseInt(response.data.data.last_info.diagnosis.split(',')[i]))
3396
+                this.prescription_id = 0
3397
+              }
3398
+
3399
+              const big_prescriptions = []
3400
+
3401
+              for (let i = 0; i < this.unique_three(response.data.data.prescription).length; i++) {
3402
+                const obj = {
3403
+                  med_type: this.unique_three(response.data.data.prescription)[i].med_type,
3404
+                  prescriptions: []
3310 3405
                 }
3406
+                big_prescriptions.push(obj)
3311 3407
               }
3312 3408
 
3313
-              this.sick_history = ''
3314
-            }
3315
-            this.addtions_charge = response.data.data.addtions_charge
3316
-            this.setMonthPrescription(response.data.data.month_prescriptions)
3409
+              for (let c = 0; c < big_prescriptions.length; c++) {
3410
+                const inner_prescription = []
3411
+                for (let i = 0; i < response.data.data.prescription.length; i++) {
3412
+                  var prescription = response.data.data.prescription[i]
3413
+
3414
+                  if (big_prescriptions[c].med_type == prescription.med_type) {
3415
+                    const tempAdvice = []
3416
+                    const tempProject = []
3417
+                    const tempAddition = []
3418
+                    for (let b = 0; b < prescription.advices.length; b++) {
3419
+                      const obj = {
3420
+                        advice_id: prescription.advices[b].id,
3421
+                        drug_name: prescription.advices[b].advice_name,
3422
+                        single_dose: prescription.advices[b].single_dose,
3423
+                        delivery_way: prescription.advices[b].delivery_way,
3424
+                        execution_frequency: prescription.advices[b].execution_frequency,
3425
+                        retail_price: prescription.advices[b].price.toString(),
3426
+                        remark: prescription.advices[b].remark,
3427
+                        day: prescription.advices[b].day,
3428
+                        prescribing_number: prescription.advices[b].prescribing_number.toString(),
3429
+                        single_dose_unit: prescription.advices[b].single_dose_unit,
3430
+                        prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
3431
+                        medical_insurance_number: prescription.advices[b].med_list_codg
3317 3432
 
3318
-            if (response.data.data.prescription.length > 0 && response.data.data.prescription[0].advices.length > 0) {
3319
-              this.prescription_id = response.data.data.prescription[0].advices[0].prescription_id
3320
-            } else {
3321
-              this.prescription_id = 0
3322
-            }
3433
+                      }
3434
+                      tempAdvice.push(obj)
3435
+                    }
3323 3436
 
3324
-            const big_prescriptions = []
3437
+                    for (let b = 0; b < prescription.project.length; b++) {
3438
+                      const obj = {
3439
+                        id: prescription.project[b].id,
3440
+                        project_id: prescription.project[b].project.id,
3441
+                        // project_name: prescription.project[b].project.project_name,
3442
+                        // statistical_classification: prescription.project[b].project.statistical_classification,
3443
+                        single_dose: prescription.project[b].single_dose,
3444
+                        delivery_way: prescription.project[b].delivery_way,
3445
+                        execution_frequency: prescription.project[b].execution_frequency,
3446
+                        number_days: prescription.project[b].day,
3447
+                        total: prescription.project[b].count.toString(),
3448
+                        price: prescription.project[b].price,
3449
+                        remark: prescription.project[b].remark,
3450
+                        // medical_code: prescription.project[b].project.medical_code,
3451
+                        unit: prescription.project[b].unit,
3452
+                        type: prescription.project[b].type
3453
+                      }
3325 3454
 
3326
-            for (let i = 0; i < this.unique_three(response.data.data.prescription).length; i++) {
3327
-              const obj = {
3328
-                med_type: this.unique_three(response.data.data.prescription)[i].med_type,
3329
-                prescriptions: []
3330
-              }
3331
-              big_prescriptions.push(obj)
3332
-            }
3455
+                      if (prescription.project[b].type == 2) {
3456
+                        obj['statistical_classification'] = prescription.project[b].project.statistical_classification
3457
+                        obj['medical_code'] = prescription.project[b].project.medical_code
3458
+                        obj['project_name'] = prescription.project[b].project.project_name
3333 3459
 
3334
-            for (let c = 0; c < big_prescriptions.length; c++) {
3335
-              const inner_prescription = []
3336
-              for (let i = 0; i < response.data.data.prescription.length; i++) {
3337
-                var prescription = response.data.data.prescription[i]
3460
+                      } else if (prescription.project[b].type == 3) {
3461
+                        obj['statistical_classification'] = ''
3462
+                        obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
3463
+                        obj['project_name'] = prescription.project[b].good_info.good_name
3464
+                      }
3338 3465
 
3339
-                if (big_prescriptions[c].med_type == prescription.med_type) {
3340
-                  const tempAdvice = []
3341
-                  const tempProject = []
3342
-                  const tempAddition = []
3343
-                  for (let b = 0; b < prescription.advices.length; b++) {
3344
-                    const obj = {
3345
-                      advice_id: prescription.advices[b].id,
3346
-                      drug_name: prescription.advices[b].advice_name,
3347
-                      single_dose: prescription.advices[b].single_dose,
3348
-                      delivery_way: prescription.advices[b].delivery_way,
3349
-                      execution_frequency: prescription.advices[b].execution_frequency,
3350
-                      retail_price: prescription.advices[b].price.toString(),
3351
-                      remark: prescription.advices[b].remark,
3352
-                      day: prescription.advices[b].day,
3353
-                      prescribing_number: prescription.advices[b].prescribing_number.toString(),
3354
-                      single_dose_unit: prescription.advices[b].single_dose_unit,
3355
-                      prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
3356
-                      medical_insurance_number: prescription.advices[b].med_list_codg
3466
+                      tempProject.push(obj)
3467
+                    }
3357 3468
 
3469
+                    for (let b = 0; b < prescription.addition.length; b++) {
3470
+                      const obj = {
3471
+                        id: prescription.addition[b].id,
3472
+                        item_name: prescription.addition[b].item_name,
3473
+                        price: prescription.addition[b].price,
3474
+                        count: prescription.addition[b].count,
3475
+                        item_id: prescription.addition[b].item_id
3476
+                      }
3477
+                      tempAddition.push(obj)
3358 3478
                     }
3359
-                    tempAdvice.push(obj)
3360
-                  }
3479
+                    const index = i + 1
3480
+                    console.log('~~~~~~~~')
3481
+                    console.log(prescription.order)
3482
+                    prescription.order.order_status = prescription.order.order_status.toString()
3483
+                    prescription.order.order_status = parseInt(prescription.order.order_status)
3361 3484
 
3362
-                  for (let b = 0; b < prescription.project.length; b++) {
3363 3485
                     const obj = {
3364
-                      id: prescription.project[b].id,
3365
-                      project_id: prescription.project[b].project.id,
3366
-                      // project_name: prescription.project[b].project.project_name,
3367
-                      // statistical_classification: prescription.project[b].project.statistical_classification,
3368
-                      single_dose: prescription.project[b].single_dose,
3369
-                      delivery_way: prescription.project[b].delivery_way,
3370
-                      execution_frequency: prescription.project[b].execution_frequency,
3371
-                      number_days: prescription.project[b].day,
3372
-                      total: prescription.project[b].count.toString(),
3373
-                      price: prescription.project[b].price,
3374
-                      remark: prescription.project[b].remark,
3375
-                      // medical_code: prescription.project[b].project.medical_code,
3376
-                      unit: prescription.project[b].unit,
3377
-                      type: prescription.project[b].type
3486
+                      id: prescription.id,
3487
+                      name: this.getPName(prescription.med_type, index),
3488
+                      advices: tempAdvice,
3489
+                      project: tempProject,
3490
+                      addition: tempAddition,
3491
+                      order_status: prescription.order_status,
3492
+                      type: prescription.type,
3493
+                      med_type: prescription.med_type,
3494
+                      order: prescription.order
3378 3495
                     }
3496
+                    // inner_prescription.push(obj)
3497
+                    big_prescriptions[c].prescriptions.push(obj)
3379 3498
 
3380
-                    if (prescription.project[b].type == 2) {
3381
-                      obj['statistical_classification'] = prescription.project[b].project.statistical_classification
3382
-                      obj['medical_code'] = prescription.project[b].project.medical_code
3383
-                      obj['project_name'] = prescription.project[b].project.project_name
3499
+                    this.prescriptions.push(obj)
3500
+                  }
3501
+                }
3502
+              }
3384 3503
 
3385
-                    } else if (prescription.project[b].type == 3) {
3386
-                      obj['statistical_classification'] = ''
3387
-                      obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
3388
-                      obj['project_name'] = prescription.project[b].good_info.good_name
3389
-                    }
3504
+              this.big_prescriptions = JSON.parse(JSON.stringify(big_prescriptions))
3390 3505
 
3391
-                    tempProject.push(obj)
3392
-                  }
3506
+              for (let i = 0; i < this.big_prescriptions.length; i++) {
3507
+                if (this.big_prescriptions[i].med_type == '11') {
3508
+                  this.big_prescriptions[i]['is_true'] = 1
3509
+                }
3510
+              }
3393 3511
 
3394
-                  for (let b = 0; b < prescription.addition.length; b++) {
3512
+              for (let i = 0; i < this.big_prescriptions.length; i++) {
3513
+                if (this.big_prescriptions[i].is_true == 1) {
3514
+                  for (let b = 0; b < this.big_prescriptions[i].prescriptions.length; b++) {
3395 3515
                     const obj = {
3396
-                      id: prescription.addition[b].id,
3397
-                      item_name: prescription.addition[b].item_name,
3398
-                      price: prescription.addition[b].price,
3399
-                      count: prescription.addition[b].count,
3400
-                      item_id: prescription.addition[b].item_id
3516
+                      med_type: '11',
3517
+                      prescriptions: []
3401 3518
                     }
3402
-                    tempAddition.push(obj)
3519
+                    const arr = []
3520
+                    arr.push(this.big_prescriptions[i].prescriptions[b])
3521
+                    obj.prescriptions = arr
3522
+                    this.big_prescriptions.push(obj)
3403 3523
                   }
3404
-                  const index = i + 1
3405
-                  console.log('~~~~~~~~')
3406
-                  console.log(prescription.order)
3407
-                  prescription.order.order_status = prescription.order.order_status.toString()
3408
-                  prescription.order.order_status = parseInt(prescription.order.order_status)
3409
-
3410
-                  const obj = {
3411
-                    id: prescription.id,
3412
-                    name: this.getPName(prescription.med_type, index),
3413
-                    advices: tempAdvice,
3414
-                    project: tempProject,
3415
-                    addition: tempAddition,
3416
-                    order_status: prescription.order_status,
3417
-                    type: prescription.type,
3418
-                    med_type: prescription.med_type,
3419
-                    order: prescription.order
3420
-                  }
3421
-                  // inner_prescription.push(obj)
3422
-                  big_prescriptions[c].prescriptions.push(obj)
3423
-
3424
-                  this.prescriptions.push(obj)
3425 3524
                 }
3426 3525
               }
3427
-            }
3428
-
3429
-            this.big_prescriptions = JSON.parse(JSON.stringify(big_prescriptions))
3430 3526
 
3431
-            for (let i = 0; i < this.big_prescriptions.length; i++) {
3432
-              if (this.big_prescriptions[i].med_type == '11') {
3433
-                this.big_prescriptions[i]['is_true'] = 1
3527
+              console.log(this.big_prescriptions)
3528
+              //
3529
+              for (let i = 0; i < this.big_prescriptions.length; i++) {
3530
+                if (this.big_prescriptions[i].is_true == 1) {
3531
+                  this.big_prescriptions.splice(i, 1)
3532
+                }
3434 3533
               }
3435
-            }
3534
+              // console.log(this.big_prescriptions)
3436 3535
 
3437
-            for (let i = 0; i < this.big_prescriptions.length; i++) {
3438
-              if (this.big_prescriptions[i].is_true == 1) {
3439
-                for (let b = 0; b < this.big_prescriptions[i].prescriptions.length; b++) {
3440
-                  const obj = {
3441
-                    med_type: '11',
3442
-                    prescriptions: []
3443
-                  }
3444
-                  const arr = []
3445
-                  arr.push(this.big_prescriptions[i].prescriptions[b])
3446
-                  obj.prescriptions = arr
3447
-                  this.big_prescriptions.push(obj)
3536
+              for (let i = 0; i < this.big_prescriptions.length; i++) {
3537
+                if (this.big_prescriptions[i].prescriptions.length > 0) {
3538
+                  this.big_prescriptions[i]['curPrescriptions'] = JSON.parse(JSON.stringify(this.big_prescriptions[i].prescriptions[0]))
3539
+                } else {
3540
+                  this.big_prescriptions[i]['curPrescriptions'] = {}
3448 3541
                 }
3542
+                this.big_prescriptions[i]['total'] = this.getTotalThree(this.big_prescriptions[i])
3449 3543
               }
3450
-            }
3451 3544
 
3452
-            console.log(this.big_prescriptions)
3453
-            //
3454
-            for (let i = 0; i < this.big_prescriptions.length; i++) {
3455
-              if (this.big_prescriptions[i].is_true == 1) {
3456
-                this.big_prescriptions.splice(i, 1)
3545
+              if (this.big_prescriptions.length > 0) {
3546
+                this.editableTabsValue = this.getPName(this.big_prescriptions[0].med_type, 1)
3457 3547
               }
3548
+
3549
+
3458 3550
             }
3459
-            // console.log(this.big_prescriptions)
3551
+          })
3552
+
3460 3553
 
3461
-            for (let i = 0; i < this.big_prescriptions.length; i++) {
3462
-              if (this.big_prescriptions[i].prescriptions.length > 0) {
3463
-                this.big_prescriptions[i]['curPrescriptions'] = JSON.parse(JSON.stringify(this.big_prescriptions[i].prescriptions[0]))
3554
+        }else{
3555
+
3556
+          getMonthCharge(params).then(response => {
3557
+            if (response.data.state == 0) {
3558
+              this.loading = false
3559
+
3560
+              this.$message.error(response.data.msg)
3561
+              return false
3562
+            } else {
3563
+              this.prescriptions = []
3564
+              this.month_prescriptions = []
3565
+              this.big_month_prescriptions = []
3566
+              this.big_prescriptions = []
3567
+              this.curPrescriptions = {}
3568
+              this.curMonthPrescriptions = {}
3569
+              this.loading = false
3570
+              this.patientInfo = response.data.data.xt_info
3571
+              this.hisPatientInfo = response.data.data.his_info
3572
+              this.info = response.data.data.info
3573
+              this.order = response.data.data.order
3574
+              this.p_type = ''
3575
+              this.sick_type = ''
3576
+              this.diagnosis = []
3577
+              this.sick_history = ''
3578
+              this.form.diagnosis = []
3579
+              if (this.info.id > 0) {
3580
+                this.form.p_type = response.data.data.info.register_type
3581
+                this.form.sick_type = response.data.data.info.sick_type
3582
+                if (response.data.data.info.diagnosis.length == 0) {
3583
+                  this.form.diagnosis = []
3584
+                } else {
3585
+                  for (let i = 0; i < response.data.data.info.diagnosis.split(',').length; i++) {
3586
+                    this.form.diagnosis.push(parseInt(response.data.data.info.diagnosis.split(',')[i]))
3587
+                  }
3588
+                }
3589
+                this.sick_history = this.info.sick_history
3590
+                if (this.info.register_type == 0) {
3591
+                  this.form.p_type = ''
3592
+                }
3593
+
3594
+                if (this.info.sick_type == 0) {
3595
+                  this.form.sick_type = ''
3596
+                }
3464 3597
               } else {
3465
-                this.big_prescriptions[i]['curPrescriptions'] = {}
3598
+                this.form.p_type = 14
3599
+                this.form.sick_type = this.sick[0].id
3600
+                if (response.data.data.last_info.diagnoses.length == 0) {
3601
+                  this.form.diagnosis = []
3602
+                } else {
3603
+                  for (let i = 0; i < response.data.data.last_info.diagnosis.split(',').length; i++) {
3604
+                    this.form.diagnosis.push(parseInt(response.data.data.last_info.diagnosis.split(',')[i]))
3605
+                  }
3606
+                }
3607
+
3608
+                this.sick_history = ''
3466 3609
               }
3467
-              this.big_prescriptions[i]['total'] = this.getTotalThree(this.big_prescriptions[i])
3468
-            }
3610
+              this.addtions_charge = response.data.data.addtions_charge
3611
+              this.setMonthPrescription(response.data.data.month_prescriptions)
3469 3612
 
3470
-            if (this.big_prescriptions.length > 0) {
3471
-              this.editableTabsValue = this.getPName(this.big_prescriptions[0].med_type, 1)
3472 3613
             }
3614
+          })
3473 3615
 
3474
-            console.log(this.big_prescriptions)
3475
-            console.log(this.big_prescriptions[0].curPrescriptions.order_status)
3476
-
3477
-            //
3478
-            // if (this.prescriptions.length > 0) {
3479
-            //   this.curPrescriptions = this.prescriptions[0]
3480
-            // } else {
3481
-            //   this.curPrescriptions = {}
3482
-            // }
3483
-            // if (this.month_prescriptions.length > 0) {
3484
-            //   this.curMonthPrescriptions = this.month_prescriptions[0]
3485
-            // } else {
3486
-            //   this.curMonthPrescriptions = {}
3487
-            // }
3488
-
3489
-            // this.month_total = this.getMonthTotalOne()
3490
-          }
3491
-        })
3616
+
3617
+        }
3492 3618
       }
3493 3619
       // sz_open(index, med_type, order, prescriptions) {
3494 3620
       //   switch (index) {

+ 346 - 171
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue View File

@@ -24,18 +24,18 @@
24 24
                         <el-input v-model="patientInfo.id_card_no" placeholder="" readonly></el-input>
25 25
                     </el-form-item>
26 26
                     <!--<el-form-item label="处方类型: " prop="name" label-position="right">-->
27
-                        <!--<el-select style="width:100%;" v-model="register_type" placeholder="">-->
28
-                            <!--<el-option-->
29
-                                    <!--v-for="(item,index) in register"-->
30
-                                    <!--:key="index"-->
31
-                                    <!--:label="item.label"-->
32
-                                    <!--:value="item.value">-->
33
-                            <!--</el-option>-->
34
-                        <!--</el-select>-->
27
+                    <!--<el-select style="width:100%;" v-model="register_type" placeholder="">-->
28
+                    <!--<el-option-->
29
+                    <!--v-for="(item,index) in register"-->
30
+                    <!--:key="index"-->
31
+                    <!--:label="item.label"-->
32
+                    <!--:value="item.value">-->
33
+                    <!--</el-option>-->
34
+                    <!--</el-select>-->
35 35
                     <!--</el-form-item>-->
36 36
                     <el-form-item label="疾病类型:" prop="name" label-position="right">
37 37
 
38
-                        <el-select  filterable style="width:100%;" v-model="state1" placeholder="">
38
+                        <el-select filterable style="width:100%;" v-model="state1" placeholder="">
39 39
                             <el-option
40 40
                                     v-for="(item,index) in sick"
41 41
                                     :key="index"
@@ -48,7 +48,7 @@
48 48
 
49 49
                     <el-form-item label="诊断:" prop="name" label-position="right" style="width:66.6%;">
50 50
 
51
-                        <el-select style="width:100%;"  v-model="diagnose" placeholder="" multiple filterable>
51
+                        <el-select style="width:100%;" v-model="diagnose" placeholder="" multiple filterable>
52 52
                             <el-option
53 53
                                     v-for="(item,index) in diagnoses"
54 54
                                     :key="index"
@@ -128,7 +128,8 @@
128 128
                                 </el-date-picker>
129 129
 
130 130
 
131
-                                <el-select style="width:50%;" v-model="item.med_type" placeholder="医疗类型"   @change="changevalue" >
131
+                                <el-select style="width:50%;" v-model="item.med_type" placeholder="医疗类型"
132
+                                           @change="changevalue">
132 133
                                     <el-option
133 134
                                             v-for="(item,index) in register"
134 135
                                             :key="index"
@@ -280,8 +281,8 @@
280 281
                                         </el-table-column>
281 282
                                         <el-table-column label="规格" width="60">
282 283
                                             <template slot-scope="scope">
283
-                                              <!-- {{ scope.row.drug_spec }} -->
284
-                                              <span v-if="scope.row.min_unit != scope.row.dose_unit">{{scope.row.dose}}{{scope.row.dose_unit}}&nbsp;* &nbsp;</span>{{scope.row.min_number}}{{scope.row.min_unit}}/{{scope.row.max_unit}}
284
+                                                <!-- {{ scope.row.drug_spec }} -->
285
+                                                <span v-if="scope.row.min_unit != scope.row.dose_unit">{{scope.row.dose}}{{scope.row.dose_unit}}&nbsp;* &nbsp;</span>{{scope.row.min_number}}{{scope.row.min_unit}}/{{scope.row.max_unit}}
285 286
                                             </template>
286 287
                                         </el-table-column>
287 288
                                         <el-table-column label="库存" width="60">
@@ -519,25 +520,25 @@
519 520
           { value: 11, label: '普通门诊' },
520 521
           // { value: 12, label: '门诊挂号' },
521 522
           // { value: 13, label: '急诊' },
522
-          { value: 14, label: '门诊特殊病' },
523
+          { value: 14, label: '门诊特殊病' }
523 524
           // { value: 15, label: '门诊统筹' },
524 525
           // { value: 16, label: '门诊慢性病' },
525 526
           // { value: 21, label: '普通住院' }
526 527
 
527 528
         ],
528
-        medical_care:[
529
-          {value: 11, label: "普通门诊"},
530
-          {value: 12, label: '家庭通道'},
531
-          {value: 13, label: "门诊大病"},
532
-          {value: 14, label: "重疾特药"},
533
-          {value: 15, label: "门诊慢病"},
534
-          {value: 16, label: "门诊特检"},
535
-          {value: 17, label: "健康体检"},
536
-          {value: 18, label: "预防接种"},
537
-          {value: 19, label: "门诊输血"},
538
-          {value: 91, label: "新冠肺炎门诊"},
539
-          {value: 1111, label: "精一"},
540
-          {value: 1112, label: "精二"},
529
+        medical_care: [
530
+          { value: 11, label: '普通门诊' },
531
+          { value: 12, label: '家庭通道' },
532
+          { value: 13, label: '门诊大病' },
533
+          { value: 14, label: '重疾特药' },
534
+          { value: 15, label: '门诊慢病' },
535
+          { value: 16, label: '门诊特检' },
536
+          { value: 17, label: '健康体检' },
537
+          { value: 18, label: '预防接种' },
538
+          { value: 19, label: '门诊输血' },
539
+          { value: 91, label: '新冠肺炎门诊' },
540
+          { value: 1111, label: '精一' },
541
+          { value: 1112, label: '精二' }
541 542
 
542 543
         ],
543 544
 
@@ -546,7 +547,7 @@
546 547
         register_type: '',
547 548
         value: '0',
548 549
         search_project_keyword: '',
549
-        search_project_team_keyword:"",
550
+        search_project_team_keyword: '',
550 551
         form: {
551 552
           name: ''
552 553
         },
@@ -588,7 +589,7 @@
588 589
         showTwo: false,
589 590
         tableData: [],
590 591
         tabPrjectTeam: [],
591
-        allTabPrjectTeam:[],
592
+        allTabPrjectTeam: [],
592 593
         teamList: [],
593 594
         doctors: [],
594 595
         departMent: [],
@@ -746,7 +747,6 @@
746 747
               // obj['single_dose_unit'] = drug_month_prescriptions.advices[a].single_dose_unit
747 748
               obj['single_dose_unit'] = drug_month_prescriptions.advices[a].drug.dose_unit
748 749
 
749
-
750 750
               // obj['retail_price'] = obj['retail_price'] +  drug_month_prescriptions.advices[a].drug.retail_price
751 751
               obj['retail_price'] = parseFloat(drug_month_prescriptions.advices[a].price)
752 752
               obj['drug'] = drug_month_prescriptions.advices[a].drug
@@ -1299,8 +1299,7 @@
1299 1299
             ':' + (min < 10 ? '0' + min : min)
1300 1300
           this.prescriptions[i]['pre_time'] = nowTime
1301 1301
 
1302
-            this.prescriptions[i]['med_type'] = 14
1303
-
1302
+          this.prescriptions[i]['med_type'] = 14
1304 1303
 
1305 1304
           this.prescriptions[i].name = '处方' + (i + 1)
1306 1305
           if (i == 0) {
@@ -1324,7 +1323,7 @@
1324 1323
         this.$refs.call_prescription.close()
1325 1324
         this.$emit('setData', this.prescriptions)
1326 1325
 
1327
-      },changevalue(val){
1326
+      }, changevalue(val) {
1328 1327
 
1329 1328
         this.$forceUpdate()
1330 1329
 
@@ -1742,7 +1741,6 @@
1742 1741
             this.diagnoses = response.data.data.diagnose
1743 1742
             this.additions = response.data.data.additions
1744 1743
 
1745
-
1746 1744
           }
1747 1745
         })
1748 1746
 
@@ -1847,12 +1845,11 @@
1847 1845
         this.teamList = []
1848 1846
 
1849 1847
       },
1850
-      setData(data, info, admin_info, doctors, department, hisPatientInfo, month_data,last_info) {
1848
+      setData(data, info, admin_info, doctors, department, hisPatientInfo, month_data, last_info) {
1851 1849
         this.curMonthPrescriptions = {}
1852 1850
         this.curPrescriptions = {}
1853 1851
         // this.$refs.tabProjectTeam.clearSelection()
1854 1852
 
1855
-
1856 1853
         for (let i = 0; i < doctors.length; i++) {
1857 1854
           if (doctors[i].user_type == 1) {
1858 1855
             doctors.splice(i, 1)
@@ -1865,12 +1862,9 @@
1865 1862
         this.$emit('event1', this.prescription_id)
1866 1863
         this.curStatus = 0
1867 1864
         if (month_data && month_data.length > 0) {
1868
-
1869 1865
           this.curMonthPrescriptions = month_data[0]
1870
-
1871 1866
         } else {
1872 1867
           this.curMonthPrescriptions = {}
1873
-
1874 1868
         }
1875 1869
 
1876 1870
         if (data && data.length > 0) {
@@ -1880,7 +1874,6 @@
1880 1874
           this.curPrescriptions = {}
1881 1875
         }
1882 1876
 
1883
-
1884 1877
         if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
1885 1878
           this.curStatus = 1
1886 1879
           this.customTabIndex = 1
@@ -1897,7 +1890,6 @@
1897 1890
           this.showTwo = true
1898 1891
         }
1899 1892
 
1900
-
1901 1893
         if (this.curPrescriptions.project.length == 0 && this.curPrescriptions.advices.length == 0) {
1902 1894
           this.curStatus = 1
1903 1895
           this.customTabIndex = 1
@@ -1906,9 +1898,6 @@
1906 1898
           this.showTwo = false
1907 1899
         }
1908 1900
 
1909
-
1910
-
1911
-
1912 1901
         if (info.prescription_status == 0) {
1913 1902
           this.order_status = ''
1914 1903
         }
@@ -1924,113 +1913,288 @@
1924 1913
           this.order_status = '已退费'
1925 1914
         }
1926 1915
 
1916
+        if (info.id > 0) {
1917
+          this.doctorValue = info.doctor_id
1918
+          this.departmentValue = info.departments
1919
+        } else {
1920
+          if(admin_info.id > 0 && admin_info.user_type == 2){
1921
+            this.doctorValue = admin_info.admin_user_id
1922
+            this.departmentValue = this.department[0].id
1927 1923
 
1924
+          }else{
1928 1925
 
1929
-        getInitData().then(response => {
1930
-          if (response.data.state == 0) {
1931
-            this.$message.error(response.data.msg)
1932
-            return false
1933
-          } else {
1934
-            this.drugs = response.data.data.drugs
1935
-            this.allDrugs = response.data.data.drugs
1936
-            this.advices_template = response.data.data.advices_template
1937
-            this.doctors = response.data.data.doctors
1938
-            for (let i = 0; i < this.doctors.length; i++) {
1939
-              if (this.doctors[i].user_type == 1) {
1940
-                this.doctors.splice(i, 1)
1941
-              }
1942
-            }
1943
-            this.department = response.data.data.department
1944
-            this.sick = response.data.data.sick
1945
-            this.diagnoses = response.data.data.diagnose
1946
-            this.additions = response.data.data.additions
1926
+            this.doctorValue = this.doctors[0].admin_user_id
1927
+            this.departmentValue = this.department[0].id
1947 1928
 
1929
+          }
1948 1930
 
1949 1931
 
1932
+        }
1950 1933
 
1934
+        if (info.register_type == 0) {
1935
+          for (let i = 0; i < this.register.length; i++) {
1936
+            this.register_type = this.register[0].value
1937
+          }
1938
+        } else {
1939
+          this.register_type = info.register_type
1940
+        }
1941
+        this.diagnose = []
1951 1942
 
1952
-            if (info.id > 0) {
1953
-              this.doctorValue = info.doctor_id
1954
-              this.departmentValue = info.departments
1955
-            } else {
1956
-              if(admin_info.id > 0 && admin_info.user_type == 2){
1957
-                this.doctorValue = admin_info.admin_user_id
1958
-                this.departmentValue = this.department[0].id
1943
+        if(info.id == 0){
1944
+          if(last_info.diagnosis.length == 0){
1945
+            this.diagnose = []
1946
+          }else{
1947
+            for(let i = 0; i < last_info.diagnosis.split(",").length;i++){
1948
+              this.diagnose.push(parseInt(last_info.diagnosis.split(",")[i]))
1959 1949
 
1960
-              }else{
1950
+            }
1951
+          }
1961 1952
 
1962
-                this.doctorValue = this.doctors[0].admin_user_id
1963
-                this.departmentValue = this.department[0].id
1953
+          if(last_info.sick_history == 0){
1954
+            this.state2 = ''
1955
+          }else{
1956
+            this.state2 = last_info.sick_history
1957
+          }
1964 1958
 
1965
-              }
1966 1959
 
1960
+        }else{
1961
+          this.state2 = info.sick_history
1962
+          if (this.state2 == 0) {
1963
+            this.state2 = ''
1964
+          }
1965
+          if(info.diagnosis.length == 0){
1966
+            this.diagnose = []
1967
+          }else{
1968
+            for(let i = 0; i < info.diagnosis.split(",").length;i++){
1969
+              this.diagnose.push(parseInt(info.diagnosis.split(",")[i]))
1967 1970
 
1968 1971
             }
1969 1972
 
1970
-            if (info.register_type == 0) {
1971
-              for (let i = 0; i < this.register.length; i++) {
1972
-                this.register_type = this.register[0].value
1973
-              }
1974
-            } else {
1975
-              this.register_type = info.register_type
1976
-            }
1977
-            this.diagnose = []
1973
+          }
1978 1974
 
1979
-            if(info.id == 0){
1980
-              if(last_info.diagnosis.length == 0){
1981
-                this.diagnose = []
1982
-              }else{
1983
-                for(let i = 0; i < last_info.diagnosis.split(",").length;i++){
1984
-                  this.diagnose.push(parseInt(last_info.diagnosis.split(",")[i]))
1975
+        }
1985 1976
 
1986
-                }
1987
-              }
1988 1977
 
1989
-              if(last_info.sick_history == 0){
1990
-                this.state2 = ''
1991
-              }else{
1992
-                this.state2 = last_info.sick_history
1993
-              }
1994 1978
 
1979
+        this.state1 = info.sick_type
1980
+        if (this.state1 == 0 || this.state1 == "") {
1981
+          this.state1 = ''
1982
+          for (let i = 0; i < this.sick.length; i++) {
1983
+            this.state1 = this.sick[0].id
1984
+          }
1985
+        }
1995 1986
 
1996
-            }else{
1997
-              this.state2 = info.sick_history
1998
-              if (this.state2 == 0) {
1999
-                this.state2 = ''
2000
-              }
2001
-              if(info.diagnosis.length == 0){
2002
-                this.diagnose = []
2003
-              }else{
2004
-                for(let i = 0; i < info.diagnosis.split(",").length;i++){
2005
-                  this.diagnose.push(parseInt(info.diagnosis.split(",")[i]))
1987
+        if(this.departmentValue == "" || this.departmentValue == 0){
1988
+          if(this.department.length > 0){
1989
+            this.departmentValue = this.department[0].id
2006 1990
 
2007
-                }
1991
+          }
1992
+        }
2008 1993
 
2009
-              }
2010 1994
 
2011
-            }
1995
+          // getInitData().then(response => {
1996
+          //   if (response.data.state == 0) {
1997
+          //     this.$message.error(response.data.msg)
1998
+          //     return false
1999
+          //   } else {
2000
+          //     this.onceTime = false
2001
+          //     this.drugs = response.data.data.drugs
2002
+          //     this.allDrugs = response.data.data.drugs
2003
+          //     this.advices_template = response.data.data.advices_template
2004
+          //     this.doctors = response.data.data.doctors
2005
+          //     for (let i = 0; i < this.doctors.length; i++) {
2006
+          //       if (this.doctors[i].user_type == 1) {
2007
+          //         this.doctors.splice(i, 1)
2008
+          //       }
2009
+          //     }
2010
+          //     this.department = response.data.data.department
2011
+          //     this.sick = response.data.data.sick
2012
+          //     this.diagnoses = response.data.data.diagnose
2013
+          //     this.additions = response.data.data.additions
2012 2014
 
2013 2015
 
2014 2016
 
2015
-            this.state1 = info.sick_type
2016
-            if (this.state1 == 0 || this.state1 == "") {
2017
-              this.state1 = ''
2018
-              for (let i = 0; i < this.sick.length; i++) {
2019
-                this.state1 = this.sick[0].id
2020
-              }
2017
+
2018
+
2019
+          //     if (info.id > 0) {
2020
+          //       this.doctorValue = info.doctor_id
2021
+          //       this.departmentValue = info.departments
2022
+          //     } else {
2023
+          //       if(admin_info.id > 0 && admin_info.user_type == 2){
2024
+          //         this.doctorValue = admin_info.admin_user_id
2025
+          //         this.departmentValue = this.department[0].id
2026
+
2027
+          //       }else{
2028
+
2029
+          //         this.doctorValue = this.doctors[0].admin_user_id
2030
+          //         this.departmentValue = this.department[0].id
2031
+
2032
+          //       }
2033
+
2034
+
2035
+          //     }
2036
+
2037
+          //     if (info.register_type == 0) {
2038
+          //       for (let i = 0; i < this.register.length; i++) {
2039
+          //         this.register_type = this.register[0].value
2040
+          //       }
2041
+          //     } else {
2042
+          //       this.register_type = info.register_type
2043
+          //     }
2044
+          //     this.diagnose = []
2045
+
2046
+          //     if(info.id == 0){
2047
+          //       if(last_info.diagnosis.length == 0){
2048
+          //         this.diagnose = []
2049
+          //       }else{
2050
+          //         for(let i = 0; i < last_info.diagnosis.split(",").length;i++){
2051
+          //           this.diagnose.push(parseInt(last_info.diagnosis.split(",")[i]))
2052
+
2053
+          //         }
2054
+          //       }
2055
+
2056
+          //       if(last_info.sick_history == 0){
2057
+          //         this.state2 = ''
2058
+          //       }else{
2059
+          //         this.state2 = last_info.sick_history
2060
+          //       }
2061
+
2062
+
2063
+          //     }else{
2064
+          //       this.state2 = info.sick_history
2065
+          //       if (this.state2 == 0) {
2066
+          //         this.state2 = ''
2067
+          //       }
2068
+          //       if(info.diagnosis.length == 0){
2069
+          //         this.diagnose = []
2070
+          //       }else{
2071
+          //         for(let i = 0; i < info.diagnosis.split(",").length;i++){
2072
+          //           this.diagnose.push(parseInt(info.diagnosis.split(",")[i]))
2073
+
2074
+          //         }
2075
+
2076
+          //       }
2077
+
2078
+          //     }
2079
+
2080
+
2081
+
2082
+          //     this.state1 = info.sick_type
2083
+          //     if (this.state1 == 0 || this.state1 == "") {
2084
+          //       this.state1 = ''
2085
+          //       for (let i = 0; i < this.sick.length; i++) {
2086
+          //         this.state1 = this.sick[0].id
2087
+          //       }
2088
+          //     }
2089
+
2090
+          //     if(this.departmentValue == "" || this.departmentValue == 0){
2091
+          //       if(this.department.length > 0){
2092
+          //         this.departmentValue = this.department[0].id
2093
+
2094
+          //       }
2095
+          //     }
2096
+
2097
+          //   }
2098
+          // })
2099
+
2100
+      },
2101
+      setMonthData(info, admin_info, doctors, department, hisPatientInfo, month_data, last_info) {
2102
+        this.curMonthPrescriptions = {}
2103
+        this.curPrescriptions = {}
2104
+        // this.$refs.tabProjectTeam.clearSelection()
2105
+
2106
+        for (let i = 0; i < doctors.length; i++) {
2107
+          if (doctors[i].user_type == 1) {
2108
+            doctors.splice(i, 1)
2109
+          }
2110
+        }
2111
+
2112
+        this.editableTabsValue = '处方1'
2113
+        this.curStatus = 0
2114
+        if (month_data && month_data.length > 0) {
2115
+          this.curMonthPrescriptions = month_data[0]
2116
+        } else {
2117
+          this.curMonthPrescriptions = {}
2118
+        }
2119
+
2120
+        if (info.prescription_status == 0) {
2121
+          this.order_status = ''
2122
+        }
2123
+
2124
+        if (info.id > 0) {
2125
+          this.doctorValue = info.doctor_id
2126
+          this.departmentValue = info.departments
2127
+        } else {
2128
+          if(admin_info.id > 0 && admin_info.user_type == 2){
2129
+            this.doctorValue = admin_info.admin_user_id
2130
+            this.departmentValue = this.department[0].id
2131
+
2132
+          }else{
2133
+
2134
+            this.doctorValue = this.doctors[0].admin_user_id
2135
+            this.departmentValue = this.department[0].id
2136
+
2137
+          }
2138
+
2139
+
2140
+        }
2141
+
2142
+        if (info.register_type == 0) {
2143
+          for (let i = 0; i < this.register.length; i++) {
2144
+            this.register_type = this.register[0].value
2145
+          }
2146
+        } else {
2147
+          this.register_type = info.register_type
2148
+        }
2149
+        this.diagnose = []
2150
+
2151
+        if(info.id == 0){
2152
+          if(last_info.diagnosis.length == 0){
2153
+            this.diagnose = []
2154
+          }else{
2155
+            for(let i = 0; i < last_info.diagnosis.split(",").length;i++){
2156
+              this.diagnose.push(parseInt(last_info.diagnosis.split(",")[i]))
2157
+
2021 2158
             }
2159
+          }
2022 2160
 
2023
-            if(this.departmentValue == "" || this.departmentValue == 0){
2024
-              if(this.department.length > 0){
2025
-                this.departmentValue = this.department[0].id
2161
+          if(last_info.sick_history == 0){
2162
+            this.state2 = ''
2163
+          }else{
2164
+            this.state2 = last_info.sick_history
2165
+          }
2026 2166
 
2027
-              }
2167
+
2168
+        }else{
2169
+          this.state2 = info.sick_history
2170
+          if (this.state2 == 0) {
2171
+            this.state2 = ''
2172
+          }
2173
+          if(info.diagnosis.length == 0){
2174
+            this.diagnose = []
2175
+          }else{
2176
+            for(let i = 0; i < info.diagnosis.split(",").length;i++){
2177
+              this.diagnose.push(parseInt(info.diagnosis.split(",")[i]))
2028 2178
             }
2179
+          }
2180
+        }
2181
+        this.state1 = info.sick_type
2182
+        if (this.state1 == 0 || this.state1 == "") {
2183
+          this.state1 = ''
2184
+          for (let i = 0; i < this.sick.length; i++) {
2185
+            this.state1 = this.sick[0].id
2186
+          }
2187
+        }
2188
+
2189
+        if(this.departmentValue == "" || this.departmentValue == 0){
2190
+          if(this.department.length > 0){
2191
+            this.departmentValue = this.department[0].id
2029 2192
 
2030 2193
           }
2031
-        })
2194
+        }
2032 2195
 
2033 2196
       },
2197
+
2034 2198
       moreState(tab, event) {
2035 2199
         if (tab == 'more') {
2036 2200
           return false
@@ -2179,21 +2343,21 @@
2179 2343
               'prescriptions': this.prescriptions
2180 2344
             }
2181 2345
             isLoading = true
2182
-            console.log('this.prescriptionsthis.prescriptions',this.prescriptions)
2346
+            console.log('this.prescriptionsthis.prescriptions', this.prescriptions)
2183 2347
             let num = 0
2184 2348
             this.prescriptions.map(item => {
2185
-              if(item.advices.length > 0){
2349
+              if (item.advices.length > 0) {
2186 2350
                 item.advices.map(it => {
2187
-                  if(it.drug.total <= 0){
2351
+                  if (it.drug.total <= 0) {
2188 2352
                     num++
2189
-                    setTimeout(() =>{
2353
+                    setTimeout(() => {
2190 2354
                       this.$message.error(it.drug.drug_name + '库存不足')
2191
-                    },100)
2355
+                    }, 100)
2192 2356
                   }
2193 2357
                 })
2194 2358
               }
2195 2359
             })
2196
-            if(num == 0){
2360
+            if (num == 0) {
2197 2361
               createHisPrescription(data, params).then(response => {
2198 2362
                 if (response.data.state == 1) {
2199 2363
                   this.$emit('change', this.patientInfo.id)
@@ -2230,7 +2394,7 @@
2230 2394
             if (index == 1) {
2231 2395
               let params = {
2232 2396
                 patient_id: this.patientInfo.id,
2233
-                diagnose: this.diagnose.join(","),
2397
+                diagnose: this.diagnose.join(','),
2234 2398
                 sick_type: this.state1,
2235 2399
                 sick_history: this.state2,
2236 2400
                 doctor: this.doctorValue,
@@ -2325,17 +2489,14 @@
2325 2489
           advices: [],
2326 2490
           project: [],
2327 2491
           addition: [],
2328
-          pre_time: this.prescriptions[0].pre_time,
2329
-
2492
+          pre_time: this.prescriptions[0].pre_time
2330 2493
 
2331 2494
         }
2332 2495
 
2333
-          obj.med_type = 14
2334
-
2496
+        obj.med_type = 14
2335 2497
 
2336 2498
         this.prescriptions.push(obj)
2337 2499
 
2338
-
2339 2500
         this.editableTabsValue = newTabName
2340 2501
         this.curPrescriptions = this.prescriptions[this.prescriptions.length - 1]
2341 2502
         this.curStatus = 0
@@ -2534,17 +2695,17 @@
2534 2695
         this.$refs.additionalCharges.show()
2535 2696
       },
2536 2697
       selectDrugs(selection, row) {
2537
-        console.log('selection',selection)
2538
-        console.log('row',row)
2539
-        if(row.total <= 0){
2698
+        console.log('selection', selection)
2699
+        console.log('row', row)
2700
+        if (row.total <= 0) {
2540 2701
           if (selection) {
2541 2702
             selection.forEach(row => {
2542
-              if(row.total <= 0){
2543
-                this.$refs.multipleTable.toggleRowSelection(row);
2703
+              if (row.total <= 0) {
2704
+                this.$refs.multipleTable.toggleRowSelection(row)
2544 2705
               }
2545
-            });
2706
+            })
2546 2707
           } else {
2547
-            this.$refs.multipleTable.clearSelection();
2708
+            this.$refs.multipleTable.clearSelection()
2548 2709
           }
2549 2710
           this.$message.error(row.drug_name + '库存不足')
2550 2711
           return
@@ -2554,8 +2715,8 @@
2554 2715
 
2555 2716
       comfirm() {
2556 2717
 
2557
-       if(this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0){
2558
-          if(this.$store.getters.xt_user.org_id == 10138) {
2718
+        if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
2719
+          if (this.$store.getters.xt_user.org_id == 10138) {
2559 2720
             for (let i = 0; i < this.curDrugs.length; i++) {
2560 2721
               if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
2561 2722
                 this.$message.error('该处方属于特病类型处方,开非特病类型的药')
@@ -2566,9 +2727,8 @@
2566 2727
           }
2567 2728
         }
2568 2729
 
2569
-
2570
-        if(this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0){
2571
-          if(this.$store.getters.xt_user.org_id == 10138) {
2730
+        if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0) {
2731
+          if (this.$store.getters.xt_user.org_id == 10138) {
2572 2732
             for (let i = 0; i < this.curDrugs.length; i++) {
2573 2733
               if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
2574 2734
                 this.$message.error('该处方属于特病类型处方,开非特病类型的药')
@@ -2579,7 +2739,6 @@
2579 2739
           }
2580 2740
         }
2581 2741
 
2582
-
2583 2742
         // if (this.curPrescriptions.order_status == 2) {
2584 2743
         //   this.$message.error('该处方已经结算,无法继续添加药品或者项目')
2585 2744
         //   this.teamList = []
@@ -2651,9 +2810,9 @@
2651 2810
             var temp2 = this.deepClone(this.teamList)
2652 2811
 
2653 2812
             var temp3 = this.deepClone(templateDrugs)
2654
-            console.log("hhhhhhhhhhhhhh",temp)
2655
-            console.log("hhhh23",temp2)
2656
-            console.log("hhhh23",temp3)
2813
+            console.log('hhhhhhhhhhhhhh', temp)
2814
+            console.log('hhhh23', temp2)
2815
+            console.log('hhhh23', temp3)
2657 2816
             if (temp3.length > 0) {
2658 2817
               for (let b = 0; b < temp3.length; b++) {
2659 2818
                 let obj = {
@@ -2665,7 +2824,7 @@
2665 2824
                   execution_frequency: temp3[b].execution_frequency,
2666 2825
                   retail_price: temp3[b].drug.retail_price.toString(),
2667 2826
                   remark: '',
2668
-                  day: "1",
2827
+                  day: '1',
2669 2828
                   prescribing_number: temp3[b].prescribing_number,
2670 2829
                   single_dose_unit: temp3[b].drug.dose_unit,
2671 2830
                   prescribing_number_unit: temp3[b].drug.prescribing_number_unit,
@@ -2683,7 +2842,7 @@
2683 2842
 
2684 2843
             let index = 0
2685 2844
 
2686
-            if(this.curPrescriptions.advices.length > 0){
2845
+            if (this.curPrescriptions.advices.length > 0) {
2687 2846
               index = this.curPrescriptions.advices.length
2688 2847
             }
2689 2848
 
@@ -2705,13 +2864,13 @@
2705 2864
                   prescribing_number_unit: temp[b].prescribing_number_unit,
2706 2865
                   medical_insurance_number: temp[b].medical_insurance_number,
2707 2866
                   drug: temp[b],
2708
-                  groupno:index+temp_index,
2867
+                  groupno: index + temp_index
2709 2868
                 }
2710 2869
 
2711 2870
                 if (obj.prescribing_number == 0 || obj.prescribing_number.length == 0) {
2712 2871
                   obj.prescribing_number = 1
2713 2872
                 }
2714
-                console.log('obj',obj)
2873
+                console.log('obj', obj)
2715 2874
                 this.prescriptions[i].advices.push(obj)
2716 2875
               }
2717 2876
               this.curStatus = 1
@@ -2740,7 +2899,7 @@
2740 2899
                   delivery_way: temp2[b].delivery_way,
2741 2900
                   execution_frequency: temp2[b].execution_frequency,
2742 2901
                   number_days: temp2[b].number_days.toString(),
2743
-                  total:  temp2[b].cus_total,
2902
+                  total: temp2[b].cus_total,
2744 2903
                   price: temp2[b].price,
2745 2904
                   remark: '',
2746 2905
                   medical_code: temp2[b].medical_code,
@@ -2753,7 +2912,7 @@
2753 2912
                 if (obj.type == 3) {
2754 2913
                   obj.single_dose = 1
2755 2914
                 }
2756
-                console.log('项目obj',temp2)
2915
+                console.log('项目obj', temp2)
2757 2916
                 this.prescriptions[i].project.push(obj)
2758 2917
               }
2759 2918
               this.curStatus = 2
@@ -2774,18 +2933,21 @@
2774 2933
         this.teamList = row
2775 2934
       },
2776 2935
       selectChange(selection, row) {
2936
+        console.log('row',row)
2777 2937
         if(row.total <= 0){
2778
-          if (selection) {
2779
-            selection.forEach(row => {
2780
-              if(row.total <= 0){
2781
-                this.$refs.tables.toggleRowSelection(row);
2782
-              }
2783
-            });
2784
-          } else {
2785
-            this.$refs.tables.clearSelection();
2938
+          if(row.type == 3){
2939
+            if (selection) {
2940
+              selection.forEach(row => {
2941
+                if(row.total <= 0){
2942
+                  this.$refs.tables.toggleRowSelection(row);
2943
+                }
2944
+              });
2945
+            } else {
2946
+              this.$refs.tables.clearSelection();
2947
+            }
2948
+            this.$message.error(row.project_name + '库存不足')
2949
+            return
2786 2950
           }
2787
-          this.$message.error(row.project_name + '库存不足')
2788
-          return
2789 2951
         }
2790 2952
         this.teamList.push(row)
2791 2953
       },
@@ -2805,10 +2967,10 @@
2805 2967
                 number_days: project[i].number_days,
2806 2968
                 price: project[i].price,
2807 2969
                 medical_code: project[i].medical_code,
2808
-                cus_total:1,
2970
+                cus_total: 1,
2809 2971
                 unit: project[i].unit,
2810 2972
                 type: 2,
2811
-                total:project[i].total
2973
+                total: project[i].total
2812 2974
               }
2813 2975
 
2814 2976
               this.tabProject.push(obj)
@@ -2825,12 +2987,12 @@
2825 2987
                 delivery_way: '',
2826 2988
                 execution_frequency: '',
2827 2989
                 number_days: 1,
2828
-                cus_total:1,
2990
+                cus_total: 1,
2829 2991
                 price: good_info[i].packing_price,
2830 2992
                 medical_code: good_info[i].medical_insurance_number,
2831 2993
                 unit: this.getGoodUnit(good_info[i].good_unit),
2832 2994
                 type: 3,
2833
-                total:good_info[i].total
2995
+                total: good_info[i].total
2834 2996
               }
2835 2997
               this.tabProject.push(obj)
2836 2998
             }
@@ -2868,7 +3030,6 @@
2868 3030
             this.tabPrjectTeam = team
2869 3031
             this.allTabPrjectTeam = team
2870 3032
 
2871
-
2872 3033
             this.projectList = team
2873 3034
           }
2874 3035
         })
@@ -2908,6 +3069,7 @@
2908 3069
           if (response.data.state == 1) {
2909 3070
             this.teamList = []
2910 3071
             var project = response.data.data.project
3072
+            let num = 0
2911 3073
             for (let i = 0; i < project.length; i++) {
2912 3074
               if (project[i].type == 2 && project[i].status == 1) {
2913 3075
 
@@ -2919,7 +3081,7 @@
2919 3081
                   delivery_way: project[i].project.delivery_way,
2920 3082
                   execution_frequency: project[i].project.execution_frequency,
2921 3083
                   number_days: project[i].project.number_days,
2922
-                  cus_total:project[i].number,
3084
+                  cus_total: project[i].number,
2923 3085
                   price: project[i].project.price,
2924 3086
                   remark: '',
2925 3087
                   medical_code: project[i].project.medical_code,
@@ -2932,6 +3094,14 @@
2932 3094
 
2933 3095
                 this.teamList.push(obj)
2934 3096
               } else if (project[i].type == 3 && project[i].status == 1) {
3097
+                if(project[i].good_info.total <= 0){
3098
+                  num++
3099
+                  this.$refs.tabProjectTeam.toggleRowSelection(row);
3100
+                  this.$message.error(project[i].good_info.good_name + '库存不足')
3101
+                }
3102
+                if(num > 0){
3103
+                  this.$refs.tabProjectTeam.clearSelection();
3104
+                }
2935 3105
                 let obj = {
2936 3106
                   id: project[i].project_id,
2937 3107
                   project_name: project[i].good_info.good_name,
@@ -2971,11 +3141,16 @@
2971 3141
       },
2972 3142
       changeDayOrMonth(tab) {
2973 3143
         if (this.dayorMonth == 'day') {
2974
-
3144
+          this.$emit('day')
2975 3145
         } else if (this.dayorMonth == 'month') {
2976
-
3146
+          console.log('~~~~~~')
3147
+          let form = {
3148
+            id: this.patientInfo.id,
3149
+            his_patient_id: this.hisPatientInfo.id
3150
+          }
3151
+          console.log(form)
3152
+          this.$emit('month', form)
2977 3153
         }
2978
-
2979 3154
       },
2980 3155
       getAllProjectList() {
2981 3156
         getAllProjectList().then(response => {

File diff suppressed because it is too large
+ 1789 - 1723
src/xt_pages/outpatientDoctorStation/doctorDesk.vue


+ 1 - 1
src/xt_pages/outpatientRegistration/registrationHistory.vue View File

@@ -228,7 +228,7 @@
228 228
             <!--</el-dialog>-->
229 229
         <!--</div>-->
230 230
 
231
-        <div ]class="app-container">
231
+        <div class="app-container">
232 232
             <div class="cell clearfix">
233 233
                 <!-- <el-input style="width: 180px;" v-model.trim="search_input" class="filter-item"/> -->
234 234
                 <el-autocomplete