Browse Source

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

huangyw 2 years ago
parent
commit
6c84870d5c

+ 8 - 0
src/api/his/advice.js View File

@@ -7,3 +7,11 @@ export function getTodayAdviceList(params) {
7 7
     params: params
8 8
   })
9 9
 }
10
+
11
+export function getPharmacyBaseDrug(params) {
12
+  return request({
13
+    url: '/api/advice/getpharmacybasedrug',
14
+    method: 'Get',
15
+    params: params
16
+  })
17
+}

+ 10 - 94
src/xt_pages/dialysis/details/dialog/DoctorAdviceDialog.vue View File

@@ -210,7 +210,7 @@
210 210
       <!--   @row-click="cellMouseEnter" -->
211 211
       <!--&lt;!&ndash;:header-cell-style="{ backgroundColor: 'rgb(64, 158, 255)', color: 'white'}"&ndash;&gt;@current-change="selectRow"-->
212 212
       <el-table
213
-        v-if="his_is_open !=1"
213
+        v-if="his_is_open !=1 && is_advice_open!=1"
214 214
         :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
215 215
         :data="doctor_advices"
216 216
         border
@@ -303,6 +303,10 @@
303 303
       </el-table>
304 304
 
305 305
 
306
+
307
+
308
+
309
+
306 310
       <el-table
307 311
         v-if="his_is_open  == 1 || is_advice_open == 1"
308 312
         :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
@@ -404,87 +408,6 @@
404 408
 
405 409
       </el-table>
406 410
 
407
-      <!-- 医嘱列表 end -->
408
-
409
-      <!-- 新医嘱列表 -->
410
-      <!-- <div class="orderTable">
411
-        <table class="table">
412
-          <tr @click="cancelAdviceSelect" class="tableTh">
413
-            <th width="8%">开嘱医生</th>
414
-            <th width="12%">开始时间</th>
415
-            <th width="52%">医嘱内容</th>
416
-            <th width="12%">执行时间</th>
417
-            <th width="8%">执行护士</th>
418
-            <th v-if="template_id != 6" width="8%">核对人员</th>
419
-          </tr>
420
-          <template v-for="(group, group_index) in advice_groups">
421
-            <tr
422
-              v-for="(advice, advice_index) in group.advices"
423
-              :key="advice.id"
424
-              :class="{ 'row-class-active': current_group_index == group_index && current_advice_index < 0 }"
425
-            >
426
-              <td
427
-                v-if="advice_index == 0"
428
-                :rowspan="group.advices.length"
429
-                @click="selectGroupAdviceAction(group_index, -1, null,group)"
430
-              >
431
-                <span v-if="advice.parent_id==0">{{getXuserName(advice.advice_doctor)}}</span>
432
-                <span v-else></span>
433
-              </td>
434
-
435
-              <td
436
-                v-if="advice_index == 0"
437
-                :rowspan="group.advices.length"
438
-                @click="selectGroupAdviceAction(group_index, -1, null,group)"
439
-              >
440
-                <span>{{uParseTime(advice.start_time, '{m}-{d} {h}:{i}')}}</span>
441
-              </td>
442
-
443
-              <td
444
-                :class="{ 'advice_content': advice.parent_id == 0, 'subadvice_content': advice.parent_id > 0, 'td-active':current_group_index == group_index  && advice.is_selected == 1 }"
445
-                @click="selectAdviceAction(group_index, advice_index, advice)"
446
-              >
447
-                <div class="txt">
448
-                  <span>{{advice.advice_name }}</span>
449
-                  <span
450
-                    v-if="advice.advice_desc"
451
-                  >({{ advice.advice_desc }}{{advice.drug_spec_unit}})</span>
452
-                  <span
453
-                    v-if="advice.prescribing_number"
454
-                  >&nbsp;&nbsp;{{advice.prescribing_number}}{{advice.prescribing_number_unit}}</span>
455
-                  <span
456
-                    v-if="advice.single_dose && template_id == 6"
457
-                  >{{advice.single_dose}}{{advice.single_dose_unit}}</span>
458
-                  <span
459
-                    v-if="advice.single_dose && template_id != 6"
460
-                  >单次用量{{advice.single_dose}}{{advice.single_dose_unit}}</span>
461
-
462
-                  <span v-if="advice.parent_id == 0">{{advice.delivery_way}}</span>
463
-                  <span v-if="advice.parent_id == 0">{{advice.execution_frequency}}</span>
464
-                  <span v-if="advice.parent_id == 0 && advice.remark.length > 0">({{advice.remark}})</span>
465
-                </div>
466
-              </td>
467
-
468
-              <td
469
-                :class="{'td-active':current_group_index == group_index  && advice.is_selected == 1}"
470
-                @click="selectAdviceAction(group_index,advice_index, advice)"
471
-              >{{uParseTime(advice.execution_time, '{m}-{d} {h}:{i}')}}</td>
472
-
473
-              <td
474
-                :class="{'td-active':current_group_index == group_index  && advice.is_selected == 1}"
475
-                @click="selectAdviceAction(group_index,advice_index, advice)"
476
-              >{{getXuserName(advice.execution_staff)}}</td>
477
-              <td
478
-                v-if="template_id != 6"
479
-                :class="{'td-active':current_group_index == group_index  && advice.is_selected == 1}"
480
-                @click="selectAdviceAction(group_index,advice_index, advice)"
481
-              >{{getXuserName(advice.checker)}}</td>
482
-            </tr>
483
-          </template>
484
-        </table>
485
-      </div>-->
486
-      <!-- 新医嘱列表 -->
487
-
488 411
 
489 412
       <!-- 新增医嘱(子药)表单 || 新增子药表单 -->
490 413
       <!-- 医嘱表单 -->
@@ -1413,8 +1336,7 @@
1413 1336
               this.currentRow = null
1414 1337
               this.setCurrent()
1415 1338
               this.hideForm()
1416
-              console.log("子药23223332323332",this.form.parent_id)
1417
-              console.log("232322332323232",this.form.parent_id)
1339
+            
1418 1340
 
1419 1341
               if (this.form.parent_id > 0) {
1420 1342
                 var spliceIndex = -1
@@ -1427,7 +1349,7 @@
1427 1349
                     break
1428 1350
                   }
1429 1351
                 }
1430
-                console.log("spliceIndex233232323232",spliceIndex)
1352
+               
1431 1353
                 if (spliceIndex > -1) {
1432 1354
                   spliceIndex += 1
1433 1355
                   if (spliceIndex === this.doctor_advices.length) {
@@ -1440,7 +1362,7 @@
1440 1362
                     }
1441 1363
                   }
1442 1364
 
1443
-                  console.log("doctore_advic4233232323232",this.doctor_advices)
1365
+                 
1444 1366
                 }
1445 1367
               } else {
1446 1368
                 this.doctor_advices.unshift(response.data.data.advice)
@@ -2056,6 +1978,8 @@
2056 1978
       }
2057 1979
       ,
2058 1980
       show(his_is_open,is_advice_open) {
1981
+        console.log("his_is_open233232323232323322323",his_is_open)
1982
+        console.log("is_advice_open233232323232323322323",is_advice_open)
2059 1983
         this.his_is_open = his_is_open
2060 1984
         this.is_advice_open = is_advice_open
2061 1985
         this.isVisibility = true
@@ -2366,14 +2290,6 @@
2366 2290
                  this.doctor_advices.push(his_advices[i])
2367 2291
               }
2368 2292
             }
2369
-
2370
-            this.$notify({
2371
-              title: '成功',
2372
-              message: '新增医嘱成功',
2373
-              type: 'success',
2374
-              duration: 2000
2375
-            })
2376
-
2377 2293
             this.currentIndex = -1
2378 2294
             this.currentRow = null
2379 2295
             this.setCurrent()

+ 2 - 2
src/xt_pages/hospitalStation/invoicePrint.vue View File

@@ -19,9 +19,9 @@
19 19
           "
20 20
           :paramsObj="invoiceParams"
21 21
         ></printOne>
22
-        <printTwo v-if="org_id == 10215 ||  org_id == 0" :paramsObj="invoiceParams"></printTwo>
22
+        <printTwo v-if="org_id == 10215 " :paramsObj="invoiceParams"></printTwo>
23 23
         <printThree
24
-          v-if="org_id == 10265 || org_id == 4 || org_id == 9675"
24
+          v-if="org_id == 10265 || org_id == 4 || org_id == 9675 ||  org_id == 0"
25 25
           :paramsObj="invoiceParams"
26 26
         ></printThree>
27 27
       </div>

+ 3 - 2
src/xt_pages/hospitalStation/invoiceTemplate/printThree.vue View File

@@ -191,7 +191,7 @@
191 191
         </div> -->
192 192
         <div style="position: absolute;top:370px;left:40px">
193 193
             <!-- 预交款合计 -->
194
-            预交款合计:0.00
194
+            预交款合计:{{pre_pay_money}}
195 195
         </div>
196 196
         <div style="position: absolute;top:370px;left:250px">
197 197
             <!-- 补交款 -->
@@ -244,6 +244,7 @@ export default {
244 244
           out_hosptial_time:'',
245 245
           number:'',
246 246
           insutype:'',
247
+          pre_pay_money:"",
247 248
         }
248 249
     },
249 250
     mounted(){
@@ -302,7 +303,7 @@ export default {
302 303
               this.id_card_no = this.list.his_hospital_record.id_card_no
303 304
               this.number = this.list.his_hospital_record.number
304 305
               this.psn_no = this.list.his_hospital_record.psn_no
305
-
306
+              this.pre_pay_money = this.list.pre_pay_money
306 307
 
307 308
               this.balance_accounts_type = this.list.his_hospital_record.balance_accounts_type
308 309
               this.gend= this.list.his_hospital_record.gend

+ 21 - 9
src/xt_pages/hospitalStation/settlementTemplate/hospitalSettlePrint.vue View File

@@ -557,7 +557,7 @@
557 557
                 <td>&nbsp;{{info.bed_cost_total?info.bed_cost_total:''}}</td>
558 558
                 <td>&nbsp;{{getJiaTotal('床位费')}}</td>
559 559
                 <td>&nbsp;{{getYiTotal('床位费')}}</td>
560
-                <td>&nbsp;{{info.bed_cost_self_total?info.bed_cost_self_total:''}}</td>
560
+                <td>&nbsp;{{getBingTotal('床位费')}}</td>
561 561
                 <td>&nbsp;</td>
562 562
               </tr>
563 563
               <tr>
@@ -573,7 +573,7 @@
573 573
                 <td>&nbsp;{{info.check_cost_total?info.check_cost_total:''}}</td>
574 574
                 <td>&nbsp;{{getJiaTotal('检查费')}}</td>
575 575
                 <td>&nbsp;{{getYiTotal('检查费')}}</td>
576
-                <td>&nbsp;{{info.check_cost_self_total?info.check_cost_self_total:""}}</td>
576
+                <td>&nbsp;{{getBingTotal('检查费')}}</td>
577 577
                 <td>&nbsp;</td>
578 578
               </tr>
579 579
               <tr>
@@ -581,7 +581,7 @@
581 581
                 <td>&nbsp;{{info.laboratory_cost_total?info.laboratory_cost_total:''}}</td>
582 582
                 <td>&nbsp;{{getJiaTotal('化验费')}}</td>
583 583
                 <td>&nbsp;{{getYiTotal('化验费')}}</td>
584
-                <td>&nbsp;{{info.laboratory_cost_self_total?info.laboratory_cost_self_total:''}}</td>
584
+                <td>&nbsp;{{getBingTotal('化验费')}}</td>
585 585
                 <td>&nbsp;</td>
586 586
               </tr>
587 587
               <tr>
@@ -589,7 +589,7 @@
589 589
                 <td>&nbsp;{{info.treat_cost_total?info.treat_cost_total:''}}</td>
590 590
                 <td>&nbsp;{{getJiaTotal('治疗费')}}</td>
591 591
                 <td>&nbsp;{{getYiTotal('治疗费')}}</td>
592
-                <td>&nbsp;{{info.treat_cost_self_total?info.treat_cost_self_total:''}}</td>
592
+                <td>&nbsp;{{getBingTotal('治疗费')}}</td>
593 593
                 <td>&nbsp;</td>
594 594
               </tr>
595 595
               <tr>
@@ -597,7 +597,7 @@
597 597
                 <td>&nbsp;{{info.operation_cost_total?info.operation_cost_total:''}}</td>
598 598
                 <td>&nbsp;{{getJiaTotal('手术费')}}</td>
599 599
                 <td>&nbsp;{{getYiTotal('手术费')}}</td>
600
-                <td>&nbsp;{{info.operation_cost_self_total?info.operation_cost_self_total:""}}</td>
600
+                <td>&nbsp;{{getBingTotal('手术费')}}</td>
601 601
                 <td>&nbsp;</td>
602 602
               </tr>
603 603
               <tr>
@@ -613,7 +613,7 @@
613 613
                 <td>&nbsp;{{info.material_cost_total?info.material_cost_total:""}}</td>
614 614
                 <td>&nbsp;{{getJiaTotal('材料费')}}</td>
615 615
                 <td>&nbsp;{{getYiTotal('材料费')}}</td>
616
-                <td>&nbsp;{{info.material_cost_self_total?info.material_cost_self_total:""}}</td>
616
+                <td>&nbsp;{{getBingTotal('材料费')}}</td>
617 617
                 <td>&nbsp;</td>
618 618
               </tr>
619 619
               <tr>
@@ -621,7 +621,7 @@
621 621
                 <td>&nbsp;{{info.western_medicine_cost_total?info.western_medicine_cost_total:""}}</td>
622 622
                 <td>&nbsp;{{getJiaTotal('西药费')}}</td>
623 623
                 <td>&nbsp;{{getYiTotal('西药费')}}</td>
624
-                <td>&nbsp;{{info.western_medicine_cost_self_total?info.western_medicine_cost_self_total:""}}</td>
624
+                <td>&nbsp;{{getBingTotal('西药费')}}</td>
625 625
                 <td>&nbsp;</td>
626 626
               </tr>
627 627
               <tr>
@@ -637,7 +637,7 @@
637 637
                 <td>&nbsp;{{info.chinese_traditional_medicine_cost_total?info.chinese_traditional_medicine_cost_total:""}}</td>
638 638
                 <td>&nbsp;{{getJiaTotal('中成药费')}}</td>
639 639
                 <td>&nbsp;{{getYiTotal('中成药费')}}</td>
640
-                <td>&nbsp;{{info.chinese_traditional_medicine_cost_self_total?info.chinese_traditional_medicine_cost_self_total:""}}</td>
640
+                <td>&nbsp;{{getBingTotal('中成药费')}}</td>
641 641
                 <td>&nbsp;</td>
642 642
               </tr>
643 643
               <tr>
@@ -661,7 +661,7 @@
661 661
                 <td>&nbsp;{{info.other_cost_total?info.other_cost_total:""}}</td>
662 662
                 <td>&nbsp;{{getJiaTotal('其他费')}}</td>
663 663
                 <td>&nbsp;{{getYiTotal('其他费')}}</td>
664
-                <td>&nbsp;{{info.other_cost_self_total?info.other_cost_self_total:""}}</td>
664
+                <td>&nbsp;{{getBingTotal('其他费')}}</td>
665 665
                 <td>&nbsp;</td>
666 666
               </tr>
667 667
               <tr>
@@ -892,6 +892,18 @@ export default {
892 892
         return ""
893 893
       }
894 894
       return total
895
+    },getBingTotal(name){
896
+      let total = 0.00
897
+      for(let i = 0; i  < this.list.length; i++){
898
+        if(name == this.list[i].med_chrgitm_name){
899
+          total = this.list[i].bingTotal
900
+
901
+        }
902
+      }
903
+      if (total == 0){
904
+        return ""
905
+      }
906
+      return total
895 907
     },
896 908
     getNaty(naty){
897 909
       switch (naty){

+ 1 - 1
src/xt_pages/hospitalStation/statementPrint.vue View File

@@ -501,7 +501,7 @@ export default {
501 501
                 that.info['his'] = response.data.data.his_hospital
502 502
 
503 503
                 console.log("22222222")
504
-
504
+                that.list = []
505 505
                 //获取所有项目类型进行去重
506 506
                 let med_chrgitm_types = []
507 507
                 for (let i = 0; i < response.data.data.order_infos.length; i++) {

+ 128 - 11
src/xt_pages/outpatientCharges/listPrint.vue View File

@@ -136,7 +136,7 @@
136 136
                 obj.bingTotal = this.getBingTotal(tempDetails)
137 137
                 obj.otherTotal = this.getOtherTotal(tempDetails)
138 138
 
139
-                obj.details = this.setNewData(tempDetails)
139
+                obj.details = this.set10265NewData(tempDetails)
140 140
                 this.list.push(obj)
141 141
               }
142 142
               console.log(this.list)
@@ -251,7 +251,8 @@
251 251
           total = Number(total) + Number(parseFloat(items[i].cnt) * parseFloat(items[i].pric))
252 252
         }
253 253
         return total.toFixed(2)
254
-      },setNewData(details) {
254
+      },
255
+      setNewData(details) {
255 256
         let drug_ids = []
256 257
         let project_ids = []
257 258
 
@@ -259,13 +260,15 @@
259 260
           if (details[i].advice && details[i].advice.id > 0 && details[i].advice.prescription && details[i].advice.prescription.type == 1) { //药品
260 261
             let obj = {
261 262
               id: details[i].advice.drug_id,
262
-              price: details[i].advice.price
263
+              price: details[i].advice.price,
264
+              lv: details[i].chrgitm_lv,
263 265
             }
264 266
             drug_ids.push(obj)
265 267
           } else if (details[i].project && details[i].project.id > 0 && details[i].project.prescription && details[i].project.prescription.type == 2) { //项目
266 268
             let obj = {
267 269
               id: details[i].project.project_id,
268
-              price: details[i].project.price
270
+              price: details[i].project.price,
271
+              lv: details[i].chrgitm_lv,
269 272
 
270 273
             }
271 274
             project_ids.push(obj)
@@ -283,17 +286,17 @@
283 286
         let new_project_ids = this.unique(project_ids)
284 287
         let list = []
285 288
 
286
-        // console.log('ids')
287
-        // console.log(new_drug_ids)
288
-        // console.log(new_project_ids)
289
-        // console.log('ids')
289
+        console.log('ids')
290
+        console.log(new_drug_ids)
291
+        console.log(new_project_ids)
292
+        console.log('ids')
290 293
 
291 294
         if (new_drug_ids.length > 0 && new_project_ids.length == 0) {
292 295
           for (let i = 0; i < new_drug_ids.length; i++) {
293 296
             let obj = {}
294 297
             let count = 0
295 298
             for (let a = 0; a < details.length; a++) {
296
-              if (new_drug_ids[i].id == details[a].advice.drug_id && new_drug_ids[i].price == details[a].advice.price) {
299
+              if (new_drug_ids[i].id == details[a].advice.drug_id && new_drug_ids[i].price == details[a].advice.price ) {
297 300
                 obj['name'] = details[a].advice.advice_name
298 301
                 // obj['spec'] = details[a].advice.drug.drug_spec
299 302
                 obj['spec'] =   details[a].advice.drug.dose +   details[a].advice.drug.dose_unit+"*" +  details[a].advice.drug.min_number +   details[a].advice.drug.min_unit+"/"+ details[a].advice.drug.max_unit
@@ -344,6 +347,102 @@
344 347
         return list
345 348
 
346 349
       },
350
+      set10265NewData(details) {
351
+        let drug_ids = []
352
+        let project_ids = []
353
+
354
+        for (let i = 0; i < details.length; i++) {
355
+          if (details[i].advice && details[i].advice.id > 0 && details[i].advice.prescription && details[i].advice.prescription.type == 1) { //药品
356
+            let obj = {
357
+              id: details[i].advice.drug_id,
358
+              price: details[i].advice.price,
359
+              lv: details[i].chrgitm_lv,
360
+            }
361
+            drug_ids.push(obj)
362
+          } else if (details[i].project && details[i].project.id > 0 && details[i].project.prescription && details[i].project.prescription.type == 2) { //项目
363
+            let obj = {
364
+              id: details[i].project.project_id,
365
+              price: details[i].project.price,
366
+              lv: details[i].chrgitm_lv,
367
+
368
+            }
369
+            project_ids.push(obj)
370
+
371
+          }
372
+
373
+        }
374
+        //
375
+        // console.log('old ids')
376
+        // console.log(drug_ids)
377
+        // console.log(project_ids)
378
+        // console.log('old ids')
379
+
380
+        let new_drug_ids = this.unique10265(drug_ids)
381
+        let new_project_ids = this.unique10265(project_ids)
382
+        let list = []
383
+
384
+        console.log('ids')
385
+        console.log(new_drug_ids)
386
+        console.log(new_project_ids)
387
+        console.log('ids')
388
+
389
+        if (new_drug_ids.length > 0 && new_project_ids.length == 0) {
390
+          for (let i = 0; i < new_drug_ids.length; i++) {
391
+            let obj = {}
392
+            let count = 0
393
+            for (let a = 0; a < details.length; a++) {
394
+              if (new_drug_ids[i].id == details[a].advice.drug_id && new_drug_ids[i].price == details[a].advice.price && new_drug_ids[i].lv == details[a].chrgitm_lv) {
395
+                obj['name'] = details[a].advice.advice_name
396
+                // obj['spec'] = details[a].advice.drug.drug_spec
397
+                obj['spec'] =   details[a].advice.drug.dose +   details[a].advice.drug.dose_unit+"*" +  details[a].advice.drug.min_number +   details[a].advice.drug.min_unit+"/"+ details[a].advice.drug.max_unit
398
+                obj['unit'] = details[a].advice.drug.max_unit
399
+                obj['medicine_insurance_kind'] = this.getMedicineInsuranceType(details[a].chrgitm_lv)
400
+                obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
401
+                obj['price'] = parseFloat(details[a].pric)
402
+                obj['is_total'] = 2
403
+                count = count + details[a].cnt
404
+              }
405
+            }
406
+            obj['count'] = count
407
+            list.push(obj)
408
+          }
409
+        }
410
+
411
+        if (new_drug_ids.length == 0 && new_project_ids.length > 0) {
412
+          for (let i = 0; i < new_project_ids.length; i++) {
413
+            let obj = {}
414
+            let count = 0
415
+            for (let a = 0; a < details.length; a++) {
416
+              if (new_project_ids[i].id == details[a].project.project_id && new_project_ids[i].price == details[a].project.price && new_project_ids[i].lv == details[a].chrgitm_lv) {
417
+                if( details[a].project.type == 2){
418
+                  obj['name'] = details[a].project.project.project_name
419
+                  obj['spec'] = ''
420
+                  obj['unit'] = details[a].project.project.unit
421
+
422
+
423
+                }else if(details[a].project.type == 3){
424
+                  obj['name'] = details[a].project.good_info.good_name
425
+                  obj['spec'] = ''
426
+                  obj['unit'] = details[a].project.good_info.packing_unit
427
+
428
+                }
429
+                obj['medicine_insurance_kind'] = this.getMedicineInsuranceType(details[a].chrgitm_lv)
430
+                obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
431
+                obj['price'] = parseFloat(details[a].pric)
432
+                obj['is_total'] = 2
433
+
434
+                count = count + details[a].cnt
435
+              }
436
+            }
437
+            obj['count'] = count
438
+            list.push(obj)
439
+          }
440
+        }
441
+
442
+        return list
443
+
444
+      },
445
+
347 446
       getType(med_chrgitm_type) {
348 447
         switch (med_chrgitm_type) {
349 448
           case '01':
@@ -415,11 +514,12 @@
415 514
 
416 515
             break
417 516
           case "03":
418
-            return '自费'
517
+            return '丙类'
419 518
             break
420 519
 
421 520
         }
422
-      }, unique(array) {
521
+      },
522
+      unique(array) {
423 523
         // res用来存储结果
424 524
         var res = []
425 525
         for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
@@ -435,6 +535,23 @@
435 535
         }
436 536
         return res
437 537
       },
538
+      unique10265(array) {
539
+        // res用来存储结果
540
+        var res = []
541
+        for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
542
+          for (var j = 0, resLen = res.length; j < resLen; j++) {
543
+            if (array[i].id === res[j].id && array[i].price === res[j].price && array[i].lv === res[j].lv) {
544
+              break
545
+            }
546
+          }
547
+          // 如果array[i]是唯一的,那么执行完循环,j等于resLen
548
+          if (j === resLen) {
549
+            res.push(array[i])
550
+          }
551
+        }
552
+        return res
553
+      },
554
+
438 555
       printThisPage() {
439 556
         if(this.org_id != 10106){
440 557
           if(this.org_id == 10215){

+ 2 - 2
src/xt_pages/stock/stockOutOrderAdd.vue View File

@@ -766,10 +766,9 @@ export default {
766 766
       this.currentIndex = val
767 767
     },
768 768
     handleSelect(val){
769
-       
769
+       console.log("val232332322323323232323",val)
770 770
         var arr = []
771 771
        
772
-       
773 772
         for(let i=0;i<this.recordInfo.recordData.length;i++){
774 773
            arr.push(this.recordInfo.recordData[i].good_id)
775 774
         }
@@ -798,6 +797,7 @@ export default {
798 797
             this.recordInfo.recordData[i].remark = val.remark
799 798
             this.recordInfo.recordData[i].buy_price = val.buy_price
800 799
             this.recordInfo.recordData[i].stock_count = total_count
800
+            this.recordInfo.recordData[i].license_number = val.number
801 801
             if(val.packing_price == 0){
802 802
               this.recordInfo.recordData[i].price =""
803 803
             }else{

+ 1 - 1
src/xt_pages/stock/stockOutOrderEdit.vue View File

@@ -782,7 +782,7 @@
782 782
             this.recordInfo.recordData[i].name = val.specification_name  +"/"+val.packing_unit
783 783
             this.recordInfo.recordData[i].manufacturer = val.manufacturer
784 784
             this.recordInfo.recordData[i].remark = val.remark
785
-            this.recordInfo.recordData[i].license_number = ""
785
+            this.recordInfo.recordData[i].license_number = val.number
786 786
             this.recordInfo.recordData[i].warehouse_info_id = 0
787 787
             this.recordInfo.recordData[i].buy_price = val.buy_price
788 788
             this.recordInfo.recordData[i].stock_count = total_count

+ 102 - 12
src/xt_pages/stock/test.vue View File

@@ -30,10 +30,10 @@
30 30
             @change="startTimeChange"
31 31
           ></el-date-picker>
32 32
 
33
-        <el-input @keyup.enter.native='searchAction' v-model="keywords"
33
+        <!-- <el-input @keyup.enter.native='searchAction' v-model="keywords"
34 34
                   class="filter-item"/>
35 35
         <el-button  class="filter-item" type="primary" icon="el-icon-search"
36
-                   @click="searchAction">搜索</el-button>
36
+                   @click="searchAction">搜索</el-button> -->
37 37
           </div>
38 38
 
39 39
           <el-table
@@ -52,16 +52,55 @@
52 52
             ref="singleTable"
53 53
             @current-change="handleCurrentChange"
54 54
           >
55
-            <el-table-column align="center" prop="name" label="姓名" wdith="89">
56
-              <template slot-scope="scope"></template>
55
+            <el-table-column align="center" prop="name" label="名称" wdith="89">
56
+              <template slot-scope="scope">
57
+                {{scope.row.drug_name}}
58
+              </template>
59
+            </el-table-column>
60
+            <el-table-column align="center" prop="name" label="规格" wdith="89">
61
+              <template slot-scope="scope">
62
+                {{scope.row.dose}}{{scope.row.dose_unit}}*{{scope.row.min_number}}{{scope.row.min_unit}}/{{scope.row.max_unit}}
63
+              </template>
64
+            </el-table-column>
65
+            <el-table-column align="center" prop="name" label="库存" wdith="89">
66
+              <template slot-scope="scope">
67
+                {{getWarehoseInfo(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number)}}
68
+              </template>
57 69
             </el-table-column>
58 70
           </el-table>
59 71
         </div>
60 72
       </div>
61 73
       <div class="mainRight">
62 74
         <el-tabs v-model="titleType">
63
-          <el-tab-pane label="明细" name="明细"></el-tab-pane>
64
-          <el-tab-pane label="汇总" name="汇总"></el-tab-pane>
75
+          <el-tab-pane label="明细" name="明细">
76
+           
77
+           <el-table
78
+            :data="tableData"
79
+            border
80
+            style="width: 100%">
81
+            <el-table-column prop="date" label="序号" width="180">
82
+              <template slot-scope="scope">
83
+
84
+              </template>
85
+            </el-table-column>
86
+            <el-table-column  prop="name" label="单据编码" width="180">
87
+            </el-table-column>
88
+            <el-table-column prop="address" label="患者姓名">
89
+            </el-table-column>
90
+            <el-table-column prop="address" label="单次用量">
91
+            </el-table-column>
92
+             <el-table-column prop="address" label="用法">
93
+            </el-table-column>
94
+             <el-table-column prop="address" label="频率">
95
+            </el-table-column>
96
+             <el-table-column prop="address" label="天数">
97
+            </el-table-column>
98
+            <el-table-column prop="address" label="总量">
99
+            </el-table-column>
100
+          </el-table>
101
+
102
+          </el-tab-pane>
103
+         
65 104
         </el-tabs>
66 105
       </div>
67 106
     </div>
@@ -69,9 +108,9 @@
69 108
 </template>
70 109
 
71 110
 <script>
72
-import { getTodayAdviceList } from "@/api/his/advice";
111
+import { getTodayAdviceList,getPharmacyBaseDrug } from "@/api/his/advice";
73 112
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
74
-
113
+const moment = require('moment')
75 114
 export default {
76 115
   components: {
77 116
     BreadCrumb,
@@ -88,7 +127,8 @@ export default {
88 127
       titleType: "明细",
89 128
       patient_id: 0,
90 129
       keywords: "",
91
-      start_time:new Date(),
130
+      start_time:moment(new Date()).add('year',0).format("YYYY-MM-DD"),
131
+      tableData:[],
92 132
     };
93 133
   },
94 134
 
@@ -131,8 +171,8 @@ export default {
131 171
       this.getPatientList();
132 172
     },
133 173
     handleCurrentChange(row) {
134
-      this.patient_id = row.id;
135
-     
174
+    
175
+      this.getPharmacyBaseDrug(row.id)
136 176
     },
137 177
     getlist(){
138 178
       var params = {
@@ -140,8 +180,58 @@ export default {
140 180
         keywords:this.keywords,
141 181
       }  
142 182
       getTodayAdviceList(params).then(response=>{
143
-
183
+         if(response.data.state == 1){
184
+           var list =  response.data.data.list
185
+           this.$refs.singleTable.setCurrentRow(list[0])
186
+           this.patientTableData = list
187
+         }
144 188
       }) 
189
+    }, 
190
+     getWarehoseInfo(arr, max_unit, min_unit, min_number) {
191
+      var total = 0;
192
+      var max_str = "";
193
+      var min_str = "";
194
+      if (arr.length > 0) {
195
+        for (let i = 0; i < arr.length; i++) {
196
+          total += parseInt(arr[i].stock_max_number+ arr[i].stock_min_number);
197
+        }
198
+      }
199
+      if (total < min_number) {
200
+        min_str = total + min_unit;
201
+      }
202
+      if (total == 0) {
203
+        min_str = "";
204
+        max_str = "";
205
+      }
206
+      if (total >= min_number) {
207
+        if (parseInt(total / min_number) != 0) {
208
+          max_str = parseInt(total / min_number) + max_unit;
209
+        }
210
+        if (total % min_number != 0) {
211
+          min_str = (total % min_number) + min_unit;
212
+        }
213
+      }
214
+      return max_str + min_str;
215
+    },
216
+    startTimeChange(){
217
+
218
+    },
219
+    getPharmacyBaseDrug(drug_id){
220
+      var params = {
221
+        start_time:this.start_time,
222
+        drug_id:drug_id,
223
+      }
224
+      console.log("param23232323322332",params)
225
+      getPharmacyBaseDrug(params).then(response=>{
226
+        if(response.data.state == 1){
227
+           var advicelist = response.data.data.advicelist
228
+           console.log("advicelist23323232323323",advicelist)
229
+           var hisAdviceList = response.data.data.hisAdviceList
230
+           console.log("hisadvicelist23233232233",hisAdviceList)
231
+           var patient = response.data.data.patient
232
+           console.log("patient23322323232332",patient)
233
+        }
234
+      })
145 235
     }
146 236
   },
147 237
   created() {