Parcourir la source

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

陈少旭 il y a 10 mois
Parent
révision
ef49cc963d

+ 9 - 0
src/api/drug/drug.js Voir le fichier

@@ -620,6 +620,15 @@ export function getPurchaseNewDrugQuery(params) {
620 620
   })
621 621
 }
622 622
 
623
+export function getPurchaseDrugQueryList(params){
624
+  
625
+  return request({
626
+    url:"/api/stock/getpurchaseDrugQueryList",
627
+    method:"get",
628
+    params:params,
629
+  })
630
+}
631
+
623 632
 export function getGoodOverCount(params) {
624 633
   return request({
625 634
     url: '/api/stock/getgoodovercount',

+ 8 - 0
src/api/drug/drug_stock.js Voir le fichier

@@ -645,3 +645,11 @@ export function getDrugInitDataList(params) {
645 645
   })
646 646
 }
647 647
 
648
+export function getDrugFlowDetailByDrugId(params){
649
+  
650
+  return request({
651
+    url:"/api/drug/getdrugflowdetailbyid",
652
+    method:"Get",
653
+    params:params
654
+  })
655
+}

+ 16 - 1
src/xt_pages/dialysis/batch_print/batch_print_order_six.vue Voir le fichier

@@ -2144,7 +2144,7 @@
2144 2144
                         <td height="32px">
2145 2145
                             <span v-if="advice.execution_time">{{ getTime(advice.execution_time, "{h}:{i}") }}</span>
2146 2146
                         </td>
2147
-                    </tr>
2147
+                        </tr>
2148 2148
                         </template>
2149 2149
                       </tbody>
2150 2150
                     </table>
@@ -3401,6 +3401,17 @@ export default {
3401 3401
               this.records[recordIndex].isShowZero = true;
3402 3402
             }
3403 3403
 
3404
+
3405
+            if(this.org_id == 0|| this.org_id ==10571){
3406
+             
3407
+               if(this.records!=null&& this.records.length>0){
3408
+                for(let i=0;i<this.records.length;i++){
3409
+                  this.records[i].advices.push(...this.records[i].his_advices)
3410
+                 }
3411
+               }
3412
+             
3413
+            }
3414
+
3404 3415
             var delghTwo = 0;
3405 3416
             if (
3406 3417
               this.records[recordIndex].advices &&
@@ -3424,6 +3435,8 @@ export default {
3424 3435
             }
3425 3436
 
3426 3437
 
3438
+
3439
+
3427 3440
           
3428 3441
             if(this.org_id == 10206){
3429 3442
               console.log("this.records[recordIndex].his_project", this.records[recordIndex].his_project)
@@ -3525,6 +3538,8 @@ export default {
3525 3538
             }
3526 3539
           }
3527 3540
           console.log("数据我哦我我", this.records);
3541
+
3542
+        
3528 3543
           // this.records.forEach(o => {
3529 3544
           //   console.log(o,'jj')
3530 3545
           //   this.blood_access_part_opera_name = this.bloodAccessParOperaName(

+ 43 - 49
src/xt_pages/dialysis/template/DialysisPrintOrderseventyone.vue Voir le fichier

@@ -188,33 +188,19 @@
188 188
               {{ prescription.dialysis_irrigation ? prescription.dialysis_irrigation : "/" }}
189 189
             </span>L
190 190
           </div>
191
-          <div style="flex: 1;">
191
+          <div style="flex: 1;display: flex">
192 192
             透析液:
193
-            <!-- <div style="display: inline-block;margin-right: 10px;">
194
-            
195
-              <div style="display: inline-block;width: 10px;height: 10px;border: 1px solid black;position: relative;top: 5px;">
196
-                <span style="position: relative; top: -4px; left: -2px;">
197
-                   <span v-if="prescription.dialyzate.indexOf('碳酸')!=-1">√</span>
198
-                </span>
199
-              </div>&nbsp;碳酸
200
-              <div class="under_line" style="width: 100px; text-align: center" v-if="prescription.dialyzate.indexOf('碳酸')>-1">
201
-                      碳酸
202
-               </div>
203
-            </div> -->
204
-            <!-- <div style="display: inline-block;">
205
-             
206
-              <div style="display: inline-block;width: 10px;height: 10px;border: 1px solid black;position: relative;top: 5px;">
207
-                <span v-if="prescription.dialyzate.indexOf('醋酸')!=-1">√</span>
208
-              </div>&nbsp;醋酸
209
-            
210
-            </div> -->
211
-            <div class="under_line" style="width: 100px; text-align: center" v-if="prescription.dialyzate.indexOf('碳酸')>-1">
212
-                 碳酸
193
+            <div style="">
194
+              <check-box text="碳酸" :checked="prescription_dialyzate1"></check-box>&nbsp;
195
+              <check-box text="醋酸" :checked="prescription_dialyzate2"></check-box>
196
+              <!-- <check-box :checked="patientInfo_gender_2"></check-box>&nbsp; -->
213 197
             </div>
214
-
215
-            <div class="under_line" style="width: 100px; text-align: center" v-if="prescription.dialyzate.indexOf('醋酸')>-1">
216
-                醋酸
198
+              <!-- <div class="under_line" style="width: 100px; text-align: center;display: inline-block;" v-if="prescription.dialyzate.indexOf('碳酸')>-1">
199
+                    碳酸
217 200
                </div>
201
+            <div class="under_line" style="width: 100px; text-align: center;display: inline-block;" v-if="prescription.dialyzate.indexOf('醋酸')>-1">
202
+                醋酸
203
+            </div> -->
218 204
           </div>
219 205
         </div>
220 206
         <div style="display: flex;border-left: 1px solid black;border-right: 1px solid black;padding: 5px;">
@@ -336,7 +322,7 @@
336 322
                 {{
337 323
                   monitor.ultrafiltration_volume
338 324
                     ? monitor.ultrafiltration_volume
339
-                    : "0"
325
+                    : " "
340 326
                 }}
341 327
               </span>
342 328
             </td>
@@ -389,6 +375,11 @@
389 375
               {{ getTime(monitor.operate_time, "{h}:{i}") }}
390 376
             </td>
391 377
             <td>
378
+              <template 
379
+              v-if=" (dialysisOrder && monitor.operate_time == dialysisOrder.start_time)&&(org_id!=10414) "
380
+              >
381
+                【开始透析】
382
+              </template>
392 383
               <span v-if="monitor.symptom || monitor.dispose || monitor.result">
393 384
                 {{ monitor.symptom }} &nbsp;{{ monitor.dispose }} &nbsp;{{
394 385
                   monitor.result
@@ -424,26 +415,6 @@
424 415
               </td>
425 416
             </tr>
426 417
 
427
-            <!-- <tr>
428
-              <td style="width:13%;height:40px">
429
-                <p style="height:20px;line-height:20px">时间</p>
430
-              </td>
431
-              <td style="width:;height:40px">
432
-                <p style="height:20px;line-height:20px">医嘱执行记录</p>
433
-              </td>
434
-              <td style="width:10%;height:40px">
435
-                <p style="height:20px;line-height:20px">执行</p>
436
-              </td>
437
-              <td style="width:10%;height:60px">
438
-                <p style="height:20px;line-height:20px">核对</p>
439
-              </td>
440
-              <td style="width:14%;height:40px">
441
-                <p style="height:20px;line-height:20px">上次透后体重</p>
442
-              </td>
443
-              <td style="width:8%;height:40px">
444
-                {{ assessmentafter.weight_after ? assessmentafter.weight_after : "0" }}kg
445
-              </td>
446
-            </tr> -->
447 418
             <tr v-for="(advice, advice_index) in tableAdvice" :key="advice_index">
448 419
               <td style="min-width:60px;height:40px">{{ getTime(advice.start_time, "{y}-{m}-{d} {h}:{i}") }}</td>
449 420
               <td>
@@ -485,12 +456,10 @@
485 456
           </tbody>
486 457
         </table>
487 458
 
488
-
489
-
490 459
         <div style="border-top: none;border: 1px solid black;padding: 5px;">
491 460
           <div style="width: 100%;">
492 461
             治疗小结:
493
-            <span class="under-line" style="width: 60%;display: inline-block;">&nbsp;{{ summary.dialysis_summary }}</span>
462
+            <span class="under-line" style="">&nbsp;{{ summary.dialysis_summary }}</span>
494 463
           </div>
495 464
           <div style="display: flex;">
496 465
             <div style="flex: 1;"></div>
@@ -527,6 +496,7 @@
527 496
 </template>
528 497
 
529 498
 <script>
499
+import CheckBox from "../batch_print/option_check_box";
530 500
 import { getDialysisRecord } from "@/api/dialysis";
531 501
 import { getDataConfig } from "@/utils/data";
532 502
 import { jsGetAge, uParseTime } from "@/utils/tools";
@@ -541,6 +511,7 @@ export default {
541 511
   components: {
542 512
     // DialysisPrintOrderOne,
543 513
     // DialysisPrintOrderTwo,
514
+    CheckBox,
544 515
     LabelBox,
545 516
     BreadCrumb
546 517
   },
@@ -588,6 +559,8 @@ export default {
588 559
       patientInfo_gender_2: false,
589 560
       patientInfo_source_2: false,
590 561
       patientInfo_source_1: false,
562
+      prescription_dialyzate1:false,
563
+      prescription_dialyzate2:false,
591 564
       modeOptions: {},
592 565
       replacementWays: [],
593 566
       perfusionApparatus: [],
@@ -621,7 +594,8 @@ export default {
621 594
       },
622 595
       prescription: {
623 596
         dialysate_formulation_name: "",
624
-        device: {}
597
+        device: {},
598
+        dialyzate:''
625 599
       },
626 600
       advices: [],
627 601
       users: [],
@@ -1480,6 +1454,20 @@ export default {
1480 1454
         this.patientInfo_source_2 = false;
1481 1455
         this.patientInfo_source_1 = false;
1482 1456
       }
1457
+    },
1458
+    "prescription.dialyzate": function() {
1459
+      if(this.prescription.dialyzate !='undefined'){
1460
+        if(prescription.dialyzate.indexOf('碳酸')>-1){
1461
+          this.prescription_dialyzate1 =true
1462
+          this.prescription_dialyzate2 = false
1463
+        }else if(prescription.dialyzate.indexOf('醋酸')>-1){
1464
+          this.prescription_dialyzate1 =false
1465
+          this.prescription_dialyzate2 = true
1466
+        }else{
1467
+          this.prescription_dialyzate1 =false
1468
+          this.prescription_dialyzate2 = false
1469
+        }
1470
+      }
1483 1471
     }
1484 1472
   },
1485 1473
   created() {
@@ -1688,4 +1676,10 @@ export default {
1688 1676
 .print-template-two tr {
1689 1677
   line-height: 30px;
1690 1678
 }
1679
+.check_box_panel .did_checke::after {
1680
+  font-size: 8px;
1681
+  margin-left: 2px;
1682
+  margin-top: 2px;
1683
+  position: absolute;
1684
+}
1691 1685
 </style>

+ 122 - 145
src/xt_pages/stock/drugs/components/purchaseDrugQuery.vue Voir le fichier

@@ -17,9 +17,9 @@
17 17
             align="right"
18 18
             format="yyyy-MM-dd"
19 19
             value-format="yyyy-MM-dd"
20
+            :picker-options="pickerOptions"
20 21
             @change="startTimeChange"
21
-             :picker-options="pickerOptions"
22
-             :clearable="false"
22
+            :clearable="false"
23 23
            ></el-date-picker>
24 24
             <span>-</span>
25 25
             <el-date-picker
@@ -33,8 +33,8 @@
33 33
               align="right"
34 34
               format="yyyy-MM-dd"
35 35
               value-format="yyyy-MM-dd"
36
-              @change="endTimeChange"
37 36
               :picker-options="pickerOptions"
37
+              @change="endTimeChange"
38 38
               :clearable="false"
39 39
           ></el-date-picker>
40 40
           <span style="font-size:14px;color:#606266">药品类型:</span>
@@ -72,6 +72,11 @@
72 72
                  {{getDrugTypeName(scope.row.drug_type)}}
73 73
               </template>
74 74
             </el-table-column>
75
+            <el-table-column label="药品别名" align="center">
76
+              <template slot-scope="scope">
77
+                 {{scope.row.drug_alias}}
78
+              </template>
79
+            </el-table-column>
75 80
             <el-table-column label="药品名称" align="center">
76 81
               <template slot-scope="scope">
77 82
                  {{scope.row.drug_name}}
@@ -92,6 +97,11 @@
92 97
                  {{getDearName(scope.row.dealer)}}
93 98
               </template>
94 99
             </el-table-column>
100
+            <el-table-column label="单位" align="center">
101
+              <template slot-scope="scope">
102
+                 {{ scope.row.min_unit }}
103
+              </template>
104
+            </el-table-column>
95 105
             <el-table-column label="期初结余" align="center">
96 106
 
97 107
                  <el-table-column prop="drugIn" label="数量" width="100" align="center">
@@ -161,7 +171,7 @@
161 171
   </div>
162 172
 </template>
163 173
 <script>
164
-import { getStorehouseList,getPurchaseDrugQuery } from "@/api/drug/drug"
174
+import { getStorehouseList,getPurchaseDrugQueryList,getDrugOverCount } from "@/api/drug/drug"
165 175
 const moment = require('moment')
166 176
 import { uParseTime } from '@/utils/tools'
167 177
 export default {
@@ -202,7 +212,7 @@ export default {
202 212
      loading:false,
203 213
      pickerOptions:{ //禁用当前日期之前的日期
204 214
            disabledDate(v) {
205
-            return v.getTime() < 1667232000000
215
+            return v.getTime() < 1667491200000
206 216
           },
207 217
       },
208 218
      dealerList:[]
@@ -229,7 +239,6 @@ export default {
229 239
            this.manufacturerList = response.data.data.manufacturerList
230 240
 
231 241
            this.patientList = response.data.data.patientList
232
-
233 242
            this.dealerList = response.data.data.dealerList
234 243
          }
235 244
       })
@@ -244,7 +253,7 @@ export default {
244 253
           start_time:this.start_time,
245 254
           end_time:this.end_time,
246 255
         }
247
-      getPurchaseDrugQuery(params).then(response=>{
256
+        getPurchaseDrugQueryList(params).then(response=>{
248 257
          if(response.data.state == 1){
249 258
             this.loading = false
250 259
             var list = response.data.data.list
@@ -389,33 +398,36 @@ export default {
389 398
              }
390 399
             }
391 400
 
392
-          
401
+            console.log("list23323223322332232323322323wode",list)
393 402
             for(let i=0;i<list.length;i++){
394 403
               list[i].last_price_in = 0
395
-              list[i].drugInOne = 0
396
-              list[i].drugAddOne =0
404
+              list[i].drugAddOne= 0
397 405
               list[i].drugOutOne =0
398
-              list[i].drugIn = this.getDrugWarehouseInfoOne(list[i].DrugWarehouseInfoStart,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].DrugWarehouseOutInfoStart,list[i].WareStartStockInventoryProfit,list[i].WareStartStockInventoryLosses,list[i].WareStartStockCancelInfo)
399
-              list[i].drugInOne = this.getDrugWarehouseInfoTwentyOne(list[i].DrugWarehouseInfoStart,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].DrugWarehouseOutInfoStart,list[i].WareStartStockInventoryProfit,list[i].WareStartStockInventoryLosses,list[i].WareStartStockCancelInfo)
400
-              list[i].drugInMoney = this.getDrugInMoneyOne(list[i].DrugWarehouseInfoStart,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].DrugWarehouseOutInfoStart,list[i].WareStartStockInventoryProfit,list[i].WareStartStockInventoryLosses,list[i].WareStartStockCancelInfo)
401
-              list[i].drugSaleMoney = this.getSaleMoneyOne(list[i].DrugWarehouseInfoStart,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].DrugWarehouseOutInfoStart,list[i].WareStartStockInventoryProfit,list[i].WareStartStockInventoryLosses,list[i].WareStartStockCancelInfo)
406
+              list[i].drugIn = this.GetDrugStartFlow(list[i].DrugStatFlow.over_count,list[i].min_number,list[i].min_unit,list[i].max_unit) 
407
+          
408
+              list[i].drugInMoney = list[i].last_price
409
+              list[i].drugSaleMoney = (list[i].drugIn * list[i].drugInMoney).toFixed(2)
402 410
 
403 411
               list[i].drugAdd = this.drugAddInfo(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
404
-              list[i].drugAddOne = this.drugAddInfoTwetyOne(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
405
-              list[i].drugAddPrice = this.getdrugAddPrice(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
406
-              list[i].drugAddSalePrice = this.drugAddSalePrice(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
412
+              list[i].drugAddOne = this.drugAddInfoOne(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
413
+           
414
+              list[i].drugAddPrice = list[i].last_price
415
+              list[i].drugAddSalePrice = (list[i].drugAdd * list[i].drugAddPrice).toFixed(2)
407 416
 
408 417
               list[i].drugOut=  this.getDrugOut(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
409
-              list[i].drugOutOne=  this.getDrugOutTwetyOne(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
410
-              list[i].drugOutPrice = this.getDrugOutPrice(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
411
-              list[i].drugOutSalePrice = this.getDrugOutSaleprice(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
412
-
413
-              // list[i].overDrug = this.getDrugWarehouseInfo(list[i].DrugWarehouseInfoEnd,list[i].DrugWarehouseOutInfoEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].WareEndStockCancelInfo)
414
-              list[i].overDrug = this.getOverDrug(list[i].drugInOne,list[i].drugAddOne,list[i].drugOutOne,list[i].min_number,list[i].min_unit,list[i].max_unit)
415
-              list[i].overDrugPrice =  this.getDrugInMoney(list[i].DrugWarehouseInfoEnd,list[i].DrugWarehouseOutInfoEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].WareEndStockCancelInfo)
416
-              list[i].oveDrugSaleMoney =  this.getSaleMoney(list[i].DrugWarehouseInfoEnd,list[i].DrugWarehouseOutInfoEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].WareEndStockCancelInfo)
418
+              list[i].drugOutOne =this.getDrugOutOne(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
419
+           
420
+              list[i].drugOutPrice = list[i].min_price
421
+              list[i].drugOutSalePrice = (list[i].drugOut*list[i].drugOutPrice).toFixed(2)
422
+
423
+          
424
+           
425
+             list[i].overDrug = this.GetDrugOver(list[i].DrugStatFlow.over_count,list[i].drugAddOne,list[i].drugOutOne,list[i].min_number,list[i].min_unit,list[i].max_unit)
426
+            
427
+            
428
+             list[i].overDrugPrice = list[i].last_price
429
+             list[i].oveDrugSaleMoney = (list[i].overDrug * list[i].overDrugPrice).toFixed(2)
417 430
             }
418
-            console.log("我的世界搜哦对哦奥法",list)
419 431
             this.tableList = list;
420 432
             this.total = response.data.data.total
421 433
             this.manufacturerList = response.data.data.manufacturerList
@@ -533,7 +545,10 @@ export default {
533 545
       totalfive += arr5[i].count
534 546
      }
535 547
   }
536
-  
548
+  // console.log("totalONE223323232323232",totalOne)
549
+  // console.log("totalTwo2oo2o32o3o32o23",totalTwo)
550
+  // console.log("totalfive",totalfive)
551
+  // console.log("00-------------------------")
537 552
   total = totalOne - totalTwo + totalthree - totalfour + totalfive
538 553
   if (total < min_number) {
539 554
      min_str = total + min_unit;
@@ -559,48 +574,6 @@ export default {
559 574
   }
560 575
 
561 576
 
562
-  },
563
-
564
-  getDrugWarehouseInfoTwentyOne(arr,min_number,min_unit,max_unit,arr2,arr3,arr4,arr5){
565
-   var total = 0
566
-   var totalOne =0
567
-   var totalTwo = 0
568
-   var totalthree= 0
569
-   var totalfour = 0
570
-   var totalfive = 0
571
-   var max_str = "";
572
-   var min_str = "";
573
-   if(arr!=null && arr.length > 0){
574
-    for(let i=0;i<arr.length;i++){
575
-      totalOne += arr[i].count
576
-     }
577
-   }
578
-   if(arr2!=null && arr2.length > 0){
579
-    for(let i=0;i<arr2.length;i++){
580
-      totalTwo += arr2[i].count
581
-     }
582
-   }
583
-   if(arr3!=null && arr3.length > 0){
584
-    for(let i=0;i<arr3.length;i++){
585
-      totalthree += arr3[i].count
586
-     }
587
-   }
588
-  if(arr4!=null && arr4.length > 0){
589
-    for(let i=0;i<arr4.length;i++){
590
-      totalfour += arr4[i].count
591
-     }
592
-  }
593
-
594
-  if(arr5!=null && arr5.length > 0){
595
-    for(let i=0;i<arr5.length;i++){
596
-      totalfive += arr5[i].count
597
-     }
598
-  }
599
-  
600
-  total = totalOne - totalTwo + totalthree - totalfour + totalfive
601
- 
602
-  
603
-   return total
604 577
   },
605 578
   getDrugWarehouseInfo(arr,arr4,min_number,min_unit,max_unit,arr2,arr3,arr5){
606 579
    var total = 0
@@ -852,12 +825,7 @@ export default {
852 825
    }
853 826
 
854 827
    total_price =(totalOne - totalTwo + total_three - total_four + totalFive).toFixed(2)
855
-   console.log("totalONE232332323323223322323wi",totalOne)
856
-   console.log("totalTwo99999999999999988888888",totalTwo)
857
-   console.log("total_three99999999999999988888888",total_three)
858
-   console.log("total_four99999999999999988888888",total_four)
859
-   console.log("totalFive99999999999999988888888",totalFive)
860
-   console.log("-------------------------------------------")
828
+ 
861 829
    if(total_price >0){
862 830
     return total_price
863 831
    }else{
@@ -1059,7 +1027,8 @@ export default {
1059 1027
    }
1060 1028
   },
1061 1029
    open(){
1062
-    // this.start_time = moment().year(2022).month(10).date(1).format('YYYY-MM-DD')
1030
+   
1031
+    // this.start_time = moment().year(2022).month(10).date(4).format('YYYY-MM-DD')
1063 1032
     this.start_time = moment().startOf('month').format('YYYY-MM-DD')
1064 1033
     this.end_time = moment(new Date()).add('year',0).format("YYYY-MM-DD")
1065 1034
     this.houseList= []
@@ -1086,30 +1055,11 @@ export default {
1086 1055
     }
1087 1056
     total = totalone + totaltwo
1088 1057
 
1089
-    if (total < min_number) {
1090
-      min_str = total + min_unit;
1091
-    }
1092
-    if (total == 0) {
1093
-      min_str = "";
1094
-      max_str = "";
1095
-    }
1096
-    if (total >= min_number) {
1097
-      if (parseInt(total / min_number) != 0) {
1098
-        max_str = parseInt(total / min_number) + max_unit;
1099
-      }
1100
-      if (total % min_number != 0) {
1101
-        min_str = (total % min_number) + min_unit;
1102
-      }
1103
-    }
1104
-    if(max_str == "" && min_str == ""){
1105
-      return "0"
1106
-    }else{
1107
-      return max_str + min_str
1108
-    }
1058
+     
1059
+    return total
1109 1060
 
1110 1061
    },
1111
-
1112
-  drugAddInfoTwetyOne(arr,min_number,min_unit,max_unit,arr2){
1062
+   drugAddInfoOne(arr,min_number,min_unit,max_unit,arr2){
1113 1063
     var total = 0
1114 1064
     var totalone = 0
1115 1065
     var totaltwo = 0
@@ -1128,7 +1078,6 @@ export default {
1128 1078
     total = totalone + totaltwo
1129 1079
 
1130 1080
     
1131
-    
1132 1081
     return total
1133 1082
 
1134 1083
    },
@@ -1197,30 +1146,13 @@ export default {
1197 1146
         totalthree +=arr3[i].count
1198 1147
       }
1199 1148
     }
1149
+   
1200 1150
     total = totalone + totaltwo - totalthree
1201
-    if (total < min_number) {
1202
-      min_str = total + min_unit;
1203
-    }
1204
-    if (total == 0) {
1205
-      min_str = "";
1206
-      max_str = "";
1207
-    }
1208
-    if (total >= min_number) {
1209
-      if (parseInt(total / min_number) != 0) {
1210
-        max_str = parseInt(total / min_number) + max_unit;
1211
-      }
1212
-      if (total % min_number != 0) {
1213
-        min_str = (total % min_number) + min_unit;
1214
-      }
1215
-   }
1216
-   if(max_str == "" && min_str == ""){
1217
-     return "0"
1218
-   }else{
1219
-    return max_str + min_str;
1220
-   }
1151
+    
1152
+    return total
1221 1153
 
1222 1154
    },
1223
-   getDrugOutTwetyOne(arr,min_number,min_unit,max_unit,arr2,arr3){
1155
+   getDrugOutOne(arr,min_number,min_unit,max_unit,arr2,arr3){
1224 1156
     var total = 0
1225 1157
     var totalone = 0
1226 1158
     var totaltwo = 0
@@ -1243,7 +1175,7 @@ export default {
1243 1175
       }
1244 1176
     }
1245 1177
     total = totalone + totaltwo - totalthree
1246
-     
1178
+    
1247 1179
     return total
1248 1180
 
1249 1181
    },
@@ -1320,6 +1252,7 @@ export default {
1320 1252
     this.$router.push({path:"/drugs/purchase/query/print?start_time="+this.start_time+"&end_time="+this.end_time+"&page="+this.page+"&limit="+this.limit+"&keyword="+this.keyword+"&good_type="+this.good_type})
1321 1253
    },
1322 1254
     exportList: function() {
1255
+       
1323 1256
        for(let i=0;i<this.tableList.length;i++){
1324 1257
           this.tableList[i].index = i+1
1325 1258
           this.tableList[i].query_date = this.start_time+"~"+this.end_time
@@ -1328,12 +1261,14 @@ export default {
1328 1261
           this.tableList[i].dealer_name = this.getDearName(this.tableList[i].dealer)
1329 1262
           this.tableList[i].specification_name = this.tableList[i].dose + this.tableList[i].dose_unit +"*"+this.tableList[i].min_number + this.tableList[i].min_unit+"/"+this.tableList[i].max_unit
1330 1263
 
1264
+          // this.tableList[i].drugInMoney = this.tableList[i].last_price
1265
+
1331 1266
         }
1332 1267
         import('@/vendor/Export2Excel').then(excel => {
1333
-           const multiHeader = [['序号', '查询日期','  药品类型','药品名称','规格&单位','生产产商','经销商', '期初结余' , '', '', '本期增加', '', '', '本期减少' , '', '', '期末结余' , '', '']]
1334
-           const header = ['', '','','','','','', '数量', '进货金额', '销售金额', '数量', '进货金额', '销售金额', '数量', '进货金额', '销售金额', '数量', '进货金额', '销售金额']
1335
-           const merges = ['A1:A2', 'B1:B2','C1:C2','D1:D2','E1:E2','F1:F2','G1:G2','H1:J1', 'K1:M1', 'N1:P1', 'Q1:S1']
1336
-           const filterVal = ['index', 'query_date', 'good_type','drug_name','specification_name','manufacturer_name','dealer_name','drugIn','drugInMoney','drugSaleMoney','drugAdd','drugAddPrice','drugAddSalePrice','drugOut','drugOutPrice','drugOutSalePrice','overDrug','overDrugPrice','oveDrugSaleMoney']
1268
+           const multiHeader = [['序号', '查询日期','  药品类型','药品别名','药品名称','规格&单位','生产产商','经销商','单位', '期初结余' , '', '', '本期增加', '', '', '本期减少' , '', '', '期末结余' , '', '']]
1269
+           const header = ['', '','','','','','','','', '数量', '进货金额', '销售金额', '数量', '进货金额', '销售金额', '数量', '进货金额', '销售金额', '数量', '进货金额', '销售金额']
1270
+           const merges = ['A1:A2', 'B1:B2','C1:C2','D1:D2','E1:E2','F1:F2','G1:G2','H1:H2','I1:I2', 'J1:L1', 'M1:O1', 'P1:R1','S1:U1']
1271
+           const filterVal = ['index', 'query_date', 'good_type','drug_alias','drug_name','specification_name','manufacturer_name','dealer_name','min_unit','drugIn','drugInMoney','drugSaleMoney','drugAdd','drugAddPrice','drugAddSalePrice','drugOut','drugOutPrice','drugOutSalePrice','overDrug','overDrugPrice','oveDrugSaleMoney']
1337 1272
 
1338 1273
            const data = this.formatJson(filterVal, this.tableList)
1339 1274
 
@@ -1352,19 +1287,38 @@ export default {
1352 1287
     formatJson(filterVal, jsonData) {
1353 1288
       return jsonData.map(v => filterVal.map(j => v[j]));
1354 1289
     },
1355
-    getDearName(id){
1356
-      var dear_name = ""
1357
-      for(let i=0;i<this.dealerList.length;i++){
1358
-        if(id == this.dealerList[i].id){
1359
-          dear_name = this.dealerList[i].dealer_name
1360
-        }
1361
-      }
1362
-      return dear_name
1290
+    GetDrugStartFlow(total,min_number,min_unit,max_unit){
1291
+      // var min_str = ""
1292
+      // var max_str = ""
1293
+      // if (total < min_number) {
1294
+      //   min_str = total + min_unit;
1295
+      // }
1296
+      // if (total == 0) {
1297
+      //   min_str = "";
1298
+      //   max_str = "";
1299
+      // }
1300
+      // if (total >= min_number) {
1301
+      //   if (parseInt(total / min_number) != 0) {
1302
+      //       max_str = parseInt(total / min_number) + max_unit;
1303
+      //   }
1304
+      //   if (total % min_number != 0) {
1305
+      //       min_str = (total % min_number) + min_unit;
1306
+      //   }
1307
+      // }
1308
+      //   if(max_str == "" && min_str == ""){
1309
+      //       return "0"
1310
+      //   }else{
1311
+      //       return max_str + min_str;
1312
+      //   }
1313
+      return total
1363 1314
     },
1364
-    getOverDrug(totalone,totaltwo,totalthree,min_number,min_unit,max_unit){
1365
-      var total = 0
1366
-      total = totalone + totaltwo - totalthree
1367
-      if (total < min_number) {
1315
+
1316
+  
1317
+    GetDrugEndFlow(total,min_number,min_unit,max_unit){
1318
+
1319
+     var min_str = ""
1320
+     var max_str = ""    
1321
+     if (total < min_number) {
1368 1322
         min_str = total + min_unit;
1369 1323
       }
1370 1324
       if (total == 0) {
@@ -1373,18 +1327,41 @@ export default {
1373 1327
       }
1374 1328
       if (total >= min_number) {
1375 1329
         if (parseInt(total / min_number) != 0) {
1376
-          max_str = parseInt(total / min_number) + max_unit;
1330
+            max_str = parseInt(total / min_number) + max_unit;
1377 1331
         }
1378 1332
         if (total % min_number != 0) {
1379
-          min_str = (total % min_number) + min_unit;
1333
+            min_str = (total % min_number) + min_unit;
1380 1334
         }
1335
+      }
1336
+     if(max_str == "" && min_str == ""){
1337
+            return "0"
1338
+        }else{
1339
+            return max_str + min_str;
1340
+       }
1341
+    },
1342
+    toOverCount(){
1343
+      getDrugOverCount().then(response=>{
1344
+        if(response.data.state == 1){
1345
+          var msg = response.data.data.msg
1346
+          this.$message.success("调试成功")
1347
+        }
1348
+      })  
1349
+    },
1350
+    getDearName(id){
1351
+      var dear_name = ""
1352
+      for(let i=0;i<this.dealerList.length;i++){
1353
+        if(id == this.dealerList[i].id){
1354
+          dear_name = this.dealerList[i].dealer_name
1355
+        }
1356
+      }
1357
+      return dear_name
1358
+    },
1359
+    GetDrugOver(totalone,totaltwo,totalthree,min_number,min_unit,max_unit){
1360
+      var total = 0
1361
+    
1362
+      total = totalone + totaltwo - totalthree
1363
+      return total
1381 1364
     }
1382
-    if(max_str == "" && min_str == ""){
1383
-      return "0"
1384
-    }else{
1385
-      return max_str + min_str;
1386
-    }
1387
-   }
1388 1365
   }
1389 1366
 }
1390 1367
 </script>

Fichier diff supprimé car celui-ci est trop grand
+ 1094 - 999
src/xt_pages/stock/drugs/components/purchaseDrugQueryPrint.vue


+ 5 - 5
src/xt_pages/stock/drugs/drugNewQuery.vue Voir le fichier

@@ -10,14 +10,14 @@
10 10
               <DrugQuery></DrugQuery>
11 11
             </el-tab-pane>
12 12
           
13
-           <!-- <el-tab-pane label="进销存查询" name="second">
14
-              <PurchaseDrugQuery ref="mychild"></PurchaseDrugQuery>
15
-            </el-tab-pane>  -->
16
-
17
-             <el-tab-pane label="进销存查询" name="five">
13
+           <el-tab-pane label="进销存查询" name="five">
18 14
                <PurchaseNewDrugQuery ref="mychildfive"></PurchaseNewDrugQuery>
19 15
             </el-tab-pane>
20 16
         
17
+            <el-tab-pane label="进销存查询" name="second">
18
+              <PurchaseDrugQuery ref="mychild"></PurchaseDrugQuery>
19
+            </el-tab-pane> 
20
+
21 21
             <el-tab-pane label="有效期查询" name="third">
22 22
                 <ExpiryDateDrugQuery ref="mychildOne"></ExpiryDateDrugQuery>
23 23
             </el-tab-pane>

+ 11 - 1
src/xt_pages/stock/drugs/drugStockFlow.vue Voir le fichier

@@ -51,6 +51,8 @@
51 51
         
52 52
         <span>
53 53
           <el-button type="primary" size="small" @click="toExprot">导出</el-button>
54
+
55
+          <!-- <el-button type="primary" size="small" @click="toTongBu">同步</el-button> -->
54 56
         </span>
55 57
         
56 58
       </div>
@@ -186,7 +188,7 @@
186 188
 <script>
187 189
   import { uParseTime } from '@/utils/tools'
188 190
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
189
-  import { getDrugStockFlow,getOutDrugStockFlow,getDrugCountList,getDrugFlow } from '@/api/drug/drug_stock'
191
+  import { getDrugStockFlow,getOutDrugStockFlow,getDrugCountList,getDrugFlow,getDrugFlowDetailByDrugId } from '@/api/drug/drug_stock'
190 192
   import SettingDialog from './settingDialog/index'
191 193
   import { getDictionaryDataConfig } from "@/utils/data";
192 194
   export default {
@@ -725,6 +727,14 @@
725 727
     formatJson(filterVal, jsonData) {
726 728
      return jsonData.map(v => filterVal.map(j => v[j]))
727 729
     },
730
+    toTongBu(){
731
+      var params = {
732
+        drug_id:this.$route.query.drug_id
733
+      }
734
+      getDrugFlowDetailByDrugId(params).then(response=>{
735
+
736
+      })
737
+    }
728 738
     }
729 739
   }
730 740
 </script>