Procházet zdrojové kódy

Merge remote-tracking branch 'origin/20230223_pc_vue_new_branch' into 20230223_pc_vue_new_branch

杨青 před 1 rokem
rodič
revize
4b01008db3

+ 30 - 0
src/xt_pages/dialysis/bloodPresssWatch.vue Zobrazit soubor

@@ -524,6 +524,10 @@
524 524
           </ul>
525 525
         </div>
526 526
       </div>
527
+      
528
+      <!-- <div style="margin-left: 1150px; margin-bottom: 10px;">
529
+        <el-button type="primary" size="small" @toClicK="toExport">导出</el-button>
530
+      </div> -->
527 531
 
528 532
       <el-table
529 533
         :row-style="{ color: '#303133' }"
@@ -2205,6 +2209,32 @@ export default {
2205 2209
       } else if (this.template_id == 33) {
2206 2210
         this.$router.push({ path: "/dialysis/print/batch/thirtyThree_two" });
2207 2211
       }
2212
+    },
2213
+    toExport(){
2214
+      import('@/vendor/Export2Excel').then(excel => { 
2215
+         
2216
+         console.log("监测统计",this.SchedualPatientsTableData)
2217
+        
2218
+         const tHeader = ['序号','机号','规格','数量']
2219
+         const filterVal = ['index','advice_name','specification_name','total_count']
2220
+
2221
+         const data = this.formatJson(filterVal, this.tableList)
2222
+         excel.export_json_to_excel({
2223
+           header: tHeader,
2224
+           data,
2225
+           filename: '药品统计'
2226
+         })
2227
+           this.downloadLoading = false
2228
+         })  
2229
+    },
2230
+    formatJson(filterVal, jsonData) {
2231
+      return jsonData.map(v => filterVal.map(j => {
2232
+        if (j === 'timestamp') {
2233
+          return parseTime(v[j])
2234
+        } else {
2235
+          return v[j]
2236
+        }
2237
+      }))
2208 2238
     }
2209 2239
   },
2210 2240
   components: {

+ 3 - 3
src/xt_pages/qcd/statisticalConfiguration.vue Zobrazit soubor

@@ -69,8 +69,8 @@
69 69
           <el-pagination
70 70
               @size-change="handleSizeChange"
71 71
               @current-change="handleCurrentChange"
72
-              :page-sizes="[12, 20, 30, 100]"
73
-              :page-size="12"
72
+              :page-sizes="[10, 20, 30, 100]"
73
+              :page-size="10"
74 74
               background
75 75
               style="margin-top:20px;float: right"
76 76
               layout="total, sizes, prev, pager, next, jumper"
@@ -485,7 +485,7 @@ export default {
485 485
           this.configuraData = configurationlist
486 486
           var total = response.data.data.total
487 487
           // console.log("total",total)
488
-          this.total = total+2
488
+          this.total = total
489 489
         }
490 490
       })
491 491
     },

+ 32 - 5
src/xt_pages/stock/detail/cancelStockDetail.vue Zobrazit soubor

@@ -257,7 +257,9 @@ export default {
257 257
       tableDataList:[],
258 258
       table:[],
259 259
       houseList:[],
260
-      storehouse_id:0
260
+      storehouse_id:0,
261
+      manufacturerList:[],
262
+      dealerList:[],
261 263
     };
262 264
   },
263 265
   methods: {
@@ -399,9 +401,11 @@ export default {
399 401
           }
400 402
           console.log("list232323232322332232323ow",this.cancelStockDate)
401 403
           this.tableDataList = response.data.data.list
402
-
404
+          this.manufacturerList = response.data.data.manufacturerList
405
+          this.dealerList = response.data.data.dealerList
403 406
           var listgroup = response.data.data.listgroup
404
-
407
+          
408
+          this.
405 409
 
406 410
           this.cancelStockDate.push({
407 411
             order_number: "合计",
@@ -425,6 +429,25 @@ export default {
425 429
         }
426 430
       });
427 431
     },
432
+    getManufacturerNameOne(id){
433
+        var manufacturer_name = ""
434
+        for(let i=0;i<this.manufacturerList.length;i++){
435
+          if(id == this.manufacturerList[i].id){
436
+            manufacturer_name = this.manufacturerList[i].manufacturer_name
437
+          }
438
+        }
439
+        return manufacturer_name
440
+     },
441
+     getDealerNameOne(id){
442
+       var dealer_name = ""
443
+     
444
+       for(let i=0;i<this.dealerList.length;i++){
445
+          if(id == this.dealerList[i].id){
446
+              dealer_name = this.dealerList[i].dealer_name
447
+          }
448
+       }
449
+       return dealer_name
450
+     }, 
428 451
     getXuserName(id) {
429 452
       if (id <= 0) {
430 453
         return "";
@@ -625,7 +648,6 @@ export default {
625 648
         .catch(() => {});
626 649
     },
627 650
       exportList(){
628
-        console.log("hhhhhh",this.tableList)
629 651
         for(let i=0;i<this.tableList.length;i++){
630 652
           this.tableList[i].index = i+1
631 653
           this.tableList[i].good_name = this.tableList[i].GoodInfo.good_name
@@ -633,6 +655,8 @@ export default {
633 655
           this.tableList[i].packing_unit = this.tableList[i].GoodInfo.packing_unit
634 656
           this.tableList[i].total = this.getTotalCount(this.tableList[i].child)
635 657
           this.tableList[i].total_price = (this.tableList[i].total * this.tableList[i].price).toFixed(2)
658
+          this.tableList[i].manufacturer_name = this.getManufacturerNameOne(this.tableList[i].manufacturer)
659
+          this.tableList[i].dealer_name = this.getDealerNameOne(this.tableList[i].dealer)
636 660
 
637 661
         }
638 662
        var obj = {"index":"合计","total_price":0}
@@ -640,7 +664,7 @@ export default {
640 664
            obj.total_price +=this.tableList[i].total * this.tableList[i].price
641 665
        }
642 666
        obj.total_price = obj.total_price.toFixed(2)
643
-       console.log("obj23233",obj)
667
+      
644 668
        this.tableList.push(obj)
645 669
        import('@/vendor/Export2Excel').then(excel => {
646 670
        const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','退库价','总价','备注']
@@ -669,7 +693,10 @@ export default {
669 693
           this.tableDataList[i].user_name = this.getXuserName(this.tableDataList[i].CancelStock.creater)
670 694
           this.tableDataList[i].out_count = this.tableDataList[i].count
671 695
           this.tableDataList[i].total_price = (this.tableDataList[i].count * this.tableDataList[i].price).toFixed(2)
696
+          this.tableDataList[i].manufacturer_name = this.getManufacturerNameOne(this.tableDataList[i].manufacturer)
697
+          this.tableDataList[i].dealer_name = this.getDealerNameOne(this.tableDataList[i].dealer)
672 698
           total += this.tableDataList[i].count * this.tableDataList[i].price
699
+
673 700
         }
674 701
         obj.total_price = total.toFixed(2)
675 702
         this.tableDataList.push(obj)

+ 36 - 6
src/xt_pages/stock/detail/stockInDetail.vue Zobrazit soubor

@@ -265,6 +265,8 @@ export default {
265 265
       tableDataList:[],
266 266
       houseList:[],
267 267
       storehouse_id:0,
268
+      manufacturerList:[],
269
+      dealerList:[],
268 270
     };
269 271
   },
270 272
   methods: {
@@ -345,6 +347,8 @@ export default {
345 347
             obj["is_total"] = 0;
346 348
             this.cancelStockDate.push(obj);
347 349
           }
350
+          this.manufacturerList = response.data.data.manufacturerList
351
+          this.dealerList = response.data.data.dealerList
348 352
 
349 353
           this.cancelStockDate.push({
350 354
             warehousing_order: "合计",
@@ -405,7 +409,9 @@ export default {
405 409
             this.cancelStockDate.push(obj);
406 410
           }
407 411
           this.tableDataList = response.data.data.list
408
-          console.log("表格发3223332322332332323232332233",this.cancelStockDate)
412
+          this.manufacturerList = response.data.data.manufacturerList
413
+          this.dealerList = response.data.data.dealerList
414
+        
409 415
 
410 416
           this.cancelStockDate.push({
411 417
             warehousing_order: "合计",
@@ -772,11 +778,13 @@ export default {
772 778
         for(let i=0;i<this.tableInfo.length;i++){
773 779
           this.tableInfo[i].index = i+1
774 780
           this.tableInfo[i].total_price = (this.tableInfo[i].warehousing_count * this.tableInfo[i].price).toFixed(2)
781
+          this.tableInfo[i].manufacturer_name = this.getManufactuerName(this.tableInfo[i].manufacturer)
782
+          this.tableInfo[i].dealer_name = this.getDealerName(this.tableInfo[i].dealer)
775 783
         }
776 784
 
777 785
         import('@/vendor/Export2Excel').then(excel => {
778
-        const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','进货价','总价','备注']
779
-        const filterVal = ['index','good_name', 'specification_name', 'packing_unit','warehousing_count','price','total_price','remark']
786
+        const tHeader = ['序号','耗材名称', '规格型号','生产厂商','进销商', '单位','数量','进货价','总价','备注']
787
+        const filterVal = ['index','good_name', 'specification_name','manufacturer_name','dealer_name', 'packing_unit','warehousing_count','price','total_price','remark']
780 788
 
781 789
 
782 790
         const data = this.formatJson(filterVal, this.tableInfo)
@@ -790,10 +798,29 @@ export default {
790 798
             this.downloadLoading = false
791 799
         })
792 800
       },
801
+        getManufacturerName(id){
802
+          var manufacturer_name = ""
803
+          for(let i=0;i<this.manufacturerList.length;i++){
804
+            if(id == this.manufacturerList[i].id){
805
+              manufacturer_name = this.manufacturerList[i].manufacturer_name
806
+            }
807
+          }
808
+          return manufacturer_name
809
+      },
810
+      getDealerName(id){
811
+        var dealer_name = ""
812
+        for(let i=0;i<this.dealerList.length;i++){
813
+            if(id == this.dealerList[i].id){
814
+                dealer_name = this.dealerList[i].dealer_name
815
+            }
816
+        }
817
+        return dealer_name
818
+      }, 
793 819
       exportListDetal(){
794 820
 
795 821
         var obj = {index:"合计",total_price:0}
796 822
         var total = 0
823
+        console.log("wowowows",this.tableDataList)
797 824
         for(let i=0;i<this.tableDataList.length;i++){
798 825
           this.tableDataList[i].index = i + 1
799 826
           this.tableDataList[i].good_type_name = this.typeName(this.tableDataList[i].good_type_id)
@@ -802,18 +829,21 @@ export default {
802 829
           this.tableDataList[i].time = this.getTime(this.tableDataList[i].Warehousing.warehousing_time)
803 830
           this.tableDataList[i].user_name = this.getXuserName(this.tableDataList[i].Warehousing.creater)
804 831
           this.tableDataList[i].total_price = (this.tableDataList[i].warehousing_count * this.tableDataList[i].price).toFixed(2)
832
+          this.tableDataList[i].manufacturer_name = this.getManufactuerName(this.tableDataList[i].manufacturer)
833
+          this.tableDataList[i].dealer_name = this.getDealerName(this.tableDataList[i].dealer)
805 834
           total += this.tableDataList[i].warehousing_count * this.tableDataList[i].price
835
+          
806 836
         }
807 837
         obj.total_price = total.toFixed(2)
808 838
         this.tableDataList.push(obj)
839
+      
809 840
         import('@/vendor/Export2Excel').then(excel => {
810
-        const tHeader = ['序号','单据编号', '耗材类型', '耗材名称','规格型号','操作时间','制单人','进货价','数量','总价']
811
-        const filterVal = ['index','warehousing_order', 'good_type_name', 'good_name','specification_name','time','user_name','price','warehousing_count','total_price']
841
+        const tHeader = ['序号','单据编号', '耗材类型', '耗材名称','规格型号','生产厂商','进销商','操作时间','制单人','进货价','数量','总价']
842
+        const filterVal = ['index','warehousing_order', 'good_type_name', 'good_name','specification_name','manufacturer_name','dealer_name','time','user_name','price','warehousing_count','total_price']
812 843
 
813 844
 
814 845
         const data = this.formatJson(filterVal, this.tableDataList)
815 846
 
816
-
817 847
           excel.export_json_to_excel({
818 848
             header: tHeader,
819 849
             data,

+ 43 - 5
src/xt_pages/stock/detail/stockOutDetail.vue Zobrazit soubor

@@ -117,6 +117,13 @@
117 117
           </template>
118 118
         </el-table-column>
119 119
 
120
+
121
+        <el-table-column label="生产厂商" align="center">
122
+          <template slot-scope="scope">
123
+            {{ getManufactuerName(scope.row.manufacturer) }}
124
+          </template>
125
+        </el-table-column>
126
+
120 127
         <!-- <el-table-column label="单据类型" align="center">
121 128
           <template slot-scope="scope">
122 129
             {{ getTypeName(scope.row) }}
@@ -271,6 +278,8 @@ export default {
271 278
       storehouse_id:0,
272 279
       houseList:[],
273 280
       wareOutList:[],
281
+      manufacturerList:[],
282
+      dealerList:[],
274 283
     };
275 284
   },
276 285
   methods: {
@@ -431,6 +440,8 @@ export default {
431 440
           }
432 441
 
433 442
           this.tableDataList = response.data.data.list
443
+          this.manufacturerList = response.data.data.manufacturerList
444
+          this.dealerList = response.data.data.dealerList
434 445
 
435 446
           this.cancelStockDate.push(objOne);
436 447
 
@@ -531,6 +542,25 @@ export default {
531 542
         }
532 543
       });
533 544
     },
545
+    getManufacturerNameOne(id){
546
+        var manufacturer_name = ""
547
+        for(let i=0;i<this.manufacturerList.length;i++){
548
+          if(id == this.manufacturerList[i].id){
549
+            manufacturer_name = this.manufacturerList[i].manufacturer_name
550
+          }
551
+        }
552
+        return manufacturer_name
553
+     },
554
+     getDealerNameOne(id){
555
+       var dealer_name = ""
556
+     
557
+       for(let i=0;i<this.dealerList.length;i++){
558
+          if(id == this.dealerList[i].id){
559
+              dealer_name = this.dealerList[i].dealer_name
560
+          }
561
+       }
562
+       return dealer_name
563
+     }, 
534 564
     getManufactuerName: function(manufacturer_id) {
535 565
       for (let i = 0; i < this.manufacturer.length; i++) {
536 566
         if (this.manufacturer[i].id == manufacturer_id) {
@@ -851,11 +881,16 @@ export default {
851 881
         if(this.orgId!=10265 && this.orgId !=10215  && this.orgId != 9671 &&this.orgId!=10210&&this.orgId!=9675 && this.orgId!=9956&& this.orgId!=10217 && this.orgId!=10188 && this.orgId!=10191 && this.orgId!=9919 && this.orgId!=0&& this.orgId!=10402 && this.orgId != 10489 && this.orgId!=10375 && this.orgId!=10485){
852 882
           this.tableOut[i].out_count = this.getStockCount(this.tableOut[i].good_id)
853 883
         }
884
+        this.tableOut[i].manufacturer_name = this.getManufacturerNameOne(this.tableOut[i].manufacturer)
885
+        console.log("继续桑",this.tableOut[i].dealer)
886
+        this.tableOut[i].dealer_name = this.getDealerNameOne(this.tableOut[i].dealer)
854 887
        }
888
+       console.log("retusoossoso",this.tableOut)
889
+       
855 890
        import('@/vendor/Export2Excel').then(excel => {
856
-       const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','出库时间','备注']
891
+       const tHeader = ['序号','耗材名称', '规格型号','生产厂商','进销商', '单位','数量','出货价','总价','出库时间','备注']
857 892
 
858
-       const filterVal = ['index','good_name', 'specification_name', 'packing_unit','out_count','packing_price','total_price','ctime','remark']
893
+       const filterVal = ['index','good_name', 'specification_name', 'manufacturer_name','dealer_name','packing_unit','out_count','packing_price','total_price','ctime','remark']
859 894
 
860 895
        const data = this.formatJson(filterVal, this.tableOut)
861 896
 
@@ -880,6 +915,8 @@ export default {
880 915
           this.tableDataList[i].time = this.getTime(this.tableDataList[i].WarehouseOut.warehouse_out_time)
881 916
           this.tableDataList[i].user_name = this.getXuserName(this.tableDataList[i].WarehouseOut.creater)
882 917
           this.tableDataList[i].out_count = this.tableDataList[i].count
918
+          this.tableDataList[i].manufacturer_name = this.getManufacturerNameOne(this.tableDataList[i].GoodInfo.manufacturer)
919
+          this.tableDataList[i].dealer_name = this.getDealerNameOne(this.tableDataList[i].GoodInfo.dealer)
883 920
           if(this.orgId == 9919){
884 921
              this.tableDataList[i].total_price = (this.tableDataList[i].count * this.tableDataList[i].GoodInfo.buy_price).toFixed(2)
885 922
              total += this.tableDataList[i].count * this.tableDataList[i].buy_price
@@ -891,11 +928,12 @@ export default {
891 928
 
892 929
         }
893 930
         obj.total_price = total.toFixed(2)
894
-
931
+        console.log("WOHHAHHAHAH",this.tableDataList)
932
+      
895 933
         this.tableDataList.push(obj)
896 934
        import('@/vendor/Export2Excel').then(excel => {
897
-       const tHeader = ['序号','单据编号', '耗材类型', '耗材名称','规格型号','操作时间','制单人','出货价','数量','总价']
898
-       const filterVal = ['index','warehouse_out_order_number', 'good_type_name', 'good_name','specification_name','time','user_name','price','out_count','total_price']
935
+       const tHeader = ['序号','单据编号', '耗材类型', '耗材名称','规格型号','生产厂商','进销商','操作时间','制单人','出货价','数量','总价']
936
+       const filterVal = ['index','warehouse_out_order_number', 'good_type_name', 'good_name','specification_name','manufacturer_name','dealer_name','time','user_name','price','out_count','total_price']
899 937
 
900 938
        const data = this.formatJson(filterVal, this.tableDataList)
901 939
 

+ 37 - 14
src/xt_pages/stock/drugs/components/drugCancelDetail.vue Zobrazit soubor

@@ -235,6 +235,8 @@ export default {
235 235
       tableList:[],
236 236
       tableDataList:[],
237 237
       drugTypeList:[],
238
+      dealerList:[],
239
+      manufacturerList:[]
238 240
     };
239 241
   },
240 242
   methods: {
@@ -348,6 +350,8 @@ export default {
348 350
          if(response.data.state == 1){
349 351
            var order =  response.data.data.order
350 352
            var list = response.data.data.orderPrint
353
+           this.dealerList =  response.data.data.dealerList
354
+           this.manufacturerList =  response.data.data.manufacturerList
351 355
            //this.drugTypeList = response.data.data.drugTypeList
352 356
            for(let i=0;i<list.length;i++){
353 357
              list[i].child = []
@@ -356,15 +360,21 @@ export default {
356 360
                   list[i].child.push(order[j])
357 361
                }
358 362
             }
363
+            list[i].manufacturer_name = this.getManufacturerName(list[i].manufacturer)
364
+            list[i].dealer_name = this.getDealerName(list[i].dealer)
359 365
            }
360 366
            this.tableDataList = list
367
+           console.log("数据我我我",this.tableDataList)
361 368
            var total_price = 0
362 369
           for(let i=0;i<order.length;i++){
363 370
              order[i].specification_name  = order[i].dose + order[i].dose_unit + "*" + order[i].min_number +  order[i].min_unit + "/" + order[i].max_unit
364 371
              order[i].is_total = 0
365 372
              order[i].total_price = order[i].count * order[i].price
366 373
              total_price += order[i].count * order[i].price
374
+             order[i].manufacturer_name = this.getManufacturerName(order[i].manufacturer)
375
+             order[i].dealer_name = this.getDealerName(order[i].dealer)
367 376
           }
377
+
368 378
            order.push({
369 379
             order_number: "合计",
370 380
             is_total: 1,
@@ -380,7 +390,24 @@ export default {
380 390
          }
381 391
       })
382 392
     },
383
-
393
+    getManufacturerName(id){
394
+        var manufacturer_name = ""
395
+        for(let i=0;i<this.manufacturerList.length;i++){
396
+          if(id == this.manufacturerList[i].id){
397
+            manufacturer_name = this.manufacturerList[i].manufacturer_name
398
+          }
399
+        }
400
+        return manufacturer_name
401
+     },
402
+     getDealerName(id){
403
+       var dealer_name = ""
404
+       for(let i=0;i<this.dealerList.length;i++){
405
+          if(id == this.dealerList[i].id){
406
+              dealer_name = this.dealerList[i].dealer_name
407
+          }
408
+       }
409
+       return dealer_name
410
+     }, 
384 411
      getAdminUser(id){
385 412
       var name = ""
386 413
       for(let i=0;i<this.adminUserOptions.length;i++){
@@ -418,8 +445,8 @@ export default {
418 445
           this.tableDataList[i].ctime = this.getTime(this.tableDataList[i].ctime)
419 446
         }
420 447
        import('@/vendor/Export2Excel').then(excel => {
421
-        const tHeader = ['序号','单据编号', '药品名称', '规格型号','单据类型','操作时间','制单人','数量','退库价','总价']
422
-        const filterVal = ['index','order_number','drug_name', 'specification_name', 'drug_type','ctime','user_name','total_count','price','total_price']
448
+        const tHeader = ['序号','单据编号', '药品名称', '规格型号','生产厂商','进销商','单据类型','操作时间','制单人','数量','退库价','总价']
449
+        const filterVal = ['index','order_number','drug_name', 'specification_name','manufacturer_name','dealer_name', 'drug_type','ctime','user_name','total_count','price','total_price']
423 450
 
424 451
         const data = this.formatJson(filterVal, this.tableDataList)
425 452
 
@@ -436,8 +463,8 @@ export default {
436 463
      },
437 464
     exportListOne(){
438 465
       // let obj = {'index':'合计','total_price':0}
439
-      console.log("@332322323232332",this.tableList)
440
-
466
+    
467
+ 
441 468
        for(let i=0;i<this.tableList.length;i++){
442 469
           this.tableList[i].index = i+1
443 470
           this.tableList[i].unit = this.tableList[i].dose + this.tableList[i].dose_unit + "*"+this.tableList[i].min_number + this.tableList[i].min_unit+"/"+this.tableList[i].max_unit
@@ -453,17 +480,13 @@ export default {
453 480
           this.tableList[i].time = this.getTime(this.tableList[i].ctime)
454 481
           this.tableList[i].user_name = this.getAdminUser(this.tableList[i].creater)
455 482
 
456
-          //this.tableList[i].total_price = this.tableList[i].count * this.tableList[i].price
457
-          //  obj.total_price += this.tableList[i].count * this.tableList[i].price
458 483
         }
459
-      //   obj.total_price = obj.total_price.toFixed(2)
460
-      //  this.tableList.push(obj)
461
-      //  for(let i=0;i<this.tableData.length;i++){
462
-      //    this.tableData[i].total_price = (this.tableData[i].total_price).toFixed(2)
463
-      //  }
484
+    
485
+      console.log("@332322323232332",this.tableList)
486
+      
464 487
        import('@/vendor/Export2Excel').then(excel => {
465
-       const tHeader = ['序号','单据编号', '药品类型','药品名称', '规格型号','操作时间','制单人','退货价','数量','总价']
466
-       const filterVal = ['index','order_number','drugtype','drug_name', 'specification_name', 'time','user_name','price','count','total_price']
488
+       const tHeader = ['序号','单据编号', '药品类型','药品名称', '规格型号','生产厂商','进销商','操作时间','制单人','退货价','数量','总价']
489
+       const filterVal = ['index','order_number','drugtype','drug_name', 'specification_name','manufacturer_name','dealer_name', 'time','user_name','price','count','total_price']
467 490
 
468 491
        const data = this.formatJson(filterVal, this.tableList)
469 492
 

+ 33 - 8
src/xt_pages/stock/drugs/components/drugInOrder.vue Zobrazit soubor

@@ -449,6 +449,8 @@ export default {
449 449
             var list = response.data.data.list
450 450
           
451 451
             this.tabelePrintList = list
452
+            this.manufacturerList = response.data.data.manufacturerList
453
+            this.dealerList = response.data.data.dealerList
452 454
           }   
453 455
       })
454 456
     },
@@ -470,17 +472,19 @@ export default {
470 472
       return name
471 473
     },
472 474
      exportList(){
473
-       
475
+        
476
+       console.log("tablePrintlist",this.tabelePrintList)
477
+      
474 478
         for(let i=0;i<this.tabelePrintList.length;i++){
475 479
           this.tabelePrintList[i].index = i+1
476 480
           this.tabelePrintList[i].drug_name = this.tabelePrintList[i].XtBaseDrug.drug_name
477
-
481
+          this.tabelePrintList[i].manufacturer_name = this.getManufacturerName(this.tabelePrintList[i].manufacturer)
482
+          this.tabelePrintList[i].dealer_name = this.getDealerName(this.tabelePrintList[i].dealer)
478 483
           this.tabelePrintList[i].unit = this.tabelePrintList[i].XtBaseDrug.dose + this.tabelePrintList[i].XtBaseDrug.dose_unit + "*" + this.tabelePrintList[i].XtBaseDrug.min_number +this.tabelePrintList[i].XtBaseDrug.min_unit +"/"+this.tabelePrintList[i].XtBaseDrug.max_unit
479 484
         }
480
-        
481 485
        import('@/vendor/Export2Excel').then(excel => {
482
-       const tHeader = ['序号','药品名称', '规格型号', '单位','数量','单价','总价','备注']
483
-       const filterVal = ['index','drug_name', 'unit', 'max_unit','warehousing_count','price','total_price','remark']
486
+       const tHeader = ['序号','药品名称', '规格型号','生产厂商','经销商', '单位','数量','单价','总价','备注']
487
+       const filterVal = ['index','drug_name', 'unit','manufacturer_name','dealer_name', 'max_unit','warehousing_count','price','total_price','remark']
484 488
        let obj = {'index':'合计','total_price':0}
485 489
        for(let i=0;i<this.tabelePrintList.length;i++){
486 490
          obj.total_price += this.tabelePrintList[i].price * this.tabelePrintList[i].warehousing_count
@@ -503,21 +507,42 @@ export default {
503 507
      formatJson(filterVal, jsonData) {
504 508
         return jsonData.map(v => filterVal.map(j => v[j]));
505 509
      },
510
+     getManufacturerName(id){
511
+        var manufacturer_name = ""
512
+        for(let i=0;i<this.manufacturerList.length;i++){
513
+          if(id == this.manufacturerList[i].id){
514
+            manufacturer_name = this.manufacturerList[i].manufacturer_name
515
+          }
516
+        }
517
+        return manufacturer_name
518
+     },
519
+     getDealerName(id){
520
+       var dealer_name = ""
521
+       for(let i=0;i<this.dealerList.length;i++){
522
+          if(id == this.dealerList[i].id){
523
+              dealer_name = this.dealerList[i].dealer_name
524
+          }
525
+       }
526
+       return dealer_name
527
+     }, 
506 528
      exportListDetail(){
507 529
        
508 530
        import('@/vendor/Export2Excel').then(excel => {
509
-       const tHeader = ['序号','单据编号', '药品类型', '药品名称','规格型号','操作时间','制单人','进货价','数量','总价']
510
-       const filterVal = ['index','warehousing_order','drugtype','drug_name', 'specification_name','time','user_name','price','warehousing_count','total']
531
+       const tHeader = ['序号','单据编号', '药品类型', '药品名称','规格型号','生产厂商','进销商','操作时间','制单人','进货价','数量','总价']
532
+       const filterVal = ['index','warehousing_order','drugtype','drug_name', 'specification_name','manufacturer_name','dealer_name','time','user_name','price','warehousing_count','total']
511 533
 
512 534
        var newArr = []
513 535
        newArr = this.cancelStockDate
536
+       console.log("newArrwowowowoow",newArr)
537
+     
514 538
        let obj = {'index':'合计','total':0}
515 539
        for(let i=0;i<newArr.length;i++){
516 540
           newArr.specification_name = ""
517 541
           newArr.index = i+1
518 542
          newArr[i].drugtype = this.getTypeList(newArr[i].drug_type)
519 543
          newArr[i].specification_name = newArr[i].dose + newArr[i].dose_unit +"*" + newArr[i].min_number + newArr[i].min_unit +  "/" + newArr[i].max_unit
520
-
544
+         newArr[i].manufacturer_name = this.getManufacturerName(newArr[i].manufacturer)
545
+         newArr[i].dealer_name = this.getDealerName(newArr[i].dealer)
521 546
          newArr[i].time = this.getTime(newArr[i].ctime)
522 547
          newArr[i].user_name = this.getAdminUser(newArr[i].creater)
523 548
          newArr[i].total = (newArr[i].price * newArr[i].warehousing_count).toFixed(2)

+ 40 - 7
src/xt_pages/stock/drugs/components/drugOutDetail.vue Zobrazit soubor

@@ -122,6 +122,12 @@
122 122
           </template>
123 123
         </el-table-column>
124 124
 
125
+        <el-table-column label="生产厂商" align="center">
126
+          <template slot-scope="scope">
127
+           {{getManufacturerName(scope.row.manufacturer)}}
128
+          </template>
129
+        </el-table-column>
130
+
125 131
 
126 132
         <el-table-column label="操作时间" align="center">
127 133
           <template slot-scope="scope">
@@ -274,6 +280,8 @@ export default {
274 280
       drugTypeList:[],
275 281
       storehouse_id:0,
276 282
       houseList:[],
283
+      dealerList:[],
284
+      manufacturerList:[]
277 285
     };
278 286
   },
279 287
   methods: {
@@ -576,6 +584,8 @@ export default {
576 584
         for(let i=0;i<this.tablePrint.length;i++){
577 585
           this.tablePrint[i].index = i+1
578 586
           this.tablePrint[i].ctime = this.getTime(this.tablePrint[i].ctime)
587
+          this.tablePrint[i].manufacturer_name = this.getManufacturerName(this.tablePrint[i].manufacturer)
588
+          this.tablePrint[i].dealer_name = this.getDealerName(this.tablePrint[i].dealer)
579 589
         }
580 590
         for(let i=0;i<this.tablePrint.length;i++){
581 591
            if(this.org_id == 9919 || this.org_id == 9671){
@@ -594,8 +604,8 @@ export default {
594 604
 
595 605
 
596 606
        import('@/vendor/Export2Excel').then(excel => {
597
-       const tHeader = ['序号','药品名称', '规格型号', '单位','数量','单价','总价','出库时间','备注']
598
-       const filterVal = ['index','drug_name', 'unit', 'min_unit','count','min_price','total_price','ctime','remark']
607
+       const tHeader = ['序号','药品名称', '规格型号','生产厂商','进销商', '单位','数量','单价','总价','出库时间','备注']
608
+       const filterVal = ['index','drug_name', 'unit', 'manufacturer_name','dealer_name','min_unit','count','min_price','total_price','ctime','remark']
599 609
        let obj = {'index':'合计','total_price':0.00}
600 610
        for(let i=0;i<this.tablePrint.length;i++){
601 611
          obj.total_price += this.tablePrint[i].total
@@ -619,8 +629,8 @@ export default {
619 629
      },
620 630
     exportListDetai(){
621 631
       import('@/vendor/Export2Excel').then(excel => {
622
-       const tHeader = ['序号','单据编号', '药品类型', '药品名称','规格型号','操作时间','制单人','出货价','数量','总价']
623
-       const filterVal = ['index','warehouse_out_order_number', 'drugtype', 'drug_name','specification_name','time','user_name','price','count','total_price']
632
+       const tHeader = ['序号','单据编号', '药品类型', '药品名称','规格型号','生产厂商','进销商','操作时间','制单人','出货价','数量','总价']
633
+       const filterVal = ['index','warehouse_out_order_number', 'drugtype', 'drug_name','specification_name','manufacturer_name','dealer_name','time','user_name','price','count','total_price']
624 634
        for(let i=0;i<this.tableData.length;i++){
625 635
          if(this.tableData[i].is_total == 0){
626 636
             this.tableData[i].index = i+1
@@ -633,10 +643,11 @@ export default {
633 643
             if(this.tableData[i].drug_type == 3){
634 644
               this.tableData[i].drugtype = "成药"
635 645
             }
636
-            // this.tableData[i].drugtype = this.getTypeList(this.tableData[i].drugtype)
637 646
             this.tableData[i].specification_name = this.tableData[i].dose + this.tableData[i].dose_unit +"*" + this.tableData[i].min_number + this.tableData[i].min_unit +  "/" + this.tableData[i].max_unit
638 647
             this.tableData[i].time = this.getTime(this.tableData[i].ctime)
639 648
             this.tableData[i].user_name = this.getAdminUser(this.tableData[i].creater)
649
+            this.tableData[i].manufacturer_name = this.getManufacturerName(this.tableData[i].manufacturer)
650
+            this.tableData[i].dealer_name = this.getDealerName(this.tableData[i].dealer)
640 651
             if(this.org_id == 9919){
641 652
               this.tableData[i].total = (this.tableData[i].count * this.tableData[i].last_price)
642 653
               if(this.tableData[i].count >=this.tableData[i].min_number){
@@ -670,7 +681,24 @@ export default {
670 681
           this.downloadLoading = false
671 682
       })
672 683
     },
673
-
684
+    getManufacturerName(id){
685
+        var manufacturer_name = ""
686
+        for(let i=0;i<this.manufacturerList.length;i++){
687
+          if(id == this.manufacturerList[i].id){
688
+            manufacturer_name = this.manufacturerList[i].manufacturer_name
689
+          }
690
+        }
691
+        return manufacturer_name
692
+     },
693
+     getDealerName(id){
694
+       var dealer_name = ""
695
+       for(let i=0;i<this.dealerList.length;i++){
696
+          if(id == this.dealerList[i].id){
697
+              dealer_name = this.dealerList[i].dealer_name
698
+          }
699
+       }
700
+       return dealer_name
701
+     }, 
674 702
     getBaseDrugLibList() {
675 703
         let params = {
676 704
           page: 1,
@@ -704,7 +732,8 @@ export default {
704 732
      getDrugOutOrderPrint(params).then(response=>{
705 733
         if(response.data.state == 1){
706 734
             var list = response.data.data.list
707
-         
735
+            this.dealerList = response.data.data.dealerList
736
+            this.manufacturerList = response.data.data.manufacturerList
708 737
             let objInfo = {}
709 738
             if(this.org_id == 9919){
710 739
               list.forEach((item,index)=>{
@@ -726,6 +755,8 @@ export default {
726 755
                   max_unit:item.XtBaseDrug.max_unit,
727 756
                   min_price:item.XtBaseDrug.min_price,
728 757
                   ctime:item.ctime,
758
+                  manufacturer:item.manufacturer,
759
+                  dealer:item.dealer,
729 760
                 }
730 761
               }
731 762
              })
@@ -749,6 +780,8 @@ export default {
749 780
                   max_unit:item.XtBaseDrug.max_unit,
750 781
                   min_price:item.XtBaseDrug.min_price,
751 782
                   ctime:item.ctime,
783
+                  manufacturer:item.manufacturer,
784
+                  dealer:item.dealer,
752 785
                 }
753 786
               }
754 787
             })

+ 4 - 0
src/xt_pages/stock/drugs/inventoryDetails.vue Zobrazit soubor

@@ -158,6 +158,10 @@ export default {
158 158
             this.$router.push({path:'/stock/drugs/inventoryPrint'}) 
159 159
         },
160 160
         print_1(){
161
+           if(this.ids == ""){
162
+             this.$message.error("请勾选需要打印的内容")
163
+             return false
164
+           }
161 165
            this.$router.push({path:'/stock/drugs/print?storehouse_id='+this.storehouse_id+"&drug_name="+this.searchKey+"&limit="+this.limit+"&page="+this.page+"&ids="+this.ids}) 
162 166
         },
163 167
         handleSizeChange(val){

+ 4 - 0
src/xt_pages/stock/inventoryDetails.vue Zobrazit soubor

@@ -145,6 +145,10 @@ export default {
145 145
     },
146 146
     methods:{
147 147
         toprint(){
148
+          if(this.ids == ""){
149
+             this.$message.error("请勾选需要打印的内容")
150
+             return false
151
+          }              
148 152
           this.$router.push({path:'/stock/print_all?storehouse_id='+this.storehouse_id+"&good_name="+this.searchKey+"&limit="+this.limit+"&page="+this.page+"&ids="+this.ids})
149 153
         },
150 154